Agent skill

Enhanced Telemetry

by majiayu000 in majiayu000/claude-skill-registry

Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics.

MITAuto-check passedAgent Workflows

Install Enhanced Telemetry

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill enhanced-telemetry -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry enhanced-telemetry --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/analysis/enhanced-telemetry .claude/skills/enhanced-telemetry && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
enhanced-telemetry
GitHub stars
666
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
325 words
Files
2
Skills in repo
1,273
Repo updated
First seen
Licence
MIT

At a glance

Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics.

  • Works in 4 steps: Check hooks configured → Test script manually → Check Loki receiving data → …
  • Analyzing detailed usage patterns beyond default OTEL
  • SKILL.md covers What It Captures, 10 Hooks Instrumented, Configuration and Viewing Data, plus 5 more sections
  • Calls python3 and curl

What it does

Enhanced Telemetry is an agent skill from majiayu000/claude-skill-registry. Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics. Use when analyzing detailed usage patterns beyond default OTEL.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in Agent Workflows, covering Subagents and Observability. It works with OpenTelemetry. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

When your agent uses it

  • Analyzing detailed usage patterns beyond default OTEL
  • Tasks that involve Subagents
  • Tasks that involve Observability

Example prompts

  • “/enhanced-telemetry”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Check hooks configured
  2. Test script manually
  3. Check Loki receiving data
  4. Check Loki has enhanced data

What it can do on your machine

Read from SKILL.md and the folder at commit 2d14a69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Enhanced Telemetry loads about 2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 325 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 2d14a69, republished under its MIT licence (© majiayu000). 325 words, ~1,964 tokens.

Download SKILL.mdSave it as .claude/skills/enhanced-telemetry/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
enhanced-telemetry
description
Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics. Use when analyzing detailed usage patterns beyond default OTEL.

Enhanced Telemetry v2

Captures comprehensive Claude Code metrics via ALL 10 available hooks, providing deep observability beyond default OTEL telemetry.

What It Captures

Session Analytics
  • Session lifecycle (start/end)
  • Session duration
  • Session source (startup/resume/clear/compact)
  • Session termination reason
  • Permission mode
Conversation Analytics
  • Turn count per session
  • Prompt patterns (question/debugging/creation/ultrathink)
  • Prompt length and token estimates
  • Conversation style distribution
Tool Analytics
  • Tool call frequency
  • Tool sequences (previous → current)
  • Tool error rates
  • Response sizes and token estimates
  • File types accessed
Subagent Analytics
  • Subagents spawned per session
  • Subagent types (Explore, Plan, general-purpose, etc.)
  • Subagent completion tracking
Context Analytics
  • Estimated token usage
  • Context window utilization percentage
  • Context compaction events (manual vs auto)
  • Token accumulation tracking
Repository Analytics
  • Activity per repository
  • Tool usage by project
  • Branch-level tracking
Permission Analytics
  • Permission requests
  • Permission types
  • Notification tracking

10 Hooks Instrumented

HookEvent TypeWhat's Captured
SessionStartsession_startSource, permission mode, git info
SessionEndsession_endDuration, turns, tools, errors, subagents
UserPromptSubmituser_promptPattern, length, tokens, prompt hash
PreToolUsetool_callTool name, details, sequence position
PostToolUsetool_resultStatus, response size, errors
SubagentStopsubagent_completeSubagent count
PermissionRequestpermission_requestNotification type
PreCompactcontext_compactTrigger (manual/auto), token estimate
NotificationnotificationNotification type
Stopsession_endSame as SessionEnd

Configuration

Settings file: .claude/settings.json

json
{
  "hooks": {
    "SessionStart": ["python3 .claude/hooks/enhanced-telemetry.py SessionStart"],
    "SessionEnd": ["python3 .claude/hooks/enhanced-telemetry.py SessionEnd"],
    "UserPromptSubmit": ["python3 .claude/hooks/enhanced-telemetry.py UserPromptSubmit"],
    "PreToolUse": [{"matcher": ".*", "hooks": ["python3 .claude/hooks/enhanced-telemetry.py PreToolUse"]}],
    "PostToolUse": [{"matcher": ".*", "hooks": ["python3 .claude/hooks/enhanced-telemetry.py PostToolUse"]}],
    "SubagentStop": ["python3 .claude/hooks/enhanced-telemetry.py SubagentStop"],
    "PermissionRequest": ["python3 .claude/hooks/enhanced-telemetry.py PermissionRequest"],
    "PreCompact": ["python3 .claude/hooks/enhanced-telemetry.py PreCompact"],
    "Notification": ["python3 .claude/hooks/enhanced-telemetry.py Notification"],
    "Stop": ["python3 .claude/hooks/enhanced-telemetry.py Stop"]
  }
}

