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.
npx agentmods add skills/fitlab-ai/agent-infra/run-tasknpx skills add fitlab-ai/agent-infra --skill run-taskgit 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/run-task)<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>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.00048 | $0.01360 |
| Opus 5 | $0.00024 | $0.00680 |
| Sonnet 5 | $0.00010 | $0.00272 |
| Haiku 4.5 | $0.00005 | $0.00136 |
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.
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.md 与 reference/host-validation.md。
- 解析规范任务 ID、当前 Agent Client,以及可选的原子策略
--executor-model、--executor-reasoning-effort、--reviewer-model、--reviewer-reasoning-effort,并执行agent-infra-internal task-snapshot {task-id} --format text。任一显式策略字段出现时四个 role 字段必须完整,不得与配置拼接;两个角色可以使用同一模型。 - 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。 - 调用
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,按结构化结果停止。 - 调用
route并读取结构化结果。若返回completed,立即运行agent-infra-internal task-verify {task-id} run-task.completed --format text并停止;仅当返回running且next非空时读取唯一 action、role、round、artifact、requestedModel和requestedReasoningEffort,不得自行推断。 - 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。 - 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。 - 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。 - 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。protocol、capability、receipt 内 hook/evidence binding、source、controller、身份、账本或 fingerprint 异常都调用
pause并失败关闭;跨根 package/build/contract 或 hook/profile 内容漂移按 warning 交付,不把自然演进差异当成硬失败。 - 完成或暂停后运行对应 typed verification,并把结构化 run 摘要、暂停原因、commit 终点或 clean completion evidence 告知用户。
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.
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 · +4 lines b71e2e5d9113
- 6d ago First seen · 25 lines · 48 tokens per session scan A d76f9e58225e
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.
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.
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.
apportion
Apportion an autonomous goal into execution units carrying their own completion conditions. Type: (GoalPlanUncompiled, User, APPORTION, AutonomousGoal × ExecutionHorizon) → ConditionBearingUnitPlan.
ground
Validate structural mapping between abstract and concrete domains. Presents concrete instantiations when mapping uncertainty is detected. Type: (MappingUncertain, AI, GROUND, R) → ValidatedMapping.
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.
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.