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 unknowbug/anchorlaw --skill anchor-writegit clone --depth 1 https://github.com/unknowbug/anchorlawWrote 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/unknowbug/anchorlaw/anchor-write)<a href="https://agentmods.dev/skills/unknowbug/anchorlaw/anchor-write"><img src="https://agentmods.dev/badge/skills/unknowbug/anchorlaw/anchor-write/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/unknowbug/anchorlaw/anchor-write"><img src="https://agentmods.dev/badge/skills/unknowbug/anchorlaw/anchor-write.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.00041 | $0.00821 |
| Opus 5.5 | $0.00016 | $0.00328 |
| Sonnet 5.5 | $0.00008 | $0.00164 |
| Haiku 4.5 | $0.00004 | $0.00082 |
Grade A, and why
anchor-write 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 yesterday.
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.
This is a copy
92% identical to anchor.write — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
anchor.write — 写 Anchor 标注
Protocol: spec/protocol-v0.24.md §5.1/§5.2/§5.5, §13 Layer: L2 (Anchors) Execution: inline
触发场景
实现或重构完一个公开函数后,为该函数声明验证锚点。
规则
- 每个公开函数必须有 ≥1 个 test 或 ≥1 个 idk(§5.1 compile-time check)。
- @anchor.test 必须带 source(§5.5):
source="<type>:<binary_or_file>!<function>#<id>, offset=<addr>, <key_observations> observed <ISO8601>"- source 类型:
trace(动态调试快照)/memory(内存转储)→ 允许 @test static(静态分析推断)→ 仅允许 @idk;@test 用它或缺失 → INVALID
- source 类型:
- 无法验证的边界 → 诚实写 @anchor.idk(§5.2),禁止写假 test 凑数。
- source 字符串实现 MUST 原样保留(审计用途)。
- 跨载体/跨形态的 source 必须声明可比性(v0.22 §9.7.1):若该 anchor 的结论建立在对两个不同执行体/不同形态的观测上,source 之外 MUST 声明等价档位(E1 同载体单变量 / E2 跨载体 / E3 交错未知)与共同观测 key 集
S,并说明S之外为何无分支。E2 是正常档(跨版本/跨实现长期在此);E3 只能声称「在已记录交错下未发现差异」。 S之外的量不进等价判断(v0.22 §9.7.1 无效声明清单):计数恒等 ≠ 集合恒等;同口径 ≠ 无伪差;合理解释 ≠ 已验证;前提存在 ≠ 前提满足。- 副作用的逆单独登记(v0.22 §9.8):验证动作的 in-place 副作用(覆盖日志、重建 index、改门控默认值)MUST 在验证记录自己的字段里登记可寻址的逆或显式不可逆声明——不要写进
source=串(source 答「哪份记录支撑这个声称」,逆答「副作用如何被收容」,两件事)。
三语言语法(§13)
| 语言 | 声明位置 | 验证载体 |
|---|---|---|
| Python | 装饰器 | test_fn lambda |
| TypeScript | JSDoc 注释(inert) | 运行时 assert |
| C++ | 行注释 // @anchor.test("desc", source="...") / // @anchor.idk("desc")(inert) |
独立 probe binary |
输出
写入的 anchor 标注(含合法 source)。
约束
- 语义照 §5,不复制协议原文。
- 写完后跑
anchor.test验证。
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.
- yesterday Changed 6333076e4171
- 25d ago Changed 29d3720ccb21
- 1mo ago Changed · +3 lines 0e608e095883
- 1mo ago Changed bb8a4e8958a0
- 1mo ago Changed 02c042d12469
- 1mo ago First seen · 43 lines · 41 tokens per session scan A 97f82e30ec3f
anchor-write is a skill published in the GitHub repository unknowbug/anchorlaw (7 stars, last pushed 2d ago), licensed MIT. It adds 41 tokens to every session and 821 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to anchor.write, differing in 6 lines, and is treated as a copy.
Other skills, from other repositories
openspec-plus-tdd
MANDATORY skill that activates whenever code is written to implement an OpenSpec change task. Triggers: openspec-plus-apply is active, /opsx-apply is running, the user is implementing tasks from an OpenSpec change, an implementer subagent dispatched by openspec-plus-apply is starting work, or the user invokes phrases…
test-writer
Write tests with TDD following structured patterns. Ensures consistent AAA structure, proper coverage targets, and framework-specific conventions. Without this skill, tests lack consistent naming, miss coverage targets, and skip anti-pattern checks.
bugfix-quick
Fast bug fixes with root cause investigation + TDD. Enforces 'no fix without root cause' discipline and verification protocol. Without this skill, fixes are applied at symptoms instead of sources, and bugs return.
permanent-memory-loader
Loads permanentmemory.md summary lines (≤120 always-loaded tokens, hard cap 200). Surfaces durable wisdom from past Epics into the current session. Silent if .claude/memory/ does not exist.
refactor-expert
Guide safe, incremental refactoring that improves code quality without changing behavior.
drogon-gen-test
A test-case generator for Drogon applications using the DROGON_TEST framework. It can describe unit tests, integration tests, and asynchronous database tests.