Viewing Data

Grafana Dashboards
LogQL Queries
logql
# All enhanced telemetry
{job="claude_code_enhanced"} | json

# Session analytics
{job="claude_code_enhanced", event_type="session_end"} | json

# Tool calls
{job="claude_code_enhanced", event_type="tool_call"} | json

# Prompt patterns
sum by (pattern) (count_over_time({job="claude_code_enhanced", event_type="user_prompt"} | json [24h]))

# Skill usage
{job="claude_code_enhanced", event_type="skill_usage"} | json

# Context utilization
{job="claude_code_enhanced", event_type="context_utilization"} | json

# Tool sequences
{job="claude_code_enhanced", event_type="tool_call"} | json | line_format "{{.previous_tool}} → {{.tool_name}}"

# Subagent tracking
{job="claude_code_enhanced", event_type="tool_call", tool="Task"} | json

# Error analysis
{job="claude_code_enhanced", event_type="tool_result", status="error"} | json

# Context compaction
{job="claude_code_enhanced", event_type="context_compact"} | json

Event Schemas

session_start
json
{
  "event": "session_start",
  "session_id": "abc123",
  "source": "startup",
  "permission_mode": "default",
  "cwd": "/mnt/c/data/github/project",
  "timestamp": "2025-11-27T08:00:00Z",
  "git": {"repo_name": "project", "branch": "main"}
}
Show full SKILL.md (140 more words)Show less
session_end
json
{
  "event": "session_end",
  "session_id": "abc123",
  "reason": "prompt_input_exit",
  "duration_seconds": 1847.5,
  "turn_count": 25,
  "tools_used": {"Read": 45, "Edit": 12, "Bash": 8},
  "tool_sequence": ["Read", "Edit", "Bash", "Read"],
  "subagents_spawned": 3,
  "error_count": 2,
  "timestamp": "2025-11-27T08:30:00Z"
}
user_prompt
json
{
  "event": "user_prompt",
  "turn_number": 5,
  "prompt_length": 256,
  "estimated_tokens": 64,
  "prompt_hash": "a1b2c3d4",
  "patterns": ["question", "debugging"],
  "timestamp": "2025-11-27T08:05:00Z"
}
tool_call
json
{
  "event": "tool_call",
  "tool_name": "Read",
  "tool_use_id": "xyz789",
  "tool_details": {"file_path": "/src/main.py", "file_type": ".py"},
  "sequence_position": 15,
  "previous_tool": "Glob",
  "timestamp": "2025-11-27T08:05:30Z"
}
tool_result
json
{
  "event": "tool_result",
  "tool_name": "Read",
  "tool_use_id": "xyz789",
  "response_length": 4500,
  "estimated_tokens": 1125,
  "is_error": false,
  "error_type": null,
  "timestamp": "2025-11-27T08:05:31Z"
}
context_utilization
json
{
  "event": "context_utilization",
  "estimated_session_tokens": 45000,
  "context_percentage": 22.5,
  "last_content_tokens": 5000,
  "turn_count": 15,
  "timestamp": "2025-11-27T08:10:00Z"
}
context_compact
json
{
  "event": "context_compact",
  "trigger": "auto",
  "has_custom_instructions": false,
  "session_turn_count": 45,
  "estimated_tokens_before": 180000,
  "timestamp": "2025-11-27T08:15:00Z"
}

Files

.claude/
├── hooks/
│   └── enhanced-telemetry.py       # Main telemetry script (v2)
├── settings.json                    # Hook configurations
└── skills/
    └── enhanced-telemetry/
        └── SKILL.md                 # This documentation

Requirements

  • Python 3.x (in PATH)
  • Loki running at localhost:3100
  • Claude Code hooks enabled

Troubleshooting

No Data in Dashboards
  1. Check hooks configured:

    bash
    cat .claude/settings.json | grep enhanced-telemetry
  2. Test script manually:

    bash
    echo '{"tool_name":"Test"}' | python3 .claude/hooks/enhanced-telemetry.py PreToolUse
  3. Check Loki receiving data:

    bash
    curl -s "http://localhost:3100/loki/api/v1/labels"
    # Should include: event_type, tool, repo, pattern, etc.
  4. Check Loki has enhanced data:

    bash
    curl -s "http://localhost:3100/loki/api/v1/query?query={job=\"claude_code_enhanced\"}&limit=5"
