21-任务执行纪律

21-任务执行纪律 is a skill for Claude Code, Codex from xcodethink/open-claude-code-skills. It costs 212 tokens per session (3,446 once invoked), scanned A, original, MIT.

A task-execution protocol that keeps an AI coding task within an agreed scope from start to finish. It uses a scope card, a task checklist, rules for handling new requests, and a final definition-of-done review.

In plain words
What is it for?
Use it to define deliverables, break larger tasks into tracked steps, monitor scope while working, handle legitimate scope changes, and verify the finished work.
Why use it?
It reduces missed requirements, unplanned work, and endless polishing. Explicit exclusions and verifiable completion criteria make it clearer what the agent should and should not do.

Skill for Claude CodeCodex

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 skills/xcodethink/open-claude-code-skills/21
Any agent
npx skills add xcodethink/open-claude-code-skills --skill 21
Clone the repo
git clone --depth 1 https://github.com/xcodethink/open-claude-code-skills

Made for: Claude Code, Codex.

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 21-任务执行纪律

README.md
[![agentmods](https://agentmods.dev/badge/skills/xcodethink/open-claude-code-skills/21.svg)](https://agentmods.dev/skills/xcodethink/open-claude-code-skills/21)
Your own site
<a href="https://agentmods.dev/skills/xcodethink/open-claude-code-skills/21"><img src="https://agentmods.dev/badge/skills/xcodethink/open-claude-code-skills/21.svg" alt="Measured on agentmods" height="20"></a>
Per session 212 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,446 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.00212 $0.03446
Opus 5 $0.00106 $0.01723
Sonnet 5 $0.00042 $0.00689
Haiku 4.5 $0.00021 $0.00345

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

Security

Grade A, and why

21-任务执行纪律 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.

skills/21-任务执行纪律/SKILL.md · 246 lines

How it starts

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

Task Execution Protocol (TEP) v1.0

解决的问题: AI 开发过程中 (1) 功能遗漏/跳过 (2) 升级到一半跑偏 (3) 陷入无限优化循环。 灵感来源: Google Design Doc scope lock + Microsoft Definition of Done + Agile Sprint Boundary。 生效范围: 每个任务,每次对话,自动生效。用户不需要说"按 TEP 走"。


第一原则: 范围即合同

用户说的每一句任务指令 = 一份合同。合同外的工作 = 越权。 "一次做到位" 指的是 把合同内的事做到极致,不是 自己加条款


Phase 0: 范围锁定 (Scope Lock) — 动手前必做

收到任务后,第一件事输出 Scope Card:

[Scope Card]
任务: [用户原话,不改写]
交付物: [具体要交付什么,用编号列表]
  1. ...
  2. ...
  3. ...
不做: [明确排除什么 — 至少列 1 条]
完成标志: [怎么判断做完了 — 必须是可验证的]
预估改动: [约 N 个文件 / N 行]

Scope Card 规则:

  • 交付物必须可数 — "优化性能" 不合格,"API 响应时间从 3s 降到 1s" 合格
  • 不做清单必须写 — 强制思考边界,防止自己偷偷扩大范围
  • 用户未确认前可以开始小任务 — 但大任务 (预估 ≥ 5 文件) 必须等用户确认 Scope Card
  • Scope Card 写完就锁定 — 后续所有工作必须对照 Scope Card,不在卡上的不做

短任务简化版 (预估 ≤ 2 文件):

[Scope] 改 X 文件的 Y 功能。不动 Z。完成 = 测试通过。

Phase 1: 拆解与追踪 (Task Breakdown) — TodoWrite 强制使用

规则:

  • 任何任务 ≥ 3 步 → 必须用 TodoWrite 拆解
  • 每个 todo item 必须对应 Scope Card 的某个交付物
  • 禁止出现 Scope Card 之外的 todo item — 发现需要额外工作 → 走 Phase 3 (范围变更)
  • 每完成 1 个 item → 立即标 completed → 检查是否对齐 Scope Card
  • 最后一个 item 必须是 "验收: 对照 Scope Card 逐条确认"

Todo Item 命名规则:

好: "实现用户注册 API endpoint"
坏: "优化代码" (太模糊,容易变成无底洞)
好: "修复登录页 403 错误"
坏: "改进登录体验" (没有边界)

Phase 2: 执行纪律 (Execution Discipline) — 写代码时的硬约束

2.1 单轨执行 (Single Track)

  • 一次只做一个 todo item — 不并行,不跳跃
  • 当前 item 没标 completed 之前,不开始下一个
  • 如果当前 item 受阻 → 记录阻塞原因 → 问用户 → 不自己绕路做别的

2.2 范围边界巡逻 (Scope Patrol) — 每写 1 个文件后自问:

这个改动在 Scope Card 上吗?
  是 → 继续
  否 → STOP. 走 Phase 3.

2.3 深度陷阱检测 (Depth Trap Detection)

AI 在执行中必须监控以下信号,任何一个触发 → 立即暂停:

信号 含义 动作
同一个模块连续改 ≥ 3 个文件且不在 Scope Card 上 正在陷入优化循环 STOP + 报告用户
发现"顺便可以改进"的地方 ≥ 2 处 正在 scope creep 记录到 Parking Lot,不动手
当前 todo item 拆出了 ≥ 3 个子步骤 item 粒度太粗,或正在膨胀 重新拆解,不继续埋头做
已经改了 ≥ 10 个文件但 Scope Card 预估 ≤ 5 严重超出预期 STOP + 向用户报告偏差
做了 ≥ 30 分钟 (估算) 但第 1 个交付物还没完成 可能卡在了细节里 自检 + 报告进度

2.4 Parking Lot (停车场) — 不丢失但不立刻做

执行中发现的"好想法"、"顺便优化"、"也应该改"的事情:

[Parking Lot]
- [ ] 发现: X 模块的 Y 也需要类似改动 (来源: 做 Scope #2 时发现)
- [ ] 发现: Z 函数命名不一致 (来源: 读代码时注意到)
  • Parking Lot 在任务结束时一次性报给用户
  • 用户说"做" → 变成新的 Scope Card
  • 用户说"不做" → 归档
  • 绝对不允许在执行中偷偷从 Parking Lot 里拿东西出来做

Read the full file on GitHub · 246 lines

Files

What ships with it

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

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 · 246 lines · 212 tokens per session scan A 16148645ee6f

Subscribe to this mod's changes

21-任务执行纪律 is a skill published in the GitHub repository xcodethink/open-claude-code-skills (2 stars, last pushed 29d ago), licensed MIT. It adds 212 tokens to every session and 3,446 once invoked, about $0.0011 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.

Related

Other skills, from other repositories

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

agent-phase-closeout

中文阶段收尾技能。用于完成一个阶段、准备开新对话、需要更新状态快照、冻结模块、整理已完成任务和下一步任务时。触发语包括"阶段收尾""帮我收工""准备开新对话""更新快照""冻结阶段""总结当前状态"。.

hashgraph-online/awesome-codex-plugins · 73 tokens

orchestrate

Pipeline orchestration: dispatch the highest-priority ready tasks/work units to agents, manage capacity, and coordinate the Todo to Done flow. Invoked as /agiflow:orchestrate. Uses listtasks, listactivetasksbyorg, listmembers, updatetask, getworkunitprogress.

hashgraph-online/awesome-codex-plugins · 64 tokens

moai-workflow-project

Integrated project management system covering documentation, language initialization, template optimization, docs generation, and JIT document loading. Absorbed from moai-workflow-templates, moai-docs-generation, and moai-workflow-jit-docs.

modu-ai/moai-adk · 55 tokens

backlog-grooming

Review Agiflow Planning tasks for readiness, prioritize approved work, group related tasks into work units, and promote ready tasks to Todo. Use when grooming a backlog, organizing planned tasks, creating work units, or deciding what should be executed next.

hashgraph-online/awesome-codex-plugins · 55 tokens

project-plan

Turn a product goal or feature request into a clear Agiflow project plan with small, testable tasks in Planning status. Use when starting a project, decomposing a feature, clarifying requirements, or converting an idea into an actionable backlog.

hashgraph-online/awesome-codex-plugins · 52 tokens