commit

A Chezmoi workflow for committing and pushing changes to managed dotfiles. Dotfiles are configuration files such as shell or editor settings, and Chezmoi helps keep them under version control.

In plain words
What is it for?
Use it to inspect changed dotfiles, add them to Chezmoi, commit the changes, and push them to the dotfiles repository.
Why use it?
It prevents dotfile changes from being missed and requires confirmation after showing the differences before publishing them.

Command

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/signalcompose/claude-tools/commit
Clone the repo
git clone --depth 1 https://github.com/signalcompose/claude-tools
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,096 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.00009 $0.01096
Opus 5 $0.00005 $0.00548
Sonnet 5 $0.00002 $0.00219
Haiku 4.5 $0.00001 $0.00110

Measured yesterday against content hash f5132b97a4dc, 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 yesterday.

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.

plugins/chezmoi/commands/commit.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chezmoi Commit

Overview

Detect changed dotfiles, commit and push to remote.

Capabilities:

  • Detects changed dotfiles
  • Creates commit with user confirmation
  • Pushes to remote repository

Use when: "commit dotfiles", "push dotfiles", "save dotfile changes", "backup dotfiles", "dotfilesコミット", "dotfiles反映", "dotfiles保存"

Don't use for: Project code commits, general git operations, non-dotfile changes

Flow:

status → diff → confirm → chezmoi add → git add → commit → push

Execution

Step 1: Detect & Show Changes

Run chezmoi status and chezmoi diff --reverse. If no changes, report and exit.

Step 2: Confirm with User

Present detected changes and ask for confirmation before proceeding.

Step 3: Add, Commit & Push

Add files with chezmoi add, then commit and push from ~/.local/share/chezmoi.

Reference: Diff Interpretation

Recommended: Use --reverse Flag

For /chezmoi:commit, always use:

chezmoi diff --reverse

This produces git-like output that shows what commit will do:

  • - lines will be removed from source
  • + lines will be added to source

No special interpretation rules needed. Read it like a normal git diff.

Why --reverse?

Normal chezmoi diff (without flag)

Shows what chezmoi apply would do (making local match source):

  • - = current content in LOCAL (destination)
  • + = desired content from SOURCE (target state)

This is counterintuitive when committing (local → source).

chezmoi diff --reverse

Shows what commit will do (local → source):

  • - = will be removed from source
  • + = will be added to source

This matches git diff semantics exactly.

Example Comparison

Local has hookify, source has sigcomintra:

Without --reverse:

-    "hookify@...": true,      ← Local has this
+    "sigcomintra@...": true,  ← Source has this

Confusing: - means "will be added to source" (counterintuitive)

With --reverse:

-    "sigcomintra@...": true,  ← Will be removed from source
+    "hookify@...": true,      ← Will be added to source

Clear: Standard git diff semantics

Read the full file on GitHub · 178 lines

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. yesterday First seen · 178 lines · 9 tokens per session scan A f5132b97a4dc

Subscribe to this mod's changes

commit is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 5d ago), licensed MIT. It adds 9 tokens to every session and 1,096 once invoked, about $0.0000 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-31.