Agent skill

Telemetry

by SethGammon in SethGammon/Citadel

Unified telemetry hub. An agent skill from SethGammon/Citadel.

MITAuto-check: warningsAgent Workflows

Install Telemetry

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add SethGammon/Citadel --skill telemetry -a claude-code

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

GitHub CLI
$ gh skill install SethGammon/Citadel 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/SethGammon/Citadel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/telemetry .claude/skills/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
telemetry
GitHub stars
922
Token cost
~2.9k tokens
SKILL.md length
970 words
Files
1
Skills in repo
48
Repo updated
First seen
Licence
MIT

At a glance

Unified telemetry hub. An agent skill from SethGammon/Citadel.

  • Works in 4 steps: COLLECT DATA → RENDER HUB → SUB-COMMAND HANDLING → …
  • Agent Workflows work in your project
  • SKILL.md covers When to Use, Commands, Protocol and What Telemetry Covers, plus 5 more sections
  • Calls node, docker and git

What it does

Telemetry is an agent skill from SethGammon/Citadel. Unified telemetry hub. Shows current session cost, today's spend, all-time totals, hook activity, trust level, and a directory of every telemetry command available. Also the control surface to toggle telemetry on/off and tune thresholds. Single entry point for anyone asking "what does this cost" or "what telemetry does Citadel have".

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost telemetry, and parallel agent fleets. The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “what does this cost”
  • “what telemetry does Citadel have”
  • “/telemetry”

Requirements

  • Docker

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. COLLECT DATA
  2. RENDER HUB
  3. SUB-COMMAND HANDLING
  4. ACCURACY BADGES

What it can do on your machine

Read from SKILL.md and the folder at commit e41ff1d. 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:

    • node
    • docker
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use docker and git, 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

Telemetry loads about 2.9k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 970 words of instructions outside code blocks.

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

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: warnings

The automated check found patterns that need a careful read before installing.

  • WarningContains instruction-override wording (e.g. “without asking the user”)SKILL.md:251
    - `/telemetry off` must NOT disable safety hooks — make this explicit in output

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 SethGammon/Citadel at commit e41ff1d, republished under its MIT licence (© SethGammon). 970 words, ~2,942 tokens.

