yonatangross/orchestkit/telemetry-inspect
Claude Code and agent skill by yonatangross/orchestkit
- community
Checking that the SKILL.md file is still in the repository.
Read-only check of this project's OrchestKit telemetry files: write counts, sizes, schema locks, growth and orphans. Use when verifying the observability pipeline or hunting a missing writer.
Install
npx vskill@latest install yonatangross/orchestkit/telemetry-inspectSKILL.md
The same SKILL.md was published earlier as yonatangross/orchestkit/telemetry-inspect.
telemetry-inspect
One-shot health check for OrchestKit's telemetry pipeline. Reports writer activity, file sizes, schema lock coverage, orphan files, and growth warnings. Use when verifying the pipeline is flowing correctly or debugging a missing writer.
When to use
- Before or after a risky hook refactor, to prove telemetry still writes as expected
- Weekly health check on a long-running project
- When
analyticsoutput looks suspicious — inspect the underlying data first - When adding a new telemetry file and wanting to confirm it's picked up
- Auditing which files are schema-locked vs. drift-vulnerable
What it checks
- Writer activity — for each registered telemetry file, recent write count (from mtime scan) and last-write delta
- File health — size (warn at 256 KB, critical at 1 MB), line count, mtime
- Schema lock status — which files have validators in
lib/telemetry-schemas.ts - Orphan detection — files on disk under
.claude/{telemetry,logs,state,feedback}/that aren't in the registry (possible stale writer or new file needing schema), plus inventory rows whose writer hook no longer exists insrc/hooks/src/(dead writer → orphan) - Growth trend — bytes per hour since session start (fire alert if > 100 KB/hr)
- Coordination layer (M168) — live counts from
sessions.db(running sessions, held locks, pending worktree links, skill invocations) plus write throughput fromcoordination-metrics.jsonl - Runtime fired-census — which hooks actually fired, from the per-invocation records
run-hook.mjswrites to~/.claude/analytics/hook-timing.jsonl. Checks 1–4 answer "is the file being written?"; this answers "is the writer running at all?" — the upstream question. A hook can be wired and reachable (the closure gate proves that statically) and still never fire: #2886 shipped exactly that with 12 green tests.
Usage
Default mode: terminal-friendly ASCII report. --json emits a structured result suitable for piping into another tool or uploading.
Output shape (ASCII mode)
Implementation plan (for an agent/LLM running this skill)
- List known files — read
lib/telemetry-schemas.ts'sSCHEMA_LOCKEDinventory for the 7 locked paths. Extend with the unlocked paths listed in the skill-localreferences/telemetry-inventory.md. - Cross-check inventory writers against the registry closure — never trust the inventory blindly:
- Run
node src/hooks/scripts/validate-registry.mjs(from the OrchestKit repo root; skip gracefully if not in the OrchestKit repo) and confirm it passes. - For every writer named in the inventory (e.g.
posttool/metrics-bridge), verify the source file exists:test -f src/hooks/src/<writer>.ts. - Any inventory writer that is NOT a live
src/hooks/src/file is ORPHANED — report 🔴, never "expected-but-empty". Its file(s) on disk are orphans regardless of freshness, and the inventory row is stale (flag it for removal).
- For each file:
- Use
Globto resolve.claude/state/ork-metrics-*.jsonpattern → may be multiple - Use
Readwithlimit: 10to see shape andBash wc -lfor line count - Use
Bash statfor mtime + size
- Classify health:
- size > 1 MB → critical
- size > 256 KB → warn
- mtime > 7 days → "no recent writes"
- line count 0 → "no writes"
- Orphan scan —
Bash find .claude/{telemetry,logs,state,feedback} -type fcross-check against registered paths. Any on-disk files not in inventory → orphan. Merge in dead-writer orphans from step 2. - Runtime fired-census — steps 1–5 ask "is the file being written?". This asks the upstream question: "does the writer hook run at all?"
- Run
node src/hooks/scripts/fired-census.mjs --json(OrchestKit repo only; skip gracefully elsewhere — it exits 0 and prints an absent-census notice if~/.claude/analytics/hook-timing.jsonldoesn't exist yet). - Report the class counts (
totals), and theversions.skewedline verbatim when true — the census is written by the INSTALLED plugin across ALL projects, while the closure comes from this tree, soNEVERon a hook newer than the installed build is expected, not a finding. - Cross-reference: for every inventory writer from step 2 that is a live file, look up its census row. A writer that is
ALIVEbut whose file has 0 lines is a real defect (it runs and produces nothing). A writer that isNEVERis the #2886 class — surface it, but as advisory. - Never call a hook dead from
NEVERalone.UNOBSERVABLErows (dispatcher children) cannot appear by construction, and rare events (WorktreeRemove,PreCompact) look identical to a broken guard from here. Read the guard before concluding.
- Render report — ASCII table by default, JSON if
--jsonargument passed.
Core logic is deterministic + read-only. Do NOT write to any telemetry file — this skill is an observer.
Coordination layer (M168 #1915)
The SQLite coordination layer lives outside `.claude/`, at ~/.local/state/orchestkit/:
| Source | What it tells you | |
|---|---|---|
sessions.db | live session / lock / worktree state (SQLite) | |
events.jsonl | coordination event stream (goal_converged, chain_stale, …) | |
coordination-metrics.jsonl | sessions.db write throughput counters (#1915) |
Live counts — the DB file is a standard SQLite database; read it with sqlite3 (read-only SELECTs only):
Write throughput — coordination-metrics.jsonl is append-only {ts, metric, count} lines emitted async by lib/metrics-emitter.ts on every sessions.db write. Event rate ≈ recent sessions_db_write lines:
Degrade gracefully: if sqlite3 is absent or the DB / metrics file doesn't exist, report "coordination layer idle" — never error. Like the rest of this skill, these are read-only observations.
Upstream OTel metric notes
When inspecting Claude Code's own OTel metrics (downstream of this skill — claude_code.* in your collector):
- CC 2.1.129+:
claude_code.pull_request.countnow also counts PRs/MRs filed via MCP tools (e.g., GitHub MCPcreate_pull_request), not just shell commands run through the Bash tool. Dashboards built before 2.1.129 will see a step-function increase at the cutover, annotate, don't alert. See../monitoring-observability/references/metrics-collection.mdfor the join pattern that distinguishes MCP- from shell-filed PRs. - CC 2.1.161+:
OTEL_RESOURCE_ATTRIBUTESvalues are now attached as labels on all metric datapoints, enabling dimensional slicing (team, repo, environment). Existing dashboards keep working; new dashboards should use label selectors to segment usage. - CC 2.1.145+:
claude_code.toolOTEL spans carryagent_id+parent_agent_id, and background subagent spans nest under the dispatching Agent tool span. Build the trace tree by querying onparent_agent_id— enables per-skill fan-out timing and cost attribution for multi-agent skills (brainstorm,explore,implement); no schema change needed. - CC 2.1.174+:
/usageexposes CC-native per-component attribution — cache misses, long context, subagents, and per-skill/agent/plugin/MCP cost breakdowns over 24h/7d (surfaced first in the VSCode Account & usage dialog). Treat it as a cross-check source in the health report: if ork telemetry shows a skill/agent active but CC attribution shows zero usage for it (or vice versa), flag the divergence as a possible missing writer or stale install rather than trusting either side alone. - CC 2.1.202+: telemetry from workflow-spawned agents (a
/workflowsrun) carriesworkflow.run_id+workflow.nameattributes, so a whole workflow run is reconstructable from OTel — group all agent events onworkflow.run_idto rebuild one run's fan-out, and slice byworkflow.name. See../analytics/references/otel-fields.md("From 2.1.202") for the field table; filterselect(.["workflow.run_id"] != null)first, since ordinary session events lack these attributes.
Related
lib/telemetry-schemas.ts— source of truth for schema-locked pathsanalytics— aggregates data across sessions (different use case)- M121 "Observability Consolidation" milestone
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/telemetry-inspect/SKILL.md
Popularity
- Repository stars
- 183
- Repository forks
- 15
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yonatangross/orchestkit/telemetry-inspect)