agent-infra: Skill for Claude Code

.agents/skills/commit/SKILL.md

commit is a skill for Claude Code, Codex from fitlab-ai/agent-infra. It costs 25 tokens per session (1,237 once invoked), scanned A, original, MIT.

A Git workflow for saving the current code changes as a commit, a named checkpoint in a project’s version history.

In plain words
What is it for?
Use it to inspect changes, create a Conventional Commit message, make the local commit, and optionally update the related task status.
Why use it?
It checks existing edits and repository context before committing, helping avoid overwriting unrelated work or using the wrong task information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

This is fitlab-ai/agent-infra's own configuration. It tells Claude Code and Codex how to work on agent-infra itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-infra configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/commit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fitlab-ai/agent-infra

Made for: Claude Code, Codex.

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 commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/commit/github.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/commit)
Your own site
<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.

agentmods 80×15 button for commit

Your own site · 80×15
<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>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,237 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00025 $0.01237
Opus 5.5 $0.00010 $0.00495
Sonnet 5.5 $0.00005 $0.00247
Haiku 4.5 $0.00003 $0.00124

Measured today against content hash fdf5087fc45b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.agents/skills/commit/SKILL.md · 106 lines

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=local checkpoint;独立 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_FAILED warning;重跑只补当前 push,不重复创建 commit。
  • taskless 成功不写 task.md、review、receipt、checkpoint 或 Activity Log。

Read the full file on GitHub · 106 lines

Files

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.

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. today Changed fdf5087fc45b
  2. 9d ago Changed b75f3026f37b
  3. 26d ago Changed 3d0aca59f41d
  4. 1mo ago Changed 1580c01aff15
  5. 1mo ago Changed 77eb632c7dff
  6. 1mo ago First seen · 106 lines · 25 tokens per session scan A bbe58e69b215

Subscribe to this mod's changes

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.

Related

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]…

QwenLM/qwen-code · 123 tokens

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.

Hmbown/Codewhale · 44 tokens

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).

UfoMiao/zcf · 41 tokens

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'.

code-yeongyu/lazycodex · 93 tokens

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…

cloudposse/atmos · 82 tokens

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.

termio-sh/termio · 47 tokens