Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add dhslegen/digital-delivery-team --skill efficiency-metricsgit clone --depth 1 https://github.com/dhslegen/digital-delivery-teamWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dhslegen/digital-delivery-team/efficiency-metrics)<a href="https://agentmods.dev/skills/dhslegen/digital-delivery-team/efficiency-metrics"><img src="https://agentmods.dev/badge/skills/dhslegen/digital-delivery-team/efficiency-metrics/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/dhslegen/digital-delivery-team/efficiency-metrics"><img src="https://agentmods.dev/badge/skills/dhslegen/digital-delivery-team/efficiency-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.01422 |
| Opus 5 | $0.00015 | $0.00711 |
| Sonnet 5 | $0.00006 | $0.00284 |
| Haiku 4.5 | $0.00003 | $0.00142 |
Grade A, and why
efficiency-metrics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Efficiency Metrics
Triggers
- metrics-agent 启动 / /report 命令
Baseline 双口径(必须同时产生)
管道 A:历史同类项目工时
- 从最近 6 个月的真实项目里选 3–5 个可比案例
- 按阶段(需求 / 架构 / 前端 / 后端 / 联调 / 测试 / 文档)拆解实际工时
- 存入
baseline/historical-projects.csv(见模板格式)
管道 B:专家独立估算
- 架构师 + 项目经理各自独立估算(禁止在 PRD 之后参考任何实际产物)
- 两人估算差 > 20% → 开一次对齐会,消除差异
- 存入
baseline/estimation-rules.md
最终 baseline = 两者均值
- 封盘时机:/prd + /wbs 产出后、/impl 启动前
- 封盘命令:先解析
DDT_PLUGIN_ROOT;若baseline/baseline.locked.json不存在,再执行node "$DDT_PLUGIN_ROOT/bin/baseline.mjs" --lock --hist baseline/historical-projects.csv --expert baseline/estimation-rules.md --out baseline/baseline.locked.json - 封盘后禁止修改(防止后视偏差污染对比数据)
baseline/baseline.locked.json属于被交付项目目录,不属于插件源码目录
质量守门阈值(任一劣化即在报告首行标红 ⚠️)
- 覆盖率(branch)≥ 70%
- Review 阻塞级问题 = 0
- 验收标准通过率 = 100%
- 返工次数(相对基线)不上升
- 缺陷密度不上升
Report Structure(硬性,不可省略任一章节)
- 摘要:一句话结论 + ⚠️ 劣化告警(若有,必须是报告第一行)
- 阶段级对比表: | 阶段 | 基线(h) | 实际(h) | 节省(h) | 提效% | (按"提效%"降序排,负值表示劣化)
- 质量守门表:覆盖率 / 阻塞级 / 验收通过率 / 返工次数 / 缺陷密度
- 三个分析问题的回答:
- 哪个阶段提效最多?为什么?
- 哪个阶段提效最少或劣化?根因是什么?
- 下次怎么优化?给出 ≤ 3 条可执行建议
- Top 3 优化建议(必须可执行,不能是"加强 XX")
- 原始数据链接:events.jsonl 路径 + metrics.db dump 命令
数据链路(hooks → 脚本 → 报告)
hooks → ~/.claude/delivery-metrics/events.jsonl → bin/aggregate.mjs → metrics.db ┐
├→ bin/report.mjs → docs/efficiency-report.raw.md
baseline/historical-projects.csv + baseline/estimation-rules.md │
→ bin/baseline.mjs → baseline/baseline.locked.json ────────────────────────┘
docs/efficiency-report.raw.md → metrics-agent → docs/efficiency-report.md
events.jsonl 字段结构:
{"event":"session_start","ts":"2026-01-01T00:00:00Z","project_id":"<id>","data":{"session_id":"<uuid>","cwd":"<path>"}}
{"event":"session_end","ts":"2026-01-01T01:00:00Z","project_id":"<id>","data":{"session_id":"<uuid>","tokens_input":1000,"tokens_output":500}}
{"event":"pre_tool_use","ts":"2026-01-01T00:10:00Z","project_id":"<id>","data":{"session_id":"<uuid>","tool_name":"Write","file_path":"docs/prd.md"}}
{"event":"post_tool_use","ts":"2026-01-01T00:10:02Z","project_id":"<id>","data":{"session_id":"<uuid>","tool_name":"Write","success":true,"output_size":2048}}
{"event":"subagent_stop","ts":"2026-01-01T00:30:00Z","project_id":"<id>","data":{"session_id":"<uuid>","subagent_name":"product-agent","duration_ms":120000,"tokens_input":1000,"tokens_output":500}}
{"event":"quality_metrics","ts":"2026-01-01T00:40:00Z","project_id":"<id>","data":{"defects_critical":0,"defects_major":1,"defects_minor":2,"coverage_pct":72.5,"rework_count":0,"acceptance_pass_pct":100}}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 88 lines · 30 tokens per session scan A f515a0f127c8
efficiency-metrics is a skill published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 1,422 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
design-system-reference
Style guides and implementation rules for frontend design. Works with design-discovery agent which handles context gathering and VS-based style recommendations. Contains detailed style guides, anti-patterns, and implementation checklists.
team-memory-protocol
A shared-memory process for teams of coding agents working on the same build. It stores project knowledge, shared context, and task progress in separate files or repositories.
knowledge-wiki
A tool that turns useful lessons from coding sessions into general articles for a team wiki. A wiki is a collection of linked reference pages, and this one can be kept locally or shared through a Git repository.
handdrawn-diagram
Generate a hand-drawn (sketch-style) architecture or flow diagram as a committable image (SVG + PNG). Use when the user wants a sketch-aesthetic diagram for a README, docs, or hackathon/Devpost submission that still has correct, legible text and per-group color. Authors a Mermaid look:handDrawn source and renders it…
code-review-levels
Reference documents for deep code review (Level 3) and architecture review (Level 4). Used by code-reviewer agent for advanced review levels.
version-sentinel
Use when adding, bumping, or changing a dependency in package.json, requirements.txt, constraints.txt, pyproject.toml, Cargo.toml, .csproj, .fsproj, or .vbproj. Triggered automatically by version-sentinel's PreToolUse hook (where the host supports hooks) — this skill explains how to satisfy the block and record a…