Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of X Commit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ttstack-x-commit)
---
name: x-commit
description: Validate intended worktree changes and create atomic local commits. Use only when the user explicitly invokes $x-commit.
---
# Commit intended changes
Before preflight, read `.agents/skill-rules/common.md` and then
`.agents/skill-rules/x-commit.md` from the Git root if present.
Use the skill-specific rules for repository details such as checks or release
criteria. Apply them within the selected scope and the user's authorization.
Continue with the available rules when either file is absent.
Resolve all paths from the Git top level; Markdown links are relative to this
file. Read the invocation arguments from the user prompt.
Validate and commit the selected changes locally. Follow the repository's
release policy for any required version update or local tag.
Registry path: `docs/audit.md` unless the project instructions name another.
## Input
Optional Git pathspecs from the user prompt. Given pathspecs → only matching
changes are candidates and everything else is baseline. Empty → all intended
changes. Reject option-like input and unknown flags; place pathspecs after `--`
when running Git commands. An unmatched pathspec selects nothing. A summary
supplied in ordinary prompt text describes the intended commit. Keep explicit
path restrictions even when the user also supplies a summary.
## Preflight
Run `git status --short --branch` and record the staged, unstaged, and
untracked baseline plus the starting `HEAD` and the current version. Identify
owned paths and hunks; preserve staged boundaries and unrelated work. If
nothing is intended and no version step is owed, report that and stop.
## Protocol
1. **Freeze units.** Split the intended diff into coherent units by root cause
or behavior, each with its tests and documentation. Freeze each unit's
paths and hunks before editing.
2. **Review each unit.** Read full implementations, callers, and the owning
contracts. Check invariants, boundary and failure paths, concurrency and
global state, feature isolation, and public or persisted compatibility.
Refute candidates against the evidence before acting; merge same-root
findings.
3. **Defer repairs.** Report confirmed defects with their locations
and leave the affected unit for repair. Where a registry exists, record an
actionable finding according to its rules. Continue with independent units.
4. **Validate.** Run the repository's formatting, lint, build, and test
gates for the affected surface. Validate in a disposable worktree when
other dirty baseline could affect the result. Format only owned files.
5. **Commit.** Stage exact paths or hunks, inspect `git diff --cached`
(including `--check`), and commit with the repository's configured identity
and message style. One root cause per commit. Preserve unrelated staged hunks:
use an isolated index or worktree if other changes are already staged.
When overlap cannot be separated safely, leave it untouched, report it, and
continue with independent units.
6. **Finalize.** Review the aggregate diff once, then complete the owed version
or release step under the repository's policy. Reuse unchanged-state
results; a composing `$x-overhaul` owns finalization for its invocation.
## Report
Scope, units held for repair, validation run, compatibility impact, commit hashes and
subjects, version outcome, and the baseline left untouched.