用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/terrylica/cc-skills --skill telemetry-terminology-similarity命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
user wants to create a macOS Calendar event with sound alarms and paired Reminders, schedule a meeting, RSVP to an invitation, or set reminders.
Park a draft message/text in macOS Notes for the operator to review and edit, then read it back before acting (e.g. before sending to a real person). Notes is the source of truth (AppleScript CRUD, iCloud-synced, provenance-stamped with the Claude Code session UUID); Stickies is a best-effort view-only desktop mirror. Use whenever you draft something a human should confirm/edit before it is sent or committed — messages, replies, announcements, anything outbound. TRIGGERS - park this draft, park the message, hold this draft, let me edit first, draft for my approval, save to notes for review, read back the draft.
Programmatic Firecrawl usage via the public API, academic paper routing, recursive deep research, and raw corpus persistence.
基于 SOC 职业分类
正在显示 SKILL.md
| name | telemetry-terminology-similarity |
| description | Score telemetry field name similarity across syntactic, taxonomic, and semantic layers. |
| allowed-tools | Read, Bash, Grep, Edit, Write |
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.