bdfinst/agentic-dev-team/performance-metrics

Claude Code and agent skill by bdfinst/agentic-dev-team

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Log task completion data to .claude/metrics/. Use at the end of every task to record tokens, cost, agents used, rework cycles, and hallucination events. Also use for periodic reporting to identify efficiency and quality trends.

Install

npx vskill@latest install bdfinst/agentic-dev-team/performance-metrics

SKILL.md

The same SKILL.md was published earlier as bdfinst/agentic-dev-team/performance-metrics.

Performance Metrics

Overview

Schema and procedures for capturing performance data in .claude/metrics/. Metrics enable evidence-based evaluation of agent effectiveness, cost efficiency, and quality outcomes.

Constraints

  • Never log credentials, API keys, or PII in metric entries
  • Log entries are append-only; do not modify or delete existing JSONL records
  • Log at task completion, not mid-task; mid-task state belongs in .claude/memory/ progress files
  • Use the defined JSONL schema; do not invent new top-level fields without updating the reference

Metric Categories

Targets discipline. Per CLAUDE.md → "Claims discipline", a numeric target
may only ship if an instrument measures it. The instrumented metrics below cite
their sensor; the rest read "Aspirational — no sensor yet" until one exists
(tracked by #102 cost metering and #106 telemetry). Do not reintroduce bare
numeric targets — tests/docs/prose_honesty_test.bats enforces this across all
shipped prose.
Efficiency Metrics
MetricDescriptionTarget
Task completion timeWall-clock time from request to deliveryTrack trend, no fixed target
Token usage per taskTotal input + output tokens consumedMinimize for comparable quality
Agent loading overheadTokens spent on agent/skill file readsAspirational — no sensor yet
Context summarization frequencyHow often summarization triggers per taskAspirational — no sensor yet
Quality Metrics
MetricDescriptionTarget
First-pass acceptance rateTasks accepted without reworkAspirational — no sensor yet
Rework countNumber of revision cycles per taskAspirational — no sensor yet
Hallucination incidentsOutputs containing fabricated informationAspirational — no sensor yet
Accuracy scoreCorrectness of structured data extractionAspirational — no sensor yet
Test coveragePercentage of code covered by generated testsTrack per project
Cost Metrics
MetricDescriptionTarget
Cost per taskTotal API cost (input + output tokens at rate)Track trend
LLM routing ratioPercentage of tasks routed to each LLMTrack distribution
Selective loading savingsTokens saved vs. loading all agentsAspirational — no sensor yet

Log Format

Metrics are stored in .claude/metrics/ as JSONL files (one JSON object per line).

File Naming
.claude/metrics/{date}-task-log.jsonl

Example: .claude/metrics/2026-02-20-task-log.jsonl

Task Completion Entry

Logged at the end of each task:

json
{
"timestamp": "2026-02-20T14:30:00Z",
"task_id": "unique-id",
"task_type": "implementation",
"task_description": "Build REST API for user authentication",
"agents_used": ["software-engineer", "architect"],
"skills_used": ["hexagonal-architecture"],
"tokens": {
"input": 12500,
"output": 3200,
"total": 15700
},
"cost_usd": 0.043,
"llm": "opus",
"handoffs": 0,
"phases": 2,
"rework_cycles": 1,
"accepted": true,
"hallucination_detected": false,
"duration_seconds": 180
}
Field Reference
FieldTypeDescription
timestampstringISO 8601 completion time
task_idstringUnique identifier for this task
task_typestringimplementation, design, bugfix, testing, documentation, analysis
task_descriptionstringBrief description of the task
agents_usedstring[]Agent names that were loaded
skills_usedstring[]Skill names that were loaded
tokens.inputnumberInput tokens from API usage field
tokens.outputnumberOutput tokens from API usage field
tokens.totalnumberSum of input + output
cost_usdnumberEstimated cost based on token rates
llmstringModel ID used
handoffsnumberTimes the handoff skill was triggered (either mode)
phasesnumberNumber of loading phases
rework_cyclesnumberNumber of revision cycles
acceptedbooleanWhether the user accepted the output
hallucination_detectedbooleanWhether a hallucination was flagged
duration_secondsnumberWall-clock seconds from start to delivery
Cost Metering Entry (#102, #1094)

The Stop/SubagentStop hook (hooks/cost_meter.py → hooks/lib/cost_meter.py record) appends one entry per fire to .claude/metrics/cost-metering.jsonl — the running per-session token/cost summary parsed from the transcript. Full schema reference: knowledge/telemetry-schema.md.

json
{
"timestamp": "2026-07-18T14:30:00Z",
"transcript": "session.jsonl",
"total": {"input_tokens": 18000, "output_tokens": 3500, "cost_usd": 0.16, "messages": 12},
"by_model": {"<model-id>": {"cost_usd": 0.16, "input_tokens": 18000, "output_tokens": 3500}},
"by_thread": {"main": {"cost_usd": 0.10, "input_tokens": 10000, "output_tokens": 2000},
"subagent": {"cost_usd": 0.06, "input_tokens": 8000, "output_tokens": 1500}},
"by_agent_type": {"main": {"cost_usd": 0.10, "input_tokens": 10000, "output_tokens": 2000},
"security-review": {"cost_usd": 0.06, "input_tokens": 8000, "output_tokens": 1500}}
}
FieldTypeDescription
totalobjectSession-cumulative token counts, cost_usd, messages
by_modelobjectPer-model slim breakdown (cost_usd, input_tokens, output_tokens)
by_threadobjectmain vs subagent, from the native isSidechain flag
by_agent_typeobjectmain for main-loop turns; sidechain turns keyed by subagent type via the harness-recorded attributionAgent field or the Task-dispatch subagent_type/agentId join; unmappable sidechain spend lands in unattributed (#1094)

Privacy: token counts, dollar amounts, model identifiers, and thread/ agent-type identifiers only — never prompt text, code, file paths, or tool payloads. Attribution reads only fields the Claude Code harness itself writes to the transcript; the meter never guesses (see #170 for the buckets removed because the harness records no signal for them). Disable with DEV_TEAM_COST_METER=off. Report it with /cost-report.

Review Value Entry (#348)

/build appends one entry per inline review checkpoint to .claude/metrics/review-value.jsonl so the pipeline's review overhead becomes measurable — distinguishing a build where review caught and fixed a real defect from one where every loop passed no-op. This is the sensor that lets the plan/step tiering (the /plan plan-tier and /build per-step complexity routing) be right-sized with evidence rather than guessed.

json
{
"timestamp": "2026-06-22T14:30:00Z",
"plan": "plans/add-auth.md",
"slice": "2",
"step": "all",
"checkpoint": "slice",
"complexity": "standard",
"source": "build-checkpoint",
"agents_run": ["spec-compliance-review", "security-review"],
"issues_found": 1,
"severity_breakdown": {"errors": 1, "warnings": 0, "suggestions": 0},
"issues_fixed": 1,
"fix_iterations": 1,
"outcome": "fixed"
}
FieldTypeDescription
checkpointstringstep (per-step complex review), slice (batched slice-boundary review), or backstop (the Step-6 backstop pass, #1962)
sourcestringRow provenance — build-checkpoint (fix-applying /build inline checkpoint, the default when absent), build-backstop (fix-applying /build Step-6 backstop, #1962), or code-review (read-only standalone review). /harness-audit Step 4 excludes code-review rows from fix-rate drop-candidate logic (#1257); build-backstop rows are fix-applying and stay in it, and additionally drive the backstop-redundancy readout that gates --backstop-review=skip
outcomestringno-op, fixed, escalated, or — backstop rows only — skipped when --backstop-review=skip suppressed the pass. A skipped row records the suppression and is excluded from every rate (#1962)
diff_shapestringtest-only or mixed, from change_shape.py's isTestOnly (never eyeballed). Splits per-lens outcomes by diff shape so a test-only lens gate can be justified by measurement rather than intuition (#1964)
stepstringN.M for a per-step checkpoint; all for a batched slice checkpoint
agents_runstring[]Review agents and static-analysis lane tools run at this checkpoint
issues_foundnumberActionable issues the checkpoint surfaced (semantic review + static lanes)
severity_breakdownobject{errors, warnings, suggestions} counts (same enum as /code-review); the three sum to issues_found. Lets /harness-audit Step 3 flag low-value (mostly-minor) lenses (#1256)
issues_fixednumberOf those, how many were auto-fixed
fix_iterationsnumberReview-fix and static self-heal fix-loop iterations consumed
outcomestringno-op (passed clean), fixed (found + fixed), escalated (a fix loop didn't converge — including a static lane capping out)

Privacy: counts and outcomes only — never prompt text, code, or file content, consistent with the cost meter's privacy boundary. Disable with DEV_TEAM_REVIEW_VALUE=off. Report it with /cost-report (its "review value" section).

Verify Log Entry (#727)

/build appends one entry per slice with a runtime surface to .claude/metrics/verify-log.jsonl (sub-step 4.9) — evidence that the project's own test/verification tooling actually exercised the change end-to-end before the slice was marked done, or was explicitly skipped because the diff had no runtime surface to drive. This is the sensor that closes the gap the #727 investigation found: a "done" feature that fails the first time it's really run means runtime verification was either skipped or never mandated in the first place.

json
{
"timestamp": "2026-07-02T14:30:00Z",
"plan": "plans/add-auth.md",
"slice": "2",
"branch": "feat/add-auth",
"files": ["src/api/auth.py"],
"outcome": "ran",
"reason": null
}
FieldTypeDescription
branchstringCurrent branch name — ${CLAUDE_PLUGIN_ROOT}/scripts/progress_guardian.py --pre-pr matches on this
filesstring[]The slice's changed runtime files the verification was scoped to
outcomestringran (the verification ran and passed), skipped (no runtime surface — see reason), or failed-then-fixed (the verification failed at least once before the fix landed)
reasonstring \nullRequired when outcome is skipped (e.g. "tests-only", "docs-only"); null otherwise

Not disableable. Unlike Review Value logging (DEV_TEAM_REVIEW_VALUE=off), there is no env var to turn this off — ${CLAUDE_PLUGIN_ROOT}/scripts/progress_guardian.py --pre-pr fails closed on a branch with runtime-surface changes and no matching entry, and that gate is a correctness control, not a metrics-collection nicety.

When to Log

Task completion entries are written automatically by hooks/task_completion_metrics.py
on every Stop / SubagentStop event — skills no longer need a manual
"log this on completion" step. To surface task-specific values (task type,
agents used, hallucination flag, rework count, defect count, or a config
change), populate .claude/session-metrics.json before the session ends; the
hook reads and clears it. Leave the file absent for a minimal heartbeat entry.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
258
Repository forks
31
7-day trend score
28

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bdfinst/agentic-dev-team/performance-metrics/badge)](https://verified-skill.com/skills/bdfinst/agentic-dev-team/performance-metrics)

Something wrong with this skill or its page? Tell us.