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 agentmods add skills/yibie/spec-agents.md/checknpx skills add yibie/SPEC-AGENTS.md --skill checkgit clone --depth 1 https://github.com/yibie/SPEC-AGENTS.mdWrote 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/yibie/spec-agents.md/check)<a href="https://agentmods.dev/skills/yibie/spec-agents.md/check"><img src="https://agentmods.dev/badge/skills/yibie/spec-agents.md/check.svg" alt="Measured on agentmods" 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 | $0.00067 | $0.02320 |
| Opus 5 | $0.00034 | $0.01160 |
| Sonnet 5 | $0.00013 | $0.00464 |
| Haiku 4.5 | $0.00007 | $0.00232 |
Grade A, and why
check 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 today.
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 — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Check
用证据判断“实现是否满足已经确认的契约”。默认只读,不在检查过程中改代码或重写计划。
独立性声明
开头写明:本次 check 是否由执行 do 的同一上下文完成。
同一上下文时,下面的「权威落点」一项需要正面举证 —— 点名落点、点名地图条目、 说明两者相符 —— 而不是「没看出问题」。选择落点的上下文去审自己选的落点,是在 复核自己的决定;真实事故中的 15 条违例是独立 reviewer 发现的,不是自审发现的。
不强制独立执行:强制会让每个小改动都变贵。这里只是把盲区变成显式的。
固定比较基点
确定一个比较基点。读取变更相关的 .spec-agents/doctrine/docs/WORKFLOW.md、
CONTEXT.md、项目 .spec-agents/state/KERNEL.md、Protocol、Runbook、Lesson 和 AGENTS.md。
只读取与当前意图相关的知识记录,不要加载整个 docs/,也不要只凭 diff
猜意图。
比较基点按路径取:
- SPEC 路径:另读相关
SPEC.md和目标 Slice,契约轴对着它们比。 - 短路径(
plan直接approve):没有 SPEC 也没有 Slice,契约轴对着plan交出的那句验收比,加上.spec-agents/state/KERNEL.md、Protocol 和AGENTS.md。 不要因为找不到 SPEC 就跳过契约轴,也不要为此创建 Slice。
三条轴在两条路径上都要跑。
三条检查轴
契约
- 目标、边界和 out-of-scope 是否符合 SPEC;
- 项目概念、身份、关系、生命周期和不变量是否符合
.spec-agents/state/KERNEL.md;框架工作流 语义是否符合.spec-agents/doctrine/docs/WORKFLOW.md与CONTEXT.md; - Action Contract 和稳定接口是否符合 Protocol;
- 相关代码实践、Runbook 前置条件和 Lesson 的
applies_when是否满足; - 旧行为是否仍被验证,新行为是否有明确证据。
权威落点。 符合 .spec-agents/state/KERNEL.md 不等于落在对的位置:第二份实现完全符合每一条
概念、身份、关系、生命周期和不变量,它只是多了一个。本体影响必答对它也会答
「否」——它没新增任何概念,那条规则 Kernel 里早就有。所以要单独核:
- 这条规则已经有权威落点了,本次改动是不是在第二个位置又实现了一遍?
- 前端/客户端是不是复制了一份服务端已经强制的规则?
- 派生状态是不是被持久化了两次?
- 切片写了
n/a的话,对着 diff 看它是否属实 —— 这次改动真的没有碰到任何 已有归属的规则吗?arrange只读意图,核不了这一条;check读得到 diff, 这里是唯一能核的地方。
命中任何一条,产出 semantic 发现交回 plan:要么改回权威落点,要么经
plan 修 Kernel 的地图,不允许沉默分叉。允许存在的第二落点必须有同输入等价
测试,见 .spec-agents/doctrine/docs/single-authority.md。
注意单测全绿不构成反证:与实现同层的测试无法证明实现在正确的层,测试和 错误落点是同一个决定的两个结果。
工程
- 测试、类型、错误处理、安全、可访问性和仓库规范;
- 是否存在数据丢失、状态泄漏或未覆盖的调用方;
- 项目自己的
docs/protocols/与编码约定。
在项目自身约定之上,叠加这份 smell 基线。它来自 Fowler 的 Refactoring, 是跨语言跨项目通用的判据,不是本框架发明的规则:
| Smell | 判据与处置 |
|---|---|
| Mysterious Name | 名字讲不清它是什么;改名,改不动就说明设计需要重想 |
| Duplicated Code | 同一段逻辑出现多处;抽出可复用形式 |
| Feature Envy | 一个方法主要在动别的对象的数据;把方法搬过去 |
| Data Clumps | 几个字段总是一起出现;打包成一个类型 |
| Primitive Obsession | 用基本类型冒充领域概念;建立类型 |
| Repeated Switches | 同一组条件分支反复出现;换成多态或映射表 |
| Shotgun Surgery | 一次改动散落到很多文件;把它们合并到一处 |
| Divergent Change | 一个文件为互不相关的原因被反复修改;按职责拆开 |
| Speculative Generality | 为想象中的需求做的抽象;SPEC 没要求就删掉 |
| Message Chains | a.b().c().d() 式的长导航;用一个方法封装 |
| Middle Man | 一个类大部分方法只是转发;直接调真正的目标 |
| Refused Bequest | 子类用不上继承来的大部分东西;改用组合 |
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed 576b8f51a110
- 5d ago First seen · 163 lines · 67 tokens per session scan A 1ae51f1dc7ce
check is a skill published in the GitHub repository yibie/SPEC-AGENTS.md (126 stars, last pushed 4d ago), licensed MIT. It adds 67 tokens to every session and 2,320 once invoked, about $0.0003 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-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…