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 commands/linfee/spec-kit-cn/tasksgit clone --depth 1 https://github.com/Linfee/spec-kit-cnWhat 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.00025 | $0.02551 |
| Opus 5 | $0.00013 | $0.01275 |
| Sonnet 5 | $0.00005 | $0.00510 |
| Haiku 4.5 | $0.00003 | $0.00255 |
Grade A, and why
tasks 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.
How it starts
The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.
用户输入
$ARGUMENTS
在继续之前,你必须考虑用户输入(如果不为空)。
执行前检查
检查扩展钩子(任务生成前):
- 检查项目根目录下是否存在
.specify/extensions.yml - 如果存在,读取该文件并查找
hooks.before_tasks键下的条目 - 如果 YAML 无法解析或无效,静默跳过钩子检查并正常继续
- 过滤掉
enabled显式为false的钩子。没有enabled字段的钩子默认视为已启用 - 对于每个剩余的钩子,不要尝试解释或评估钩子的
condition表达式:- 如果钩子没有
condition字段,或为 null/空,则将钩子视为可执行 - 如果钩子定义了非空的
condition,则跳过该钩子,将条件评估留给 HookExecutor 实现
- 如果钩子没有
- 对于每个可执行的钩子,根据其
optional标志输出以下内容:- 可选钩子 (
optional: true):## 扩展钩子 **可选前置钩子**: {extension} 命令: `/{command}` 描述: {description} 提示: {prompt} 执行方式: `/{command}` - 必选钩子 (
optional: false):## 扩展钩子 **自动前置钩子**: {extension} 正在执行: `/{command}` EXECUTE_COMMAND: {command} 等待钩子命令的结果后再继续执行大纲。
- 可选钩子 (
- 如果没有注册钩子或
.specify/extensions.yml不存在,静默跳过
大纲
-
设置: 从仓库根目录运行
{SCRIPT}并解析 FEATURE_DIR 和 AVAILABLE_DOCS 列表。所有路径必须是绝对路径。对于参数中的单引号(如 "I'm Groot"),使用转义语法: 例如 'I'''m Groot'(或尽可能使用双引号: "I'm Groot")。 -
加载设计文档: 从 FEATURE_DIR 读取:
- 必需: plan.md(技术栈、库、结构),spec.md(带优先级的用户故事)
- 可选: data-model.md(实体),contracts/(接口契约),research.md(决策),quickstart.md(测试场景)
- 注意: 不是所有项目都有所有文档。根据可用的文档生成任务。
-
执行任务生成工作流:
- 加载 plan.md 并提取技术栈、库、项目结构
- 加载 spec.md 并提取用户故事及其优先级(P1, P2, P3 等)
- 如果存在 data-model.md: 提取实体并映射到用户故事
- 如果存在 contracts/: 将接口契约映射到用户故事
- 如果存在 research.md: 提取用于设置任务的决策
- 按用户故事组织任务生成(见下方任务生成规则)
- 生成依赖关系图,显示用户故事完成顺序
- 为每个用户故事创建并行执行示例
- 验证任务完整性(每个用户故事都有所需的所有任务,可独立测试)
-
生成 tasks.md: 使用
templates/tasks-template.md作为结构,填充以下内容:- 从 plan.md 获取正确的功能名称
- Phase 1: 设置任务(项目初始化)
- Phase 2: 基础任务(所有用户故事的阻塞性前置条件)
- Phase 3+: 每个用户故事一个阶段(按 spec.md 中的优先级顺序)
- 每个阶段包括: 故事目标、独立测试标准、测试(如有请求)、实现任务
- 最终阶段: 收尾与横切关注点
- 所有任务必须遵循严格的清单格式(见下方任务生成规则)
- 每个任务的清晰文件路径
- 显示故事完成顺序的依赖关系部分
- 每个故事的并行执行示例
- 实现策略部分(MVP 优先,增量交付)
-
报告: 输出生成的 tasks.md 路径和摘要:
- 总任务数
- 每个用户故事的任务数
- 识别出的并行执行机会
- 每个故事的独立测试标准
- 建议的 MVP 范围(通常仅用户故事 1)
- 格式验证: 确认所有任务都遵循清单格式(复选框、ID、标签、文件路径)
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.
- 3d ago First seen · 204 lines · 25 tokens per session scan A 541bbc157b67
tasks is a command published in the GitHub repository Linfee/spec-kit-cn (695 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 2,551 once invoked, about $0.0001 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 commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.