Hooks Not Running
  • Ensure Claude Code started from project directory with .claude/settings.json
  • Check settings.json is valid JSON: python3 -m json.tool .claude/settings.json
  • Verify Python available: which python3
Script Errors
  • Check script permissions: chmod +x .claude/hooks/enhanced-telemetry.py
  • Test with debug output: Run script manually and check stderr

Integration with Other Skills

  • observability-analyzer: Uses {job="claude_code_enhanced"} queries
  • observability-pattern-detector: Detects patterns in enhanced data
  • observability-alert-manager: Alerts on enhanced telemetry events
  • skill-improvement-from-observability: Uses enhanced data for insights

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/analysis/enhanced-telemetry of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 2d14a69

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Enhanced Telemetry next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Enhanced Telemetry compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Enhanced Telemetry this skillmajiayu000/claude-skill-registry6661 repos~2kAutomated safety check: PassMIT
Go Spec Reviewerinference-gateway/inference-gateway214—~1.2kAutomated safety check: PassApache-2.0
Backend Dev Guidelineslangfuse/langfuse36k—~1.9kAutomated safety check: PassCustom licence
Motel Debugkitlangton/motel298—~2.2kAutomated safety check: PassMIT
Tempsgotempsh/temps826—~1.9kAutomated safety check: PassApache-2.0
UModel Root Cause Analysisalibaba/UnifiedModel412—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Go Spec Reviewer

    inference-gateway/inference-gateway

    Review a Go design spec before implementation begins - dispatch a subagent that checks a design doc for completeness, consistency, and idiomatic Go (simplicity, small consumer-defined interfaces…

    214 GitHub stars~1.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Backend Dev Guidelines

    langfuse/langfuse

    Build or review Langfuse backend code. An agent skill from langfuse/langfuse.

    36k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Motel Debug

    kitlangton/motel

    Debug applications with motel, a local OpenTelemetry ingest and query server.

    298 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Temps

    gotempsh/temps

    Manage, deploy, operate, and instrument applications with Temps.

    826 GitHub stars~1.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • UModel Root Cause Analysis

    alibaba/UnifiedModel

    Investigates a service incident to its root cause by querying a UModel object graph alongside metrics, logs, topology and recent deployments.

    412 GitHub stars~1.9k tokensUpdated 14 days ago
    DevOps & CloudAuto-check passed
  • Agent Kill Switch

    vivekchand/clawmetry

    Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

    425 GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed

More from majiayu000/claude-skill-registry

All 1,273 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Pyzotero

    majiayu000/claude-skill-registry

    Interact with Zotero reference management libraries using the pyzotero Python client.

    666 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check: notes
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed

Works with

Questions about Enhanced Telemetry

What does Enhanced Telemetry do?

Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics. Enhanced Telemetry is an agent skill from majiayu000/claude-skill-registry. Comprehensive Claude Code telemetry via 10 hooks capturing sessions, conversations, tools, subagents, context, permissions, and repository analytics.

When should I use Enhanced Telemetry?

Enhanced Telemetry fits situations like: analyzing detailed usage patterns beyond default OTEL; tasks that involve Subagents; tasks that involve Observability.

How do I install Enhanced Telemetry in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill enhanced-telemetry -a claude-code`. Or copy the skill folder (skills/analysis/enhanced-telemetry in majiayu000/claude-skill-registry) into .claude/skills/enhanced-telemetry in your project. Claude Code loads it when a task matches its description.

How do I install Enhanced Telemetry in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill enhanced-telemetry -a codex`. Or copy the skill folder (skills/analysis/enhanced-telemetry in majiayu000/claude-skill-registry) into .agents/skills/enhanced-telemetry in your project. Codex loads it when a task matches its description.

Can I use Enhanced Telemetry in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill enhanced-telemetry -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/enhanced-telemetry, .gemini/skills/enhanced-telemetry, .github/skills/enhanced-telemetry and .opencode/skills/enhanced-telemetry in your project.

What does Enhanced Telemetry need to run?

Going by SKILL.md and its folder, Enhanced Telemetry needs the command-line tools its instructions call (python3 and curl). Our summary lists: Python 3.

Does Enhanced Telemetry access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Enhanced Telemetry safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Enhanced Telemetry use?

Enhanced Telemetry is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Enhanced Telemetry use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Enhanced Telemetry?

Skills that share tags, products or a category with Enhanced Telemetry: Go Spec Reviewer (inference-gateway/inference-gateway, 214 stars), Backend Dev Guidelines (langfuse/langfuse, 36k stars), Motel Debug (kitlangton/motel, 298 stars) and Temps (gotempsh/temps, 826 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Enhanced Telemetry?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 1,273 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.