commit
Git workflow
Available scripts
scripts/git-info.sh— Emits a JSON snapshot of repository state for commit preparation.
Resolve the path relative to this
SKILL.mdfile's directory;
Guardrails
- If potential secrets are found: STOP and ask what to do.
- No
--no-verify, no--amend/rebase/force-push, no pushing unless asked. - Ask the user only if one of these is true:
- Changes appear to span multiple logical commits
- Potential secrets are present
- Recent commit subjects do not make the repo's commit style clear
- The staged diff does not match the intended commit
- Do not run
bash scripts/git-info.sh --helpduring normal flow. Use--helponly if the script fails or you are editing the script itself.
Fast workflow
-
Gather information
bash scripts/git-info.shRead the JSON snapshot first. Use it to inspect:
repoRoot,branchstatus.hasStaged,status.hasUnstaged,status.hasUntrackedfiles.staged,files.unstaged,files.untrackedstats.staged,stats.unstagedrecentCommits
If ambiguity remains after the JSON snapshot, inspect only the needed files with normal git commands:
git diff -- path/to/file git diff --cached -- path/to/file git diff --stat git diff --cached --stat git status --short git log --oneline -20 -
Stage changes intentionally
git add path/to/file1 path/to/file2 # or: git add -A # when all changes belong to the commit to createVerify the staged set before committing:
git diff --cached --stat git diff --cachedIf the staged diff contains unrelated changes, STOP and ask what to do.
-
Write a concise commit message
Infer commit style from recent subjects:
- If recent subjects look like
type(scope): msg, use Conventional Commits. - Otherwise, match the common pattern (caps, prefixes, ticket IDs, etc.).
Subject rules:
- Imperative mood, no trailing period
- Prefer ≤ 72 chars (or match repo norm)
- Include scope only if the repo typically does
Body rules:
- Add a body only if it answers "why" or prevents confusion:
- Why this change is needed
- Key tradeoffs or constraints
- Notable side effects/follow-ups
- If recent subjects look like
-
Create the commit Use multiple
-mflags for multi-line messages (no \n).git commit -m "type(scope): concise summary" # or with body: git commit -m "type(scope): concise summary" -m "Why this change was needed (brief)."
More from mrclrchtr/skills
agent-orchestrator
Orchestrate complex work via a phase-gated multi-agent loop (audit → design → implement → review → validate → deliver). Use when you need to split work into subsystems, run independent audits, reconcile findings into a confirmed issue list, delegate fixes in clusters, enforce PASS/FAIL review gates, and drive an end-to-end validated delivery. Do not use for small, single-file tasks.
38git-commit
Creates a commit: detects conventions, stages intentionally, writes a clear subject, add a concise body when useful, and commits.
22agent-orchestrator-standalone
Orchestrate complex work via a phase-gated multi-agent loop (audit → design → implement → review → validate → deliver). Use when you need to split work into subsystems, run independent audits, reconcile findings into a confirmed issue list, delegate fixes in clusters, enforce PASS/FAIL review gates, and drive an end-to-end validated delivery. Do not use for small, single-file tasks.
16web-fetch-to-markdown
Fetches and normalizes http(s) web pages into clean Markdown for LLM ingestion. Use when a task includes a URL, needs to fetch docs or asks to convert web docs/articles/pages into Markdown for summarizing, quoting, diffing, or saving.
4web-design-guidelines-design
Use when creating, redesigning, or restyling a UI and Codex should establish a clear design direction before implementation.
4web-design-guidelines-apply
Use when building or modifying frontend UI and implementation choices should follow shared web interface guidelines for interactions, accessibility, forms, motion, performance, responsive behavior, or copy.
4