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 KtKID/x-dev-pipeline --skill x-specgit clone --depth 1 https://github.com/KtKID/x-dev-pipelineWrote 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/ktkid/x-dev-pipeline/x-spec)<a href="https://agentmods.dev/skills/ktkid/x-dev-pipeline/x-spec"><img src="https://agentmods.dev/badge/skills/ktkid/x-dev-pipeline/x-spec.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.1 | $0.00191 | $0.07089 |
| Opus 5 | $0.00096 | $0.03544 |
| Sonnet 5 | $0.00038 | $0.01418 |
| Haiku 4.5 | $0.00019 | $0.00709 |
Grade A, and why
x-spec 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 6d 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 — 438 lines — stays where its author put it; the contents beside it link to each section on GitHub.
x-spec 系统方案规划器
核心定位
x-spec 是方案型 skill,负责把一个模糊的系统想法整理成可导航、可拆分、可演进的方案文档体系。
x-spec 负责:
- 从第一性原理推导用户需求的本质:用户真正要改变的系统结果、关键约束、不可破坏的不变量
- 判断当前上下文是否满足 spec 立项所需目标;缺关键目标时进入头脑风暴模式
- 给出合理设计方案,并为每个关键判断写明判断依据、这样做的原因、缺失后的后果
- 产出系统级方案目录和总导航 README
- 拆分系统模块,定义模块职责、边界、依赖、状态
- 标记哪些模块已足够稳定,可以进入 x-req
- 建立 spec 需求包与 task 的映射关系
- 还不够稳的模块要在90-task-map.md进行记录,并写清楚需求还没确认,不能进入开发
绝对禁止:
- 需求目标不明确就糊弄过去
- 用户没同意就强行保存文档,除非用户说你全权负责
- 当前环境下过度设计
核心边界: x-spec 输出系统组织方案;具体代码开发进入 x-req / x-dev。
第一性原理产物链路
事实 / 约束 / 不变量 / DoD
→ 必要能力集合
→ 模块划分
→ 边界类
→ task
→ 验证方式
适用场景
以下情况优先使用 x-spec:
- 用户给的是模糊想法或系统方向
- 涉及多个模块、多个阶段、多个 task
- 方案讨论比代码实现更重要
- 当前不确定该不该拆分
- 一个文档可能会非常长,需要拆成导航 + 子文档
- 需要先形成系统级共识,再进入开发
以下情况优先走其他入口:
- 小功能、小修复、单文件改动 → x-req 定级 Q0/Q1
- 已经有稳定需求报告(README.md),只差 dev-checklist/dev → x-req
- 用户明确要求立即开发一个清晰范围的功能 → x-req 定级后续接 x-dev
文档生成规则
模板是文档格式正源,skill 本体只负责判断、收敛、调度和审核。
- 先读
skills/x-spec/templates/TEMPLATE_GUIDE.md,再复制各模板写入docs/spec/<spec-name>/ - 图表规范以
skills/x-spec/templates/TEMPLATE_GUIDE.md「图表规范」为准:图内嵌于其文字真源文件(不单设图集),默认只画03-core-workflows.md的核心时序,其余按需 - 路径引用规则以
skills/x-spec/templates/TEMPLATE_GUIDE.md为准 - 每个关键结论都要回答:为什么重要、判断依据、缺失后的后果、落到哪个产物
原则
- spec 需求包是独立可传递的文档包:拿走
docs/spec/<spec-name>/给任何人,不依赖dev-pipeline/tasks/ docs/spec/README.md只做导航和 spec 状态汇总,不堆内容- spec README 只做导航和目标概述,细节在子文档
- 子文档按编号排序,方便顺序阅读
路径引用规则(硬约束)
spec 需求包必须能整体移动。规则条文正源:templates/TEMPLATE_GUIDE.md「路径引用规则」;机器把关:python3 tools/xdev.py validate <包目录>(规则 V2)——本节不复读条文。速记:包内链接只用 ./...,代码路径只写 repo:<path> 纯文本。
状态定义(真源)
spec 与模块共用以下状态机;其它位置只引用本节,不再重复枚举取值。
- 探索中:边界未定,仍在收敛
- 方案确认:边界与 DoD 已定,尚未拆 task
- 可进入 x-req:可派生 task 进入 x-req
- 开发中:已派生的 task 正在实现
- 已完成:派生的 task 全部完成并验收
spec 状态反映整个需求包的进度;模块状态反映单个模块的进度;两者取值范围相同。
子 agent 使用边界(真源)
公理:子 agent 没有对话上下文(能力弱)。因此 x-spec 里子 agent 只有两个角色,共同形状:只读、只回带指针(文件+行号)的判定/证据清单、不生成产物内容——判定 + 指针一跳可核实(让谎言昂贵),而总结/扩写的忠实性要重读全文才能核对,核实成本 ≈ 自己写,必亏。
- 斥候(步骤 3,可选):调研现有代码,回收可复用清单
- 裁判(步骤 6.2):以 01 为公理审核产物,回收 P0/P1 判定清单
What ships with it
9 files 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.
- templates/01-goals-and-boundaries.md 3.8 KB
- templates/02-module-breakdown.md 2.3 KB
- templates/03-core-workflows.md 2.1 KB
- templates/04-data-and-state.md 1.7 KB
- templates/05-validation-and-evolution.md 1.9 KB
- templates/90-task-map.md 735 B
- templates/module-README.md 371 B
- templates/README.md 2.3 KB
- templates/TEMPLATE_GUIDE.md 9.4 KB
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.
- 6d ago First seen · 438 lines · 191 tokens per session scan A 303e86cc6d5f
x-spec is a skill published in the GitHub repository KtKID/x-dev-pipeline (12 stars, last pushed 1mo ago), licensed MIT. It adds 191 tokens to every session and 7,089 once invoked, about $0.0010 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
procoder
Work like a senior developer in a repository governed by procoder: run the commit gate before calling anything done, format and lint through the binary, and drive the spec, plan, todo, backlog, and sprint chain in .procoder/. Use this skill when the repository contains a .procoder/ directory or an AGENTS.md naming…
maintainer-preflight
Use before claiming work is done, before committing, and before opening a PR in this repo — runs the mcp-server test/typecheck/build gates and the committed-bundle rule. Trigger on "done", "ready to commit", "open a PR", or any completion claim.
grok-routing
When to delegate coding work to Grok Build vs handle it in Claude. Use whenever the user asks for bulk edits, test backfill, migrations, boilerplate, exploratory prototypes, or whether to use /grok:delegate — and when reviewing whether a task is safe to hand to Grok.
repo-scope
Use when anyone asks what to work on next in this repo — "what's next", "anything left", "is there remaining work", "next task" — or before opening any PR the owner did not explicitly request. Enforces the docs/09 scope rule, whose default answer is: no work.
grok-first-mile
Onboarding and first-session guidance for the Grok Claude Code plugin. Use when the user is new to the plugin, asks how to use Grok, wants a tour, setup help, or what to try first — or when they just installed the plugin and need a clear starting path.
scope-lock
ALWAYS invoke before writing any code after a plan or spec is approved. Do NOT skip even if the plan is already in context. Triggers on: plan approval, spec approval, task kickoff, implementation start, '/scope-lock', 'set up the contract', 'lock scope'. Generates SCOPE.md boundary contract from the plan, enforces…