Borrowing it
Nothing to install: this file belongs to fitlab-ai/agent-infra. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/cancel-task/SKILL.mdgit clone --depth 1 https://github.com/fitlab-ai/agent-infraWrote 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/fitlab-ai/agent-infra/cancel-task)<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/cancel-task"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/cancel-task/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/cancel-task"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/cancel-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00050 | $0.02010 |
| Opus 5.5 | $0.00020 | $0.00804 |
| Sonnet 5.5 | $0.00010 | $0.00402 |
| Haiku 4.5 | $0.00005 | $0.00201 |
Grade A, and why
cancel-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.
How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
取消任务
--agent取值见.agents/rules/task-management.md「合作者 token 规范」。
行为边界 / 关键规则
- 本命令用于终止一个不再需要继续执行的任务,并转移到
completed/ - 只有在确认该任务无需继续实现、审查或修复时才可取消
- 有效
platform_issue_identity存在时,Issue 同步属于必做项
版本戳规则:创建或更新 task.md frontmatter 时,先读取 .agents/rules/version-stamp.md,并写入或刷新 agent_infra_version。
任务上下文解析
入口可省略 task ref;显式 task scope 仅接受
--task <ref>或-t <ref>,不再解释位置 task ref。保留其余业务操作数后调用agent-infra-internal task-context resolve {task-scope};{task-scope}为空或 task flag 之一。只读取结构化结果的taskId,后续把{task-id}绑定为完整TASK-YYYYMMDD-HHMMSS。解析失败时透传非零退出码,不自行扫描任务。
解析任务引用,并确认任务位于本技能支持的状态或目录且存在
task.md;无法定位时按未找到任务处理并停止。
步骤开始:本地生命周期边界
确认前置条件后,由步骤 3 的单次 lifecycle intent 原子完成基础元数据、started/done 日志、目录转移和短号处理;不得提前手工写入局部状态。
执行步骤
1. 验证任务存在
依次检查以下目录:
<task-workspace>/active/{task-id}/<task-workspace>/blocked/{task-id}/<task-workspace>/completed/{task-id}/
处理规则:
- 如果在
active/或blocked/中找到:继续 - 如果只在
completed/中找到且cancelled_at与cancel_reason有效:复用已记录的取消原因,跳过步骤 3-5,继续步骤 6 补齐 Issue 关闭与评论;其他 completed 任务停止 - 如果都不存在:提示
Task {task-id} not found
2. 判断取消标签
从 completed 任务重试时,只使用 task.md 已记录的 cancel_reason,不得采用本次输入改写取消原因。
根据取消原因推断 Issue 关闭标签:
status: superseded:原因包含“重复”、“替代”、“合并到”、“已由 #123 / PR 替代”等语义status: invalid:原因包含“误报”、“不存在”、“无法复现”、“排查后无问题”等语义status: declined:原因包含“不做”、“暂不实现”、“优先级调整”、“方案否决”等语义- 以上都不匹配:回退到
status: declined
后续同步到 Issue 时,使用最终推断结果替换现有 status: labels。
3. 执行本地生命周期意图
agent-infra-internal task-lifecycle {task-id} cancel --agent {standard-agent-token} --reason "{一行取消原因}"
仅 status=applied|no-op 视为本地取消完成。status=failed 时展示结构化 error 与 recovery steps,并以同一 intent 重试;不得手工编辑 task.md、移动目录或释放短号。
4. 验证本地终态
确认 targetState=completed、终态字段与短号效果符合结构化结果。
5. 验证转移
ls <task-workspace>/completed/{task-id}/task.md
确认任务目录已成功移动。
6. 同步到 Issue
检查 task.md 中是否存在有效的 platform_issue_identity。如果没有,跳过此步骤。
如果存在有效的 platform_issue_identity,以下操作均须取得 applied / no-op 且无错误后才能宣称取消全部完成;失败时保留本地终态和待恢复记录,修复后以同一任务重试本技能:
- 调用
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned - 将取消评论 JSON payload 写入临时文件,调用
agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {standard-agent-token} - 调用
agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}
What ships with it
1 file 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.
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.
- 2d ago Changed 7bbdfd278120
- 3d ago Changed 2751d848eb92
- 6d ago Changed a3f58293ad20
- 24d ago Changed 4ff55a788e4a
- 28d ago Changed · +2 lines f04938a5b248
- 1mo ago Changed c5a06e6211dc
- 1mo ago Changed c5f89af918e5
- 1mo ago Changed bcf48da5a49a
- 1mo ago First seen · 150 lines · 50 tokens per session scan A 9393acc652a0
cancel-task is a skill published in the GitHub repository fitlab-ai/agent-infra (86 stars, last pushed yesterday), licensed MIT. It adds 50 tokens to every session and 2,010 once invoked, about $0.0002 per session on Opus 5.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
plan-tree
Maintain a structured planning document tree made of roadmap/status files, implementation status or handoff TODO files, topic notes, decision records, open questions, ideas/inspiration pools, and repository/file-structure hygiene plans. Use when Codex needs to create, reorganize, audit, or update a multi-file plan…
tokenrip-cli
The rip CLI for Tokenrip, the shared workspace your AI agents work from: load a workspace and pick up where the work left off, publish artifacts (documents, HTML, code, CSV, PDFs, living tables) into it, organize folders, propose an action for a person to approve before it goes out, report finished work, decide…
quality
Evaluates whether a GitHub issue is spam, empty, needs more information, or is OK to proceed.
follow-up-after-call
Use after a completed customer, prospect, partner, or important internal sales call, discovery session, demo, or conversation, including when the user supplies or uploads a transcript, notes, recording summary, or other grounded evidence. Advise on, assess, qualify, recap, and produce seller-ready follow-up actions…
persona-event-coordinator
Plan and manage events — scheduling, invitations, and logistics.
persona-project-manager
Coordinate projects — track tasks, schedule meetings, and share docs.