Download SKILL.mdSave it as .claude/skills/telemetry/SKILL.md (or your agent's skills folder).
name
telemetry
description
Unified telemetry hub. Shows current session cost, today's spend, all-time totals, hook activity, trust level, and a directory of every telemetry command available. Also the control surface to toggle telemetry on/off and tune thresholds. Single entry point for anyone asking "what does this cost" or "what telemetry does Citadel have".
license
MIT
user-invocable
true
auto-trigger
false
trigger_keywords
telemetry, what did this cost, session cost, how much did that cost, how much have I spent, what hooks fired, trust level, show me telemetry, spending…
last-updated
2026-04-09

/telemetry — Telemetry Hub

When to Use

  • "What does Citadel track?" / "What telemetry does it have?"
  • "What did this session cost?" / "How much have I spent?"
  • "How do I turn off the cost alerts?" / "Can I disable telemetry?"
  • "Show me hook activity" / "What hooks fired?"
  • "What trust level am I at?"
  • Directly: /telemetry

Routed here by /do for: "telemetry", "what did this cost", "session stats", "session cost", "how much did that cost", "what hooks fired", "trust level", "show me telemetry", "cost breakdown", "spending".

Commands

CommandBehavior
/telemetryFull hub — stats + command directory + settings
/telemetry --costsCost section only: session, today, all-time, by campaign
/telemetry --hooksHook activity only: last 20 fires with timing and outcomes
/telemetry --verifyTelemetry and artifact integrity check: verify hashes/signatures, flag tampered records, report legacy records
/telemetry --configShow current telemetry settings from harness.json
/telemetry offDisable session summary, reduce hook verbosity
/telemetry onRe-enable all telemetry
/telemetry --threshold NSet cost alert threshold step (e.g. --threshold 10 = alert every $10)

Protocol

Step 1: COLLECT DATA

Read the following in parallel. All are optional — treat missing files as zero/empty.

Live session cost:

  • Run node scripts/session-tokens.js --today 2>/dev/null — captures real token data
  • If unavailable, read .planning/telemetry/cost-tracker-state.json for burn rate
  • Real cost is always preferred over estimated. Mark clearly: $X.XX vs $X.XX (est)

Historical costs:

  • Run node scripts/session-tokens.js --all 2>/dev/null for all-time real totals
  • Read last 20 lines of .planning/telemetry/session-costs.jsonl for recent sessions
  • For each entry: prefer real_cost > override_cost > estimated_cost

Hook activity:

  • Read last 20 lines of .planning/telemetry/hook-timing.jsonl
  • For each event: "timing" entry: extract hook, duration_ms, timestamp
  • For each event: "counter" entry: extract hook, metric
  • Check .planning/telemetry/hook-errors.jsonl (last 20 lines) for recent blocks

Trust level:

  • Read .claude/harness.json (Citadel's shared config path for all runtimes, including Codex) → trust object
  • Compute: novice (sessions < 5), familiar (5-19), trusted (20+ with 2+ campaigns)
  • If trust.override set, use that

Settings:

  • Read .claude/harness.json → telemetry object
  • Show current values with defaults if missing
Step 2: RENDER HUB

Output this format. Omit a section only if the data source is completely unavailable.

=== Citadel Telemetry ===

CURRENT SESSION
  Cost:       $X.XX [real] | $X.XX (est)
  Duration:   N min | $X.XX/min burn rate
  Tokens:     NNK input | NK output | NK cache read | NK cache write
  Messages:   N
  Agents:     N spawned
  Hooks fired: N (today)

TODAY
  $X.XX across N sessions
  Most expensive: {slug or "unattached"} — $X.XX

ALL TIME
  $X.XX across N sessions, N campaigns
  Cache savings: ~$X.XX (cache reads vs full input price)

BY CAMPAIGN (recent 5)
  {slug}: $X.XX — N sessions
  _unattached: $X.XX — N sessions

HOOK ACTIVITY (last 10 fires)
  {relative time} | {hook} | {duration_ms}ms | {outcome}
  (no hook timing recorded yet)

TRUST LEVEL
  Level:    {novice | familiar | trusted}
  Sessions: N completed
  Campaigns: N completed
  (novice = 0-4 sessions | familiar = 5-19 | trusted = 20+ with 2+ campaigns)

TELEMETRY SETTINGS
  Enabled:          {true | false}
  Session summary:  {auto | always | off}   ← the [session] line at session end
  Cost alerts:      {on | off}  at thresholds: {list or "default ($5,$15,$30...)"}
  Hook timing:      {on | off}
  Audit log:        {on | off}
  — or, when harness.json is absent —
  (harness.json not found — defaults active)
  → Run /do setup to unlock cost tracking, configure thresholds, and register your install.

COMMAND DIRECTORY
  /telemetry                            This screen
  /telemetry --costs                    Cost breakdown only
  /telemetry --hooks                    Hook activity only
  /telemetry --verify                   Telemetry/artifact integrity check (hash/signature verification)
  /cost                                 Deep cost exploration by session/campaign/week
  /dashboard                            Full harness state (campaigns, fleet, all costs)

  node scripts/session-tokens.js --today   Today's sessions with exact token counts
  node scripts/session-tokens.js --all     All-time totals (real data, not estimates)

  cat .planning/telemetry/session-costs.jsonl   Raw session cost log
  cat .planning/telemetry/hook-timing.jsonl     Raw hook execution log
  cat .planning/telemetry/audit.jsonl           Raw tool call audit log

CONTROLS
  /telemetry off                        Disable session summary + reduce verbosity
  /telemetry on                         Re-enable
  /telemetry --threshold N              Alert every $N (writes to harness.json)
  /telemetry --config                   Edit settings interactively
Step 3: SUB-COMMAND HANDLING

/telemetry off: Set telemetry.sessionSummary = "off" and telemetry.costAlerts = false in harness.json. Output: "Telemetry summary disabled. Hook safety checks remain active." Safety hooks (protect-files, circuit-breaker, external-action-gate) are never disabled.

/telemetry on: Set telemetry.sessionSummary = "auto" and telemetry.costAlerts = true. Output: "Telemetry re-enabled."

/telemetry --threshold N: Validate N is positive. Generate [N, N*2, N*5, N*10, N*20, N*50, N*100] (capped at 500). Write to harness.json under policy.costTracker.thresholds.

/telemetry --verify: Run the project verifier:

node scripts/verify-telemetry-integrity.js

The verifier scans .planning/telemetry/*.jsonl and .planning/artifacts/*.jsonl. Display verified, signed, legacy, tampered, invalid, and signature-warning counts. Use --strict-legacy only when old unsigned records should fail the check.

Output format:

=== Telemetry Integrity ===

file.jsonl
  Total records:    N
  Verified (hash):  N
  Verified (signed): N
  Legacy (no hash): N
  TAMPERED:         N
  Invalid JSON:     N
  Signature warnings: N

Status: CLEAN or FAILED

If any tampered records: list each with timestamp, event, and both the stored and expected hash (first 16 chars each). Tampering can indicate log corruption, manual edits, or a bug — not necessarily malicious.

If only legacy records (no tampered): note "Legacy records were written before telemetry integrity hashing was added. New telemetry and artifact records are hashed automatically."

/telemetry --config: Show current settings with the node -e "..." command to change each — don't auto-apply.

Step 4: ACCURACY BADGES

Always mark data source clearly:

  • [real] — data from Claude Code's native session JSONL (exact)
  • (est) — estimated from the fallback model ($1 base + $0.50/agent + $0.10/min)
  • (override) — manually entered by the user

Never blend real and estimated in the same total without flagging it.

What Telemetry Covers

Covered: session cost (real token data), duration/burn rate/message count, agent spawn count, hook timing and outcomes, campaign cost attribution, trust level.

Not covered (by design): per-tool-call cost, per-subagent cost isolation, real-time streaming token count.

Safety hooks always on (cannot be disabled): protect-files, external-action-gate, circuit-breaker, quality-gate.

Show full SKILL.md (369 more words)Show less

OTLP Export

The JSONL files under .planning/telemetry/ stay canonical. For standard observability stacks, scripts/telemetry-otlp-export.js translates new records into OTLP/HTTP JSON metrics and POSTs them to a collector. Byte offsets per source file live in .planning/telemetry/otlp-export-state.json, so repeat runs export only new records.

bash
# Preview the OTLP payload without sending or advancing state
node scripts/telemetry-otlp-export.js --dry-run

# Export new records to a local collector (/v1/metrics appended when the url has no path)
node scripts/telemetry-otlp-export.js --endpoint http://localhost:4318
MetricTypeSource file
citadel.session.cost.usdsum (delta), session.id / cost.source attributessession-costs.jsonl
citadel.session.tokenssum (delta), token.type attributesession-costs.jsonl
citadel.hook.duration.msgauge, hook.name attributehook-timing.jsonl
citadel.agent.runssum (delta), run.status / run.event attributesagent-runs.jsonl

--reset clears the offsets for a full re-export. On a non-2xx response or network error the exporter exits 1 without advancing state, so the next run retries the same records. Data point timestamps come from the JSONL records, never the current clock. Test with node scripts/test-telemetry-otlp.js.

Local collector demo: examples/otel-collector/ contains a ready-made collector config (OTLP HTTP receiver on 4318, debug exporter to stdout) and a README with the two-command flow: docker run with the config mounted, then node scripts/telemetry-otlp-export.js --endpoint http://localhost:4318. Without Docker, --dry-run prints the exact OTLP payload instead.

Quality Gates

  • Never show raw JSONL to the user — always parse and format
  • Cost totals must be labeled with their source (real / est / mixed)
  • /telemetry off must NOT disable safety hooks — make this explicit in output
  • Relative timestamps required — no raw ISO strings in output
  • If all data sources are missing, show the empty-state version with setup hint

Fringe Cases

  • .planning/telemetry/ missing: Show empty state with "Run /do setup to initialize telemetry."
  • session-tokens.js unavailable: Fall back to session-costs.jsonl; mark (est).
  • harness.json missing: Show "(harness.json not found — defaults active)" and "→ Run /do setup to unlock cost tracking."
  • telemetry.enabled: false: Show banner "Telemetry is disabled. Run /telemetry on to re-enable."
  • --verify with missing files: Report "No telemetry or artifact JSONL files found." Not an error.
  • --verify when scripts/verify-telemetry-integrity.js is unavailable: Report that the verifier is missing and show the raw file paths to inspect; do not claim hash verification ran.

Contextual Gates

Disclosure: Read-only by default. --threshold, off, on, --config write harness.json. Reversibility: amber — harness.json writes; undo with git checkout .claude/harness.json. Trust gates: Any — no restrictions.

Exit Protocol

/telemetry does not produce a HANDOFF block. It is a read-only observability tool (except for --threshold, off, on, --config which write harness.json). After displaying output, wait for the next user command.

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

Files

Just SKILL.md in skills/telemetry of SethGammon/Citadel.

Open the folder on GitHubat commit e41ff1d

Compare with similar skills

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.

Telemetry compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telemetry this skillSethGammon/Citadel922—~2.9kAutomated safety check: WarnMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k34 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 34 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    794 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from SethGammon/Citadel

All 48 skills in this repo
  • Create Skill

    SethGammon/Citadel

    Creates new skills from the user's repeating patterns. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Houseclean

    SethGammon/Citadel

    Cross-drive storage audit and cleanup. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.2k tokensUpdated 6 days ago
    Auto-check passed
  • Loop

    SethGammon/Citadel

    Bounded foreground repetition for the current session. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.4k tokensUpdated 6 days ago
    Auto-check passed
  • Triage

    SethGammon/Citadel

    GitHub issue and PR investigator. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • Watch

    SethGammon/Citadel

    File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills.

    922 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check passed
  • Archon

    SethGammon/Citadel

    Autonomous multi-session campaign agent. An agent skill from SethGammon/Citadel.

    922 GitHub stars~5.4k tokensUpdated 6 days ago
    Auto-check passed

Categories

Questions about Telemetry

What does Telemetry do?

Unified telemetry hub. An agent skill from SethGammon/Citadel. Telemetry is an agent skill from SethGammon/Citadel. Unified telemetry hub.

When should I use Telemetry?

Telemetry fits situations like: agent Workflows work in your project.

How do I install Telemetry in Claude Code?

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

How do I install Telemetry in Codex?

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

Can I use 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 SethGammon/Citadel --skill 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/telemetry, .gemini/skills/telemetry, .github/skills/telemetry and .opencode/skills/telemetry in your project.

What does Telemetry need to run?

Going by SKILL.md and its folder, Telemetry needs the command-line tools its instructions call (node, docker and git). Our summary lists: Docker.

Does Telemetry access the network?

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

Is Telemetry safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Telemetry use?

Telemetry is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Telemetry use?

About 2.9k tokens (SKILL.md is roughly 12k 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 Telemetry?

Skills that share tags, products or a category with Telemetry: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Telemetry?

SethGammon (a GitHub user) maintains it in SethGammon/Citadel, which has 922 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 1, 2026.

Source: SethGammon/Citadel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.