code-task

A coding workflow for implementing an approved technical plan or fixing confirmed code-review findings.

In plain words
What is it for?
Use it to build a planned change, address review findings, record unresolved decisions, create a new implementation report, and update the task.
Why use it?
It keeps implementation tied to the latest agreed plan and requires tests and a written report, reducing unplanned changes and missing verification.

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/fitlab-ai/agent-infra/code-task
Any agent
npx skills add fitlab-ai/agent-infra --skill code-task
Clone the repo
git clone --depth 1 https://github.com/fitlab-ai/agent-infra

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,584 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.00053 $0.03584
Opus 5 $0.00026 $0.01792
Sonnet 5 $0.00011 $0.00717
Haiku 4.5 $0.00005 $0.00358

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

Security

Grade A, and why

code-task 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 2d 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.

.agents/skills/code-task/SKILL.md · 213 lines

How it starts

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

编码任务

--agent 取值见 .agents/rules/task-management.md「合作者 token 规范」。

若入口业务操作数包含 --orchestrated,绑定 {execution-flag} = --orchestrated 并原样转发给 completed 事件;否则绑定为空。不得从 orchestration.json、环境变量或历史产物推断该标记。

根据已批准的技术方案编码任务,并产出 code.mdcode-r{N}.md。本技能支持初次实现、基于 review-code 反馈的修复,以及人工裁决驱动实现三种模式。

行为边界 / 关键规则

  • 严格遵循最新方案产物:plan.mdplan-r{N}.md
  • 实现前读取 .agents/rules/compatibility-policy.md;只实现方案明确批准的兼容预算,不以“稳妥”为由保留旧分支、旧结果契约或迁移 shim
  • 修复模式逐条核实最新 review-code 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;manual-validation 项不在修复范围
  • 实现中遇到方案未覆盖的关键设计决策时,先调用 agent-infra-internal task-ledger {task-id} decision-next-id 取得 HD-N,按 .agents/rules/human-decision-context.md 写入实现报告的 ## 人工裁决待办 详情块并判断是否需要实现,再调用 decision-upsert --id {HD-N} --stage code --artifact {code-artifact} --needs-implementation {true|false};不得扫描编号、手写账本行、中途提问或擅自扩范围
  • 绝不自动执行 git addgit commit
  • 每轮实现都创建新的实现产物,不覆盖旧文件
  • 执行本技能后,你必须立即更新 task.md

版本戳规则:创建或更新 task.md frontmatter 时,先读取 .agents/rules/version-stamp.md,并写入或刷新 agent_infra_version

常见违规借口与反驳

动手实现前,若冒出以下念头,先停下——它们都是违规借口:

借口 反驳
「代码太简单,不需要测试」 简单代码也会回归;没有"失败→通过"的用例就没有完成标志,先写验证业务行为的测试。
「先写代码再补测试更高效」 后补测试常沦为对实现的镜像;目标驱动应先定义可验证用例再让它通过。
「方案这里不合理,顺手改更好」 偏离 {plan-artifact} 必须在报告中记录原因;有异议先停下确认,不擅自改方向。
「测试过了,顺便提交一下」 本技能绝不执行 git add/git commit,提交是用户显式发起的独立步骤。
「审查既然写了,照着改就行」 审查可能基于错误 file:line 或幻觉;动手前先 Read/Grep 核实,成立才修,不成立就反驳并记入 unresolved,不盲从。
「保留旧入口更稳妥,反正只多一个分支」 未获批准的兼容是范围扩张和长期债务;没有对象、必要性、期限和退出条件就只实现当前契约。

第 0 步:状态核对(执行前硬约束)

在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。

运行以下命令,并把原文粘贴到回复正文和本轮产物的 ## 状态核对 段:

agent-infra-internal task-snapshot {task-id} --format text

状态核对完成前,禁止任何关于外部状态的断言(例如“代码没变”“测试已通过”“没有其他引用”),包括思考阶段。本门禁只提供结构下限;逐条证据配对和真实性仍需按报告模板与审查要求核对。

任务上下文解析

入口允许省略 task ref,也接受旧位置 task ref 或 --task <ref> / -t <ref>。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 agent-infra-internal task-context resolve {task-scope}{task-scope} 为空、位置 ref 或 task flag 之一。只读取结构化结果的 taskId,后续把 {task-id} 绑定为该完整 TASK-YYYYMMDD-HHMMSS。解析失败时透传非零退出码,不自行扫描任务。

Read the full file on GitHub · 213 lines

Files

What ships with it

7 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. 2d ago First seen · 213 lines · 53 tokens per session scan A 3a0c189e50b6

Subscribe to this mod's changes

code-task is a skill published in the GitHub repository fitlab-ai/agent-infra (84 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 3,584 once invoked, about $0.0003 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.