Scores telemetry field name similarity across syntactic, taxonomic, and semantic layers. Useful for auditing naming collisions, comparing log schemas, and validating field consistency.
Ships in quality-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Score pairwise similarity of telemetry field names across three independent layers. Emits raw scores — no thresholds, no clustering, no opinions. The consuming AI agent applies its own domain judgment.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Use this skill when:
trace_id vs traceId vs request_id vs correlation_id style problems5-layer scoring pipeline — each layer catches what the others miss:
┌─────────────────────────────────────────────────────────┐
│ Layer 1: NORMALIZE │
│ camelCase/snake_case split + abbreviation expansion │
│ wordninja for concatenated words │
│ "traceId" → "trace id", "ts" → "timestamp" │
├─────────────────────────────────────────────────────────┤
│ Layer 2: SYNTACTIC (RapidFuzz, 0-100) │
│ token_set_ratio on normalized forms │
│ Catches: trace_id ↔ traceId, level ↔ log_level │
├─────────────────────────────────────────────────────────┤
│ Layer 3: TAXONOMIC (WordNet Wu-Palmer, 0.0-1.0) │
│ Head-noun synonym detection via hypernym tree │
│ Catches: level ↔ severity, error ↔ fault, op ↔ action │
├─────────────────────────────────────────────────────────┤
│ Layer 4: SEMANTIC (sentence-transformers, 0.0-1.0) │
│ Cosine similarity via all-MiniLM-L6-v2 embeddings │
│ Catches: error ↔ exception, user_id ↔ account_id │
├─────────────────────────────────────────────────────────┤
│ Layer 5: CANONICAL (--canonical flag, optional) │
│ RapidFuzz vs bundled OTel/OCSF/CloudEvents dictionary │
│ Catches: http_method → http.request.method (OTel) │
├─────────────────────────────────────────────────────────┤
│ Output: All pairs scored + canonical anchors. │
│ Agent decides what to act on — tool computes, judges. │
│ Use proposer-prompt.md for structured rename proposals.│
└─────────────────────────────────────────────────────────┘
The skill works in two phases:
term_similarity.py): Compute raw similarity scores across 5 layers. Tool computes, no opinions emitted.references/proposer-prompt.md): A bundled prompt template that consumes the scoring JSON and asks the LLM to produce structured rename proposals with confidence levels, evidence citations, and explicit escape hatches.The two phases are deliberately separated. Phase 1 is deterministic and reproducible; Phase 2 applies domain judgment that only an LLM with conversation context can provide.
All installed via uv run (PEP 723 inline metadata — no global install needed):
| Package | Purpose | Size |
|---|---|---|
sentence-transformers | Semantic embeddings (MiniLM-L6) | ~80 MB |
rapidfuzz | Fast fuzzy string matching (C++) | ~1.3 MB |
wordninja | Probabilistic word splitting | ~0.5 MB |
nltk | WordNet Wu-Palmer synonym detection | ~30 MB |
orjson | Fast JSON serialization | ~0.3 MB |
First run downloads the all-MiniLM-L6-v2 model (~80 MB) and WordNet data (~30 MB).
The analysis script lives in this skill's references/ directory. Resolve the path before use:
# SSoT-OK: marketplace path resolution for cross-repo invocation
SCRIPT_DIR="$(dirname "$(find ~/.claude/plugins -path '*/telemetry-terminology-similarity/references/term_similarity.py' -print -quit 2>/dev/null)")"
SCRIPT="$SCRIPT_DIR/term_similarity.py"
All examples below assume $SCRIPT is set. When invoking from the cc-skills repo itself, use the relative path directly.
# SSoT-OK: uv run handles PEP 723 inline deps
uv run --python 3.14 "$SCRIPT" \
trace_id traceId request_id correlation_id \
level severity log_level priority
Use Python regex extraction (macOS lacks grep -P):
python3 -c "
import re, glob
fields = set()
for f in glob.glob('**/*.py', recursive=True):
text = open(f).read()
for m in re.finditer(r'\"([a-z][a-z0-9_]*?)\":', text):
fields.add(m.group(1))
for f in sorted(fields):
print(f)
" | uv run --python 3.14 "$SCRIPT"
head -1 telemetry.jsonl | jq -r 'keys[]' | uv run --python 3.14 "$SCRIPT"
uv run --python 3.14 "$SCRIPT" --jsonl /path/to/telemetry.jsonl
uv run --python 3.14 "$SCRIPT" --schema-a schema_v1.json --schema-b schema_v2.json
uv run --python 3.14 "$SCRIPT" --top 30 field1 field2 field3 # Top 30 pairs
uv run --python 3.14 "$SCRIPT" --top 0 field1 field2 field3 # All pairs
uv run --python 3.14 "$SCRIPT" --json field1 field2 field3 # JSON output
# Anchor each field against 1,453 bundled canonical names from OTel + OCSF + CloudEvents
uv run --python 3.14 "$SCRIPT" --canonical http_method http_status request_id severity
Output adds a === CANONICAL ANCHORS === section showing the closest standard names per field. Useful for "should we rename to match an industry standard" decisions.
After running with --json --canonical, paste the output into references/proposer-prompt.md — a bundled prompt template that produces atomic, reviewable rename proposals with confidence levels and explicit escape hatches.
# Phase 1: Score
uv run --python 3.14 "$SCRIPT" --json --canonical [fields...] > analysis.json
# Phase 2: Apply proposer prompt (paste analysis.json into the template)
# The LLM produces structured proposals.json — review atomically
| Parameter | Default | Description |
|---|---|---|
--top | 50 | Show top N pairs by combined score (0 = all) |
--canonical | false | Lookup each field against bundled OTel/OCSF/CloudEvents dict |
--jsonl | — | Extract fields from a JSONL file (all unique keys) |
--schema-a/-b | — | Cross-schema comparison (two JSON schema files) |
--json | false | Output as structured JSON instead of text |
Fields analyzed: 21
Unique after normalization: 19
=== EXACT DUPLICATES (after normalization) ===
trace_id == traceId
timestamp == ts
=== SCORED PAIRS (sorted by combined score) ===
syn tax sem comb pair
--- --- --- ---- ----
100.0 0.000 0.560 1.000 level <-> log_level
0.0 1.000 0.472 1.000 error <-> fault
66.7 0.909 0.457 0.909 operation <-> action
46.2 0.833 0.251 0.833 level <-> severity
28.6 0.667 0.700 0.700 error <-> exception
Three independent scores per pair — the agent reads all three to decide:
--json)Structured JSON with exact_duplicates and scored_pairs arrays.
| Scenario | syn | tax | sem | Which layer wins |
|---|---|---|---|---|
trace_id vs traceId | 100.0 | 0.0 | 1.0 | Syntactic |
level vs severity | 46.2 | 0.833 | 0.251 | Taxonomic |
error vs fault | 0.0 | 1.000 | 0.472 | Taxonomic |
operation vs action | 66.7 | 0.909 | 0.457 | Taxonomic |
error vs exception | 28.6 | 0.667 | 0.700 | Semantic |
user_id vs account_id | 47.1 | 0.0 | 0.792 | Semantic |
The normalizer expands common telemetry abbreviations:
| Abbr | Expansion | Abbr | Expansion |
|---|---|---|---|
ts | timestamp | uid | user id |
req | request | resp | response |
err | error | msg | message |
svc | service | env | environment |
op | operation | lvl | level |
evt | event | ctx | context |
acct | account | cfg | configuration |
dur | duration | lat | latency |
Add domain-specific abbreviations by editing ABBREVIATIONS in term_similarity.py.
| Issue | Cause | Solution |
|---|---|---|
ModuleNotFoundError | Missing deps | Use uv run (PEP 723 resolves automatically) |
| Model download slow | First run | Cached after first download (~110 MB total) |
| Script not found from other repo | Path not resolved | Set $SCRIPT per Script Location section |
grep: invalid option -- P | macOS lacks PCRE | Use python3 -c "import re..." pattern instead |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/clickhouse-architectClickHouse schema design and optimization. TRIGGERS - ClickHouse schema, compression codecs, MergeTree, ORDER BY tuning, partition key./code-clone-assistantDetect and refactor code duplication with PMD CPD. TRIGGERS - code clones, DRY violations, duplicate code./dead-code-detectorDetect unused/unreachable code in polyglot codebases (Python, TypeScript, Rust). TRIGGERS - dead code, unused functions, unused imports/quality-tools:telemetry-terminology-similarityfrom quality-tools
npx claudepluginhub terrylica/cc-skills --plugin quality-toolsOther plugins' skills for the same job