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/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/restore-task"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/restore-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.00032 | $0.01415 |
| Opus 5.5 | $0.00013 | $0.00566 |
| Sonnet 5.5 | $0.00006 | $0.00283 |
| Haiku 4.5 | $0.00003 | $0.00142 |
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 6d 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 — 120 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标记注册表的评论恢复文件 - 先恢复到
<task-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-token} - 可选参数
{task-id} - 执行前先读取
.agents/rules/issue-pr-commands.md,并按其中的认证命令验证当前平台访问能力
如果用户传入了 {task-id},校验其格式为 TASK-{yyyyMMdd-HHmmss}。
2. 获取 Issue 评论
调用 agent-infra-internal platform-comment list --issue {issue-token} 读取全部分页评论,保留原始顺序和评论 ID;平台上下文、认证和 upstream 由 internal intent 处理。
3. 确定 task-id 与待恢复文件
按 .agents/rules/issue-sync.md 中定义的 task、artifact 与分片 artifact 标记筛选评论。
处理规则:
- 用户提供了
{task-id}时,仅匹配该任务 - 未提供时,优先从 task 评论标记推断
- 若找不到唯一 task-id,立即停止并告知用户
- 忽略
summary标记评论;它是 complete-task 的聚合产物,不对应本地任务文件 task、artifact 和交付摘要评论顶部的折叠恢复元数据由受控 recovery core 验证并重建活动日志。- 将
{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 评论恢复当前任务投影,再只从通过校验的 artifact 恢复元数据重建活动日志;不得根据缺失记录推测过程状态
- 如分片标记中存在 part 和 total 序号,按 part 升序排序并校验分片完整
- 从评论正文中提取文件内容,去掉隐藏标记、标题、恢复元数据和页脚
- 拼接得到最终文件内容
在写文件前检查:
<task-workspace>/active/{task-id}/、blocked/{task-id}/、completed/{task-id}/均不存在- 创建唯一
<task-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.
- 6d ago Changed 6d443bfdf8f0
- 1mo ago Changed · +5 lines 1e5626da792e
- 1mo ago Changed 5e462f98117d
- 1mo 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 (86 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,415 once invoked, about $0.0001 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.