smithery.ai

fill-metric-ids

A generic tool to populate Metric IDs into HTML files based on an Excel/CSV dictionary. Supports fuzzy matching and contextual prefixing (e.g. "Count" in "Login" tab to "Login User Count").

First seen Apr 19, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,632 B
  • docs SUMMARY.md 212 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Fill Metric IDs (Generic)

This skill provides a generic utility to scan an HTML file for text (metric names) and append their corresponding IDs from a provided data source.

Capabilities

  1. Generic Matching: Matches text in HTML against a Name->ID dictionary (Excel or CSV).
  2. Fuzzy Matching: Uses difflib to handle slight variations (e.g. "User Count" vs "Count", "访问数" vs "访问人数").
  3. Context Aware: Can prepend prefixes to keys based on parent element IDs/Classes (defined in config).
  4. Flexible Selectors: Target specific tags (default h3, th, td).

Usage

1. Unified Metric Filler

python3 .agent/skills/fill-metric-ids/scripts/fill_metrics.py \
  --html <input.html> \
  --source <metrics.xlsx>

The script automatically handles:

  1. Specialized Logic: Fixes known structural issues (Bound Users, Retention Tables).
  2. Context Mapping: Uses miniprogram_context.json to map specific tabs to metric prefixes.
  3. Generic Filling: Scans for remaining metrics using Fuzzy and Substring matching.
  4. Optimizations: Excludes "Date" column, applies manual mappings for known aliases.

Context Config Example

context.json:

{
  "#login-tab": ["Login User"],
  ".share-section": ["Share User"]
}

If the tool finds "Count" inside <div id="login-tab">, it looks for "Login UserCount" in the Excel.