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/restore-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/restore-task)<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/restore-task"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/restore-task.svg" alt="Measured on agentmods" 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.00032 | $0.01317 |
| Opus 5 | $0.00016 | $0.00659 |
| Sonnet 5 | $0.00006 | $0.00263 |
| Haiku 4.5 | $0.00003 | $0.00132 |
Grade A, and why
restore-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 8d 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 — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
还原任务
--agent取值见.agents/rules/task-management.md「合作者 token 规范」。
从带有 sync 标记的平台 Issue 评论中恢复本地任务工作区文件。
行为边界 / 关键规则
- 只从匹配
.agents/rules/issue-sync.md标记注册表的评论恢复文件 - 先恢复到
.agents/workspace/内的受控 staging,校验后由 lifecycle 原子落位到active/{task-id}/ - 如果目标目录已存在,立即停止并提示用户先处理目录冲突
- 执行本技能后,你必须立即更新恢复出的
task.md
版本戳规则:创建或更新 task.md frontmatter 时,先读取 .agents/rules/version-stamp.md,并写入或刷新 agent_infra_version。
任务入参短号别名
如果
{task-id}入参匹配^[#]?[0-9]+$(裸数字或带#前缀),先读取.agents/rules/task-short-id.md的「SKILL 入参解析」段执行解析;后续命令视{task-id}为解析后的全长TASK-YYYYMMDD-HHMMSS形式。
步骤开始:本地生命周期边界
评论解析阶段不写正式 active 目录。步骤 6 的单次 restore intent 统一校验 staging,并原子完成基础元数据、started/done 日志、正式落位和短号分配。
执行步骤
1. 验证输入与环境
检查:
- 必填参数
{issue-number} - 可选参数
{task-id} - 执行前先读取
.agents/rules/issue-pr-commands.md,并按其中的认证命令验证当前平台访问能力
如果用户传入了 {task-id},校验其格式为 TASK-{yyyyMMdd-HHmmss}。
2. 获取 Issue 评论
调用 agent-infra-internal platform-comment list --issue {issue-number} 读取全部分页评论,保留原始顺序和评论 ID;平台上下文、认证和 upstream 由 internal intent 处理。
3. 确定 task-id 与待恢复文件
按 .agents/rules/issue-sync.md 中定义的 task、artifact 和分片 artifact 标记筛选评论。
处理规则:
- 用户提供了
{task-id}时,仅匹配该任务 - 未提供时,优先从 task 评论标记推断
- 若找不到唯一 task-id,立即停止并告知用户
- 忽略
summary标记评论;它是 complete-task 的聚合产物,不对应本地任务文件 - 将
{file-stem}映射回文件名:task->task.mdanalysis/analysis-r{N}-> 对应.mdreview-analysis/review-analysis-r{N}-> 对应.mdplan/plan-r{N}-> 对应.mdreview-plan/review-plan-r{N}-> 对应.mdcode/code-r{N}-> 对应.mdreview-code/review-code-r{N}-> 对应.mdpr-review/pr-review-r{N}-> 对应.md
4. 处理分片并检查本地目录
执行本步骤前先读取 .agents/rules/issue-sync.md。
对每个文件执行:
- 收集单条评论或分片评论
- 对
task.md评论按 issue-sync.md 中的<details>frontmatter 格式反向拆解,提取 frontmatter 后再与正文拼合 - 如分片标记中存在 part 和 total 序号,按 part 升序排序并校验分片完整
- 从评论正文中提取文件内容,去掉隐藏标记、标题和页脚
- 拼接得到最终文件内容
在写文件前检查:
.agents/workspace/active/{task-id}/、blocked/{task-id}/、completed/{task-id}/均不存在- 创建唯一
.agents/workspace/.restore-staging-*路径,且与 active 位于同一文件系统
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.
- 8d ago First seen · 115 lines · 32 tokens per session scan A eb641bef9283
restore-task is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,317 once invoked, about $0.0002 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
dream
Batch-execute SHIP-ready wishes overnight — pick wishes, orchestrate workers, review PRs, wake up to results.
clickup
Use when managing ClickUp tasks, sprints, or comments via the cup CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, threaded replies, standup summaries, searching tasks, checking overdue items, assigning tasks, listing spaces and lists, opening tasks in browser…
sw-do
Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".
handoff
Write a portable, secret-scrubbed handoff doc so this work can continue in any AI tool or on any machine. Use when saying "handoff", "running out of tokens", or "continue elsewhere".
genie-orca-wish
Turn a brainstorm/design into an APPROVED-able wish whose Dispatch plan is the literal input to Orca tasks and Linear issues. High-reasoning pass: pre-decide everything so fast workers can execute without judgment calls.
auto
Run an increment unattended - the Stop hook feeds you back into the loop until every task is done. Use when saying "auto mode", "run until done", or "ship this while I sleep".