specforge CLAUDE.md

specforge CLAUDE.md is an instructions file for coding agents from WangLiquan/specforge. It costs 918 tokens per session, scanned A, original, MIT.

Project instructions for SpecForge, a tool that turns unclear requirements into visual specification pages and checks completed work against those specifications. It also documents which files are original sources and which are generated copies.

In plain words
What is it for?
Use it when changing SpecForge, especially its specification format, rendering and checking commands, build process, version numbers, or rules for validating completed work.
Why use it?
It prevents generated files from being edited directly and helps keep specifications, source code, and distributed files consistent.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/wangliquan/specforge/claude-md
Clone the repo
git clone --depth 1 https://github.com/WangLiquan/specforge

Wrote 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.

agentmods badge for specforge CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/wangliquan/specforge/claude-md.svg)](https://agentmods.dev/instructions/wangliquan/specforge/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/wangliquan/specforge/claude-md"><img src="https://agentmods.dev/badge/instructions/wangliquan/specforge/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 918 This file is loaded in full into every session.
When invoked 918 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00918 $0.00918
Opus 5 $0.00459 $0.00459
Sonnet 5 $0.00184 $0.00184
Haiku 4.5 $0.00092 $0.00092

Measured 3d ago against content hash 09c7234196e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

specforge CLAUDE.md 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 3d 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.

CLAUDE.md · 31 lines

How it starts

The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SpecForge

两个 skill:specforge-draft(把模糊需求拷问成可视化 *.spec.html)+ specforge-verify(拿 spec 逐条验落地产物,双出口:把判定回写进自产 spec.html + 在对话里给差距清单,不当 fixer,修复交常规编辑)。定位是「任何要想清楚、定下来、再回头验收的事」,代码只是最常见的产物——不是前提(详见两个 SKILL.md 的 description)。

源 vs 派生产物(红线)

  • lib/(渲染/抽取逻辑)、schema/spec.schema.json
  • 派生skills/*/scripts/*.mjs(由 lib/ esbuild 打包)、skills/*/references/*.json(由 schema/ 同步)、.claude-plugin/{plugin.json,marketplace.json}version 字段(由 package.json.versionscripts/sync-version.mjs 同步)。
  • 改了 lib/ / schema/,或 bump 了 package.json version 后,必须跑 npm run build 重新生成派生文件再提交,否则 npm run check(CI 同款)的一致性校验会拦。
  • 禁止手改 skills/*/scripts/*.mjs 或这两处 plugin/marketplace 的 version——都是派生产物,下次 build 会覆盖。版本号唯一真源是 package.json.version

关键契约

  • spec.html 数据岛 DOM id = specforge-data(draft 注入、verify 抽取的唯一契约)。改动它须同步:lib/render-spec.mjs 注入、lib/extract.mjs 正则、showcase.htmltest/* 断言。
  • verify 两条 CLI:extract-main.mjs 抽 spec JSON 给 agent 逐条判定;annotate-main.mjs 把 verdicts 合并进 spec 并原地重渲染 spec.html(注入徽标/覆盖率条 + verifiedAt)。render-spec.mjs 是双模式:无 verdicts 出素 spec,有 verdicts 注入验收态。
  • 回写边界:annotate 只写回 generatorspecforge-draft* 自产 spec,外部 generator(如 echo-spec)exit 3 拒绝。schema/spec.schema.jsonverdicts/verifiedAt 是可选字段(素 spec 无此字段)。
  • judge/fixer 分离红线:verify 回写改的是 spec 自身(需求的验收态),绝不改被验产物(代码/文档/配置)——运动员不当裁判。

校验

  • npm run check = schema 同步检查 + bundle 一致性检查 + version 一致性检查(三处 version)+ node --test 全部测试。

分发

  • 两条通道并存、命名空间隔离:npx skills add WangLiquan/specforge(skill 通道)与 Claude Code /plugin(plugin 通道,靠根目录 .claude-plugin/{plugin.json,marketplace.json})。加 plugin manifest 是纯 additive,不影响 skill 通道。发版流程:bump package.json version → npm run build → commit → git tag -a vXgit push --tags

发布

  • showcase.html(spec 示例)/ index.html(落地页)经 GitHub Pages 发布:branch deploy(main 分支 / 根路径),靠根目录 .nojekyll 原样托管静态文件,URL https://wangliquan.github.io/specforge/。无 Pages workflow。
  • README 首屏截图在 assets/spec-showcase.png,由 Playwright 截 showcase 页生成——改了 showcase 的视觉后需重新截图再同步 README,否则首屏与真实产物脱节。

Read the full file on GitHub · 31 lines

Changes

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.

  1. 3d ago First seen · 31 lines · 918 tokens per session scan A 09c7234196e4

Subscribe to this mod's changes

specforge CLAUDE.md is an instructions file published in the GitHub repository WangLiquan/specforge (2 stars, last pushed 2mo ago), licensed MIT. It adds 918 tokens to every session, about $0.0046 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.