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/commit/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/commit)<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/commit"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/commit/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/commit"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/commit.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.00025 | $0.01237 |
| Opus 5.5 | $0.00010 | $0.00495 |
| Sonnet 5.5 | $0.00005 | $0.00247 |
| Haiku 4.5 | $0.00003 | $0.00124 |
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 today.
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 scope 仅接受 --task <ref> 或 -t <ref>,不再解释位置 task ref。先调用 agent-infra-internal task-context resolve {task-scope}。
- 显式 task scope 解析失败时停止。
- 未显式指定 task scope 时,只有
TASK_CONTEXT_NOT_FOUND可进入 taskless direct;detached HEAD、损坏候选或多匹配必须 fail closed。 - 执行模式固定为
direct;调用方通过delivery=local|push指定交付方式。 - taskless direct 不读取、创建或完成 task intent、receipt、checkpoint 或 task.md 收尾记录。
code-task通过共享 core 创建delivery=localcheckpoint;独立commit使用delivery=push。- 解析成功后只使用 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;direct task-bound commit 使用 push delivery。两种模式都按调用方串行执行;core 仍负责路径和敏感文件、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.
- today Changed fdf5087fc45b
- 9d ago Changed b75f3026f37b
- 26d ago Changed 3d0aca59f41d
- 1mo ago Changed 1580c01aff15
- 1mo ago Changed 77eb632c7dff
- 1mo 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 (86 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,237 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
autofix-pr
Watch a pull request and fix it from a worktree of its own - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once] [--every ] [--no-reply] [--yes] [instructions]…
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
git-commit
Analyze changes with Git only and auto-generate conventional commit messages with optional emoji; suggests splitting commits when needed, runs local Git hooks by default (use --no-verify to skip).
git-master
MUST USE for ANY git operations: atomic commits, rebase/squash/fixup, and history search (blame, bisect, log -S, reflog). Load it before running git yourself, or pass loadskills=['git-master'] to the task that commits. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.
atmos-git
Atmos Git and GitOps: git.repositories, clone/pull/status/diff/commit/push/clean, local Git hook shims and hook env vars, pre-commit framework migration, Starlark git.sandbox checks and unstaged fixes, signed commits, managed workdirs, fork-PR trust gate (clone gate and posting gate), and auth via identities or…
conventional-commit
Conventional Commit - Generate Conventional Commits 1.0.0 compliant messages. MANDATORY for all git commits. Invoke when user says 'commit', 'commit this', or asks to commit code.