commit

A command that stages all Git changes and creates a local commit without pushing it. Staging selects changes for a commit, while a commit records a set of changes in the project history.

In plain words
What is it for?
It is for checking repository status, reviewing changes, writing a Conventional Commit message, staging files, and committing them.
Why use it?
It turns the current work into a clearly described saved checkpoint without sending it to a remote repository.

Command for Claude Code

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 commands/funiq-lab/your-mind/commit
Clone the repo
git clone --depth 1 https://github.com/funiq-lab/your-mind

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 837 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 $0.00013 $0.00837
Opus 5 $0.00006 $0.00418
Sonnet 5 $0.00003 $0.00167
Haiku 4.5 $0.00001 $0.00084

Measured 2d ago against content hash a74e2f09826e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.claude/commands/commit.md · 65 lines

What it actually says

按顺序执行以下步骤:

  1. 检查当前是否在 Git 仓库中,并确认分支与工作区状态:

    • 运行 git rev-parse --is-inside-work-tree
    • 运行 git status -sb
  2. 如果工作区没有任何变更(clean):

    • 告知用户"没有需要提交的变更",并询问下一步要做什么。
  3. 生成变更摘要(用于提交信息与确认范围):

    • 运行 git diff --name-status
    • 如需要更细节,再运行 git diff
  4. 确定当前分支:

    • 运行 git rev-parse --abbrev-ref HEAD
  5. 生成提交信息:

    • 提交信息必须符合 Conventional Commits 规范:
      • 基本格式:<type>(<scope>): <subject>
      • scope 可选;subject 用现在时/祈使语气、简洁明确,避免句号结尾。
    • 常用 type(本仓库以文档/笔记为主,通常用 docs / chore):
      • docs: 文档/笔记/规范更新
      • chore: 工具/配置/脚本/工作流调整
      • refactor: 结构调整但不改变外部行为(例如整理目录结构但不改语义)
      • fix: 修正错误内容/链接/拼写
      • feat: 新增可用能力(例如新增一条可执行 command / 新模板)
    • scope 建议用改动所在的主目录/主题(择一即可):life-osdocsclaudeoutputnewstechinspiration
    • 若用户在执行 /push 时提供了自定义 message:
      • 先检查是否匹配 ^(feat|fix|docs|refactor|style|test|chore)(\([^)]+\))?(!)?: .+
      • 若不匹配:停止并要求用户确认是否改为符合规范的提交信息。
    • 若用户未提供 message:
      • 基于第 3 步的变更摘要,自动生成一条单行 Conventional Commit(仅 subject)
      • 示例:
        • docs(life-os): 翻译 CLAUDE.local 模板为中文
        • chore(claude): 更新 push 命令为仅提交模式
        • fix(docs): 修复 life-os 参考文档中的失效链接
    • 提交信息必须准确反映改动意图,避免空泛词(如 WIP / update / changes)。
  6. 暂存所有变更:

    • 运行 git add -A
    • 再次运行 git status -sb 确认暂存结果。
  7. 创建提交:

    • 运行 git commit -m "{message}"
    • 如果提示"nothing to commit",说明没有可提交内容:停止并告知用户。
  8. 最后输出一段简短总结:

    • 本次提交信息
    • 涉及的主要文件/目录
    • 提示用户可手动运行 git push 推送到远程
    • 询问用户接下来要处理什么
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 First seen · 65 lines · 13 tokens per session scan A a74e2f09826e

Subscribe to this mod's changes

commit is a command published in the GitHub repository funiq-lab/your-mind (11 stars, last pushed 8mo ago), licensed MIT. It adds 13 tokens to every session and 837 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.