scaffold-check

scaffold-check is a command for Claude Code from snakeying/Textum. It costs 0 tokens per session (1,314 once invoked), scanned A, original, MIT.

A read-only checker for a project's GLOBAL-CONTEXT.md file, which documents technical choices, project structure, rules, permissions, data, naming, and API conventions. It reports either PASS or a list of specific FAIL items.

In plain words
What is it for?
Validating project context documentation and identifying exactly what must be corrected before running the split-plan step.
Why use it?
It catches missing sections, leftover placeholders, forbidden code blocks, and other structural problems before the project moves to the next planning step. It does not modify the file.

Command for Claude Code

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 commands/snakeying/textum/scaffold-check
Clone the repo
git clone --depth 1 https://github.com/snakeying/Textum

Made for: Claude Code.

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 scaffold-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/snakeying/textum/scaffold-check.svg)](https://agentmods.dev/commands/snakeying/textum/scaffold-check)
Your own site
<a href="https://agentmods.dev/commands/snakeying/textum/scaffold-check"><img src="https://agentmods.dev/badge/commands/snakeying/textum/scaffold-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,314 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01314
Opus 5 $0.00000 $0.00657
Sonnet 5 $0.00000 $0.00263
Haiku 4.5 $0.00000 $0.00131

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

Security

Grade A, and why

scaffold-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 4d 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.

outdated/.claude_outdated/commands/scaffold-check.md · 87 lines

How it starts

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

阶段2b: GLOBAL-CONTEXT 校验

读取:docs/GLOBAL-CONTEXT.md | 写入:无(只输出 FAIL/PASS;不修改文件) | 模板:N/A

输出 FAIL/PASS 清单;不修改任何文件

输出规则(只读)

  • 不输出 GC 原文
  • 若存在任何 FAIL
    • 输出 FAIL 清单(F-001 起编号;每条必须包含以下字段):
      • 定位:GC 章节路径(如 ## 4. 业务规则(必填))+(尽量)稳定ID(BR-### 等)或表格行语义定位;避免行号
      • 问题:1 句
      • 期望:可机械执行的“替换目标/格式”(能推导就写出来)
      • 影响:H/M/L
      • 修复:只给 1 个动作(通常是“把本 FAIL 清单粘贴给 /scaffold 并按定位逐条修正” + 本条的最小修改点)
    • 末尾追加:
      • 修正:将 FAIL 清单作为可选输入粘贴给 /scaffold,逐条修正 docs/GLOBAL-CONTEXT.md
      • 重跑:/scaffold-check
    • 然后结束
  • 否则(无 FAIL):输出 PASS,并在末尾追加:下一步:/split-plan

FAIL 校验项(机械性门禁)

0) 文件存在

  • docs/GLOBAL-CONTEXT.md 必须存在

1) 结构完整性(不得缺章)

必须包含以下一级章节(缺失即 FAIL):

  • ## 1. 技术栈(必填)
  • ## 2. 项目结构(必填)
  • ## 3. 枚举值定义(必填;无则写 N/A)
  • ## 4. 业务规则(必填)
  • ## 5. 权限矩阵(必填)
  • ## 6. 数据模型概览(必填;如无 DB 写 N/A)
  • ## 7. 命名规范(如适用;否则写 N/A)
  • ## 8. API规范(必填)

2) 占位符与代码块(不得残留)

  • GC 中不得出现 fenced code blocks(```);出现即 FAIL
  • GC 中不得残留任何模板占位符;命中任一即 FAIL
    • TBD
    • [...]
    • BR-###(仍为占位)
    • A/D/O
    • 4XX/5XX
  • 方括号使用规则(避免误伤路由/路径):在全文中若出现 []
    • 允许:Markdown 链接 [text](...)
    • 允许:路径/路由 token 中的 Next.js 风格动态段([ 必须紧跟在 /\\ 之后,且 [] 内不得包含空白、/\\),如 /posts/[slug]app/[id]/page.tsx
    • 其余一律视为模板占位符残留 → FAIL

3) 规则表最小可用性

  • 在第 4 节业务规则表(表头包含 | ID |)中:
    • 必须存在规则表(表头包含 | ID |),且至少 1 行数据
    • ID 列必须包含至少 1 条 BR-001 形式的 ID
    • ID 列中的 BR-001 形式 ID 必须唯一
    • 不得出现占位符 BR-###

4) 权限矩阵最小可用性

  • 第 5 节必须包含权限矩阵表格,且至少 1 行数据
  • 表格中每行 权限 必须严格为 A / D / O 之一
  • 不得出现 A/D/O

5) 噪音控制(不得把 PRD 片段塞进 GC)

  • docs/GLOBAL-CONTEXT.md 中不得出现任何 PRD 锚点引用(出现即 FAIL),包括任何 PRD#...<!-- PRD#... -->
  • 允许出现 docs/PRD.md 作为“来源文件名/描述”;但禁止引用 PRD 的具体位置/片段(如 PRD 章节号定位、或复制 PRD 原文大段)

6) 项目验证命令表(必须存在;可为 N/A)

  • 在第 2 节 ## 2. 项目结构(必填) 中必须包含小节:### 项目验证命令(如适用;否则写 N/A)
  • 该小节下必须存在表格,且表头必须为:| 类型 | 命令 | 说明 |
  • 表格必须至少包含 1 行数据(不含表头与分隔行)
  • 每行必须包含 3 列:类型 / 命令 / 说明(按 | 分隔)
  • 类型 必须为以下之一:
    • gate:<name>(失败阻断)
    • opt:<name>(失败仅记录非阻断项)
    • N/A
  • 若某行 命令 = N/A:该行 类型说明 也必须为 N/A
  • 若某行 命令 != N/A:该行 类型 必须以 gate:opt: 开头;不得为 N/A

Read the full file on GitHub · 87 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. 4d ago First seen · 87 lines · 0 tokens per session scan A d7cda8ede048

Subscribe to this mod's changes

scaffold-check is a command published in the GitHub repository snakeying/Textum (41 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,314 tokens. 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.