smart-commit

smart-commit is a skill for Claude Code from sd0xdev/sd0x-harness. It costs 89 tokens per session (19,561 once invoked), scanned C, original, MIT.

A Git assistant that examines uncommitted changes, groups related edits, and suggests commit messages that match the project's style.

In plain words
What is it for?
Use it to prepare batches of commits for manual execution or, with explicit execution, add and commit the grouped changes.
Why use it?
It reduces the effort of turning a messy working tree into clear, focused commits while helping avoid accidentally including sensitive files.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; mentions Codex.

Part of the sd0x-dev-flow plugin — 101 skills, 16 agents, 5 hooks shipped together

Good fit Use it to prepare batches of commits for manual execution or, with explicit execution, add and commit the grouped changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sd0xdev/sd0x-harness/smart-commit
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.

Any agent
npx skills add sd0xdev/sd0x-harness --skill smart-commit
Clone the repo
git clone --depth 1 https://github.com/sd0xdev/sd0x-harness

Made for: Claude Code.

Or install sd0x-dev-flow, the plugin that ships this one along with the rest of its 101 skills, 16 agents, 5 hooks.

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 smart-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/smart-commit/github.svg)](https://agentmods.dev/skills/sd0xdev/sd0x-harness/smart-commit)
Your own site
<a href="https://agentmods.dev/skills/sd0xdev/sd0x-harness/smart-commit"><img src="https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/smart-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 smart-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/sd0xdev/sd0x-harness/smart-commit"><img src="https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/smart-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 19,561 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00089 $0.19561
Opus 5.5 $0.00036 $0.07824
Sonnet 5.5 $0.00018 $0.03912
Haiku 4.5 $0.00009 $0.01956

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

Security

Grade C, and why

smart-commit scanned grade C with 1 finding 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/smart-commit-dispatch.sh, scripts/smart-commit-execute.sh, scripts/smart-commit-inspect.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

.env* | *.pem | *.key | *.p12 | id_rsa* | .aws/credentials | *.secret
skills/smart-commit/SKILL.md · 835 lines

How it starts

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

Smart Commit

Read first: @skills/push-ci/references/authorization-contract.md before --execute commits anything — § Proactive Offer for the menu and the four Goal mode conditions, § Efficacy Boundary for what the per-use approval authorizes. If that Read fails, stop and report it; commit nothing (manual mode, which only prints commands, is unaffected).

Analyze uncommitted changes → group by cohesion → generate commit messages → output git commands (or execute directly with --execute).

Workflow

sequenceDiagram
    participant C as Claude
    participant U as User
    C->>C: Step 1a: Detect permissions
    C->>C: Step 1b: Learn commit style
    C->>C: Step 1c: Identity diagnostics
    C->>C: Step 1d: Signing diagnostics
    C->>C: Step 1e: AI guard readiness
    C->>C: Step 2: Pre-flight check (precommit)
    C->>C: Step 3: Collect changes + exclude sensitive files
    C->>C: Step 4: Group (high cohesion)
    C->>U: Show commit plan (with Author/Signing/Guard)
    U->>C: Confirm/adjust (Goal mode: printed with a [GOAL_COMMIT] record, not asked)
    loop Each commit group
        C->>C: Read diff → generate message
        C->>C: AI trailer sanitization
        alt --execute mode
            C->>C: Runtime validation → git commit
        else manual mode
            C->>U: Output git commands
        end
    end
    C->>C: Step 6: Verification + post-commit leak detection

Git Environment Policy (applies to every step below)

Every git command this skill runs itself — read or write, either mode — resolves the same question: which repository, tree, index, ancestry and configuration does it act on? The answer is pinned two ways, both defined in git-environment.md § 1: the inherited GIT_* variables are stripped, and every command carries -C "$REPO_ROOT".

Where the stripping happens depends on who runs git:

Callee How the policy is applied
A fence running git inline The canonical env -u prefix, written out literally — never through a variable, because zsh does not word-split an expansion used as a command prefix
A helper that runs its own git commands and does not strip (git-profile.sh) The prefix goes on the delegation, at the boundary
A helper that strips the same list itself (smart-commit-inspect.sh, smart-commit-execute.sh) No prefix — the script's own unset block is the policy, and prefixing it as well would state the same rule twice in two places that could drift

Read the full file on GitHub · 835 lines

Files

What ships with it

5 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. 1mo ago Changed · +3 lines ef204c2a682a
  2. 1mo ago Changed · +20 lines · +11 tokens per session 7091f3e964d9
  3. 2mo ago First seen · 812 lines · 78 tokens per session scan C 30923a0b7371

Subscribe to this mod's changes

smart-commit is a skill published in the GitHub repository sd0xdev/sd0x-harness (194 stars, last pushed 1mo ago), licensed MIT. It adds 89 tokens to every session and 19,561 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

smart-commit compared with skills from other repositories

smart-commit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
smart-commitsd0xdev/sd0x-harnessSkill1941mo agoMITC89Claude Code
comet-safe-deliveryrpamis/cometSkill3.3kyesterdayMITA78Claude Code, Codex
updateromiluz13/cc10xSkill16616d agoMITA108Claude Code
resolving-merge-conflictsromiluz13/cc10xSkill16616d agoMITA25Claude Code
vibe-cherry-pick-integrationash1794/vibe-engineeringSkill1641mo agoMITA35Claude Code
vibe-pre-commit-auditash1794/vibe-engineeringSkill1641mo agoMITA35Claude Code
unica-writingIngvarConsulting/unicaSkill245yesterdaynoneA56Claude Code, Codex