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/commitnpx skills add fitlab-ai/agent-infra --skill commitgit clone --depth 1 https://github.com/fitlab-ai/agent-infraWhat 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 | $0.00025 | $0.01232 |
| Opus 5 | $0.00013 | $0.00616 |
| Sonnet 5 | $0.00005 | $0.00246 |
| Haiku 4.5 | $0.00003 | $0.00123 |
Grade A, and why
commit 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
提交代码
--agent取值见.agents/rules/task-management.md「合作者 token 规范」。
在不覆盖用户本地工作的前提下创建 Git commit,并在需要时更新关联任务状态。
commit core 只返回一个主结果:committed、no_op、committed_with_warnings、failed 或 blocked,并附带结构化 warnings。push 失败或保护分支策略不会撤销已经创建的本地提交。
任务上下文
入口允许省略 task ref,也接受旧位置 task ref 或 --task <ref> / -t <ref>。先调用 agent-infra-internal task-context resolve {task-scope}。
- 显式 task scope 解析失败时停止。
- 未显式指定 task scope 时,只有
TASK_CONTEXT_NOT_FOUND可进入 taskless direct;detached HEAD、损坏候选或多匹配必须 fail closed。 - 入口业务操作数包含字面
--orchestrated时使用mode=orchestrated,否则使用mode=direct;不得从 run 文件或环境推断模式。 - taskless direct 不读取、创建或完成 task intent、receipt、checkpoint 或 task.md 收尾记录。
- task-bound direct 不要求 delegation receipt;orchestrated 必须由 core 验证匹配的 activated commit receipt 和 capability。
- 解析成功后只使用 core 返回的
taskId;不得从环境、分支或文件名猜测任务身份。
1. 检查本地修改
在任何编辑前先检查:
git status --short
git diff
必须尊重现有用户改动;如果计划与之冲突,按禁言规则停止并记录阻塞原因。
2. 更新版权头年份
动态获取当前年份,只更新已经改动过的带版权头文件。完整流程见 reference/copyright-check.md。
3. 生成提交信息
检查状态、diff 和最近历史,按 Conventional Commits 生成英文祈使句 message,并读取 reference/commit-message.md 处理协作署名。
4. 调用唯一 commit core
执行本步骤前读取 reference/commit-orchestration.md。
将 message、明确 paths、expected HEAD/tree、task scope、agent、mode 和必填 push policy 写入临时 JSON,然后调用:
agent-infra-internal git-workflow commit --input {commit-operation.json}
示例:
{
"taskRef": "TASK-YYYYMMDD-HHMMSS",
"agent": "codex",
"mode": "direct",
"paths": ["lib/example.ts", "tests/example.test.ts"],
"message": "fix(core): validate example input",
"expectedHead": "{HEAD}",
"expectedTree": "{TREE}",
"push": {
"remote": "origin",
"refs": ["refs/heads/{branch}"]
}
}
taskless direct 省略 taskRef;orchestrated 必须显式传 taskRef、agent 和 mode: "orchestrated"。core 统一负责 repository/worktree mutation lock、task lock(仅 task-bound)、路径和敏感文件、staged scope、HEAD/tree、branch/ref、commit、push、保护分支、warning 和幂等校验。
- 有明确修改时最多创建一个本地 commit。
- 无修改但需要交付本地领先的 HEAD 时只执行 push-only,不创建空 commit。
main/master的自动 push 跳过并返回COMMIT_AUTOPUSH_PROTECTED_BRANCH;本地 commit 保留。- 普通 push 失败返回
COMMIT_PUSH_FAILEDwarning;重跑只补当前 push,不重复创建 commit。 - taskless 成功不写 task.md、review、receipt、checkpoint 或 Activity Log。
What ships with it
7 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 First seen · 106 lines · 25 tokens per session scan A bbe58e69b215
commit is a skill published in the GitHub repository fitlab-ai/agent-infra (84 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 1,232 once invoked, about $0.0001 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
sublate
Vet working context by dialectical antithesis before action. Type: (ContextSuspect, User, VET, WorkingContext) → VettedContext.
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.
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.
bound
Define epistemic boundaries per decision. Fires when a decision's direction, scope, type, or ownership is undefined. Type: (BoundaryUndefined, AI, DEFINE, TaskScope) → DefinedBoundary.
ground
Validate structural mapping between abstract and concrete domains. Presents concrete instantiations when mapping uncertainty is detected. Type: (MappingUncertain, AI, GROUND, R) → ValidatedMapping.