run-task

run-task is a skill for Claude Code from fitlab-ai/agent-infra. It costs 48 tokens per session (1,360 once invoked), scanned A, original, MIT.

A single entry point for moving an existing software task through its work stages, from starting or resuming work to a safe submission or a deliberate pause.

In plain words
What is it for?
Use it to resume a tracked task, choose executor and reviewer models, run the appropriate host or sandbox workflow, and wait for a final result.
Why use it?
It removes the need to coordinate each stage, model choice, execution environment, and review by hand while checking that task records and execution sources are consistent.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

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

Made for: Claude Code.

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 run-task

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/run-task.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/run-task)
Your own site
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/run-task"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/run-task.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,360 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.1 $0.00048 $0.01360
Opus 5 $0.00024 $0.00680
Sonnet 5 $0.00010 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 2d ago against content hash b71e2e5d9113, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

run-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/run-task/SKILL.md · 29 lines

How it starts

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

运行任务生命周期

任务上下文解析

入口可省略 task ref;显式 task scope 仅接受 --task <ref>-t <ref>,不再解释位置 task ref。保留四个策略选项及其值,再调用 agent-infra-internal task-context resolve {task-scope}。解析失败时透传非零退出码,不自行扫描任务。内部 orchestration 协议仍使用位置 task ref。

总控只编排,不直接执行任何阶段技能。执行前先读取 .agents/rules/no-mid-flow-questions.md.agents/rules/lifecycle-orchestration.mdreference/host-validation.md

  1. 解析规范任务 ID、当前 Agent Client,以及可选的原子策略 --executor-model--executor-reasoning-effort--reviewer-model--reviewer-reasoning-effort,并执行 agent-infra-internal task-snapshot {task-id} --format text。任一显式策略字段出现时四个 role 字段必须完整,不得与配置拼接;两个角色可以使用同一模型。
  2. Codex 在 begin-or-resume 前选择宿主:没有 AGENT_INFRA_CONTROL_TOKEN 时使用 direct-host;有 task-bound control authority 但没有 AGENT_INFRA_CODEX_CONTROLLER_CONTEXT 时,只调用 agent-infra-internal codex-sandbox-controller run(转发完整显式策略)并等待其终态,外层不得创建 run、baseline 或 receipt;已有 context 时先调用 verify-context。protocol、task/controller/process、lease 或 source/profile discovery 校验失败即停止;package/build/contract 或 hook/profile 内容漂移只输出结构化 warning,并提示用户重建 sandbox。
  3. 调用 agent-infra-internal task-orchestration {task-id} begin-or-resume --client {client} 并转发完整显式策略。完全没有显式策略时由核心读取当前 client 的 agentClients[].orchestration;existing run 使用持久化策略。磁盘状态不符合当前完整结构时核心失败关闭且不改写;升级前必须完成或清空 active run。仅当核心返回 ORCHESTRATION_MODEL_POLICY_REQUIRED 时,先用 agent-client model-selection 展示 complete/partial/interactive-only 来源,再一次收集完整策略;未回答则不创建 run。若为 paused/completed,按结构化结果停止。
  4. 调用 route 并读取结构化结果。若返回 completed,立即运行 agent-infra-internal task-verify {task-id} run-task.completed --format text 并停止;仅当返回 runningnext 非空时读取唯一 action、role、round、artifact、requestedModelrequestedReasoningEffort,不得自行推断。
  5. Codex 先调用一次 agent-infra-internal codex-lifecycle capability-arm --task-id {task-id}。该普通工具调用必须由当前 loop 的真实 PostToolUse 回写 attestation;把 route 返回的精确 model、effort 和 marker 中 token 一并传给 prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort} --capability-token {token}。核心先校验精确的 model/effort、capability provenance 与 controller binding,再只读捕获快照、构造内存中的 prepared receipt,最后原子消费 token 并保存 prepared 状态,同时持久化 capability 的 session、turn、tool-use 来源。activation 再校验 spawn 与该来源属于同一 session/turn,且 spawn 使用独立的 tool-use。其他客户端直接调用同一 prepare(无 token)。任一失败不得创建 baseline、receipt 或 child。
  6. prepare 成功后,在调用 fresh 原生子 Agent 的紧邻前一步执行 task-orchestration <task-ref> dispatch,再显式覆盖 route 返回的 model/effort;只传短任务引用、skill 名、--orchestrated 与 stage/round/artifact/role。可信 hook-spawn 首次观察时间必须位于 dispatch 与 deadline 之间。child 的第一条 provenance-sensitive 命令必须是 await-activation --stage ... --round ... --artifact ... --role ...;返回 running 前禁止 snapshot、阶段 started 或业务写入;代码阶段的本地 checkpoint 只能通过 code-task 的持久化 intent 核心完成,禁止单独委派 commit 阶段或推送。超时由核心暂停;崩溃遗留 prepared receipt 只能在 exact workspace fingerprint、无匹配的未消费 active lifecycle evidence 且 deadline 已过时显式 recover-prepared
  7. Codex 用 SubagentStart/Stop 与 App Server actual evidence 激活、消费并封存唯一 receipt;受信 parent fallback 仍必须形成相同的完整 provenance。timed-out wait 无动作;只有 empty turns 或协议 inProgress 可等待,malformed、身份/传输错误或异常 terminal 均暂停。子 Agent 返回后只对 sealed receipt 调用 advance;只有 running 才重复步骤 4。
  8. 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。protocol、capability、receipt 内 hook/evidence binding、source、controller、身份、账本或 fingerprint 异常都调用 pause 并失败关闭;跨根 package/build/contract 或 hook/profile 内容漂移按 warning 交付,不把自然演进差异当成硬失败。
  9. 完成或暂停后运行对应 typed verification,并把结构化 run 摘要、暂停原因、commit 终点或 clean completion evidence 告知用户。

Read the full file on GitHub · 29 lines

Files

What ships with it

2 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 Changed · +4 lines b71e2e5d9113
  2. 6d ago First seen · 25 lines · 48 tokens per session scan A d76f9e58225e

Subscribe to this mod's changes

run-task is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,360 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.

Related

Other skills, from other repositories

contextualize

Detect application-context mismatch after execution. Fires when correct output may not fit the actual context. Type: (ApplicationDecontextualized, AI, CONTEXTUALIZE, Result) → ContextualizedExecution.

jongwony/epistemic-protocols · 45 tokens

review-loop

Convergence-paced review-resolve loop over a change and its governing surfaces. Verifies each finding against the codebase and the base it is measured from, then re-reviews until each is disposed of.

jongwony/epistemic-protocols · 44 tokens

apportion

Apportion an autonomous goal into execution units carrying their own completion conditions. Type: (GoalPlanUncompiled, User, APPORTION, AutonomousGoal × ExecutionHorizon) → ConditionBearingUnitPlan.

jongwony/epistemic-protocols · 43 tokens

ground

Validate structural mapping between abstract and concrete domains. Presents concrete instantiations when mapping uncertainty is detected. Type: (MappingUncertain, AI, GROUND, R) → ValidatedMapping.

jongwony/epistemic-protocols · 40 tokens

conduct

Conduct method before object-level work. Fires when the work needs several moves in non-trivial order. Type: (MethodUnderdetermined, Hybrid, CONDUCT, WorkProspect × MoveGround) → ConductedMethod.

jongwony/epistemic-protocols · 46 tokens

steer

Project-profile recalibration. Audits session calibration drift, presents per-cluster evidence for a user verdict, writes the updated project-profile rule, and inscribes a settled-direction clause.

jongwony/epistemic-protocols · 39 tokens