skills/commit/SKILL.md
Create git commits for completed work with short, dense, structured messages. Use --context flag when you already know what changed from conversation.
npx skillsauth add ddaanet/agent-core commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a git commit with consistent, high-quality messages.
Note: This skill does not update session.md. Run /handoff separately before committing if session context needs updating.
Only commit when explicitly requested. /commit, ci, xc, hc. Never auto-commit — completing a task is NOT a commit trigger.
Context mode:
--context - Skip git discovery when you already know what changedValidation level (WIP commits only — feature/fix commits require full just precommit):
just precommit (default)--test - just test only (TDD GREEN WIP)--lint - just lint only (post-lint WIP)Gitmoji:
--no-gitmoji - Skip gitmoji selectionTDD workflow pattern:
/commit --test (WIP, test-only validation)/commit (full precommit, final commit)Format: "Short, dense, structured"
<Imperative verb> <what changed>
- <detail 1>
- <detail 2>
- <detail 3>
Title: 50-72 chars, imperative mood, no period. Details: quantifiable facts, WHAT+WHY, exclusions/constraints. User-facing perspective — not implementation details.
Example:
Add #load rule and replace AGENTS.md references with CLAUDE.md
- Add Session Management section with exact file paths
- Replace AGENTS.md with CLAUDE.md across 50 files (319 replacements)
- Exclude scratch/ directory with nested git repos
Allowlist constraint: Run each git/just command as a separate Bash call. Do NOT chain commands (git add && git diff) or wrap in exec 2>&1 — these fail allowlist matching.
Gate — Vet checkpoint:
Run as separate Bash calls:
git diff --name-only $(git merge-base HEAD @{u} 2>/dev/null || echo HEAD~5)
git status --porcelain
# Grep changed file paths for production artifact prefixes
git diff --name-only $(git merge-base HEAD @{u} 2>/dev/null || echo HEAD~5) | grep -E '^(plugin/|plans/|src/|agents/|\.claude/)' || true
Classify using Grep output — production artifacts are files matching the artifact prefixes above.
git diff HEAD.plans/*/reports/ or tmp/. No report → STOP, delegate review first. UNFIXABLE → escalate. No alignment criteria → escalate.Reports are exempt — they ARE the verification artifacts.
Validation + discovery (separate Bash calls):
Non-context mode:
just precommit (or per flag)git status -vvContext mode:
just precommit (or per flag) onlyGate: precommit fails → STOP. Fix before committing. Do not rationalize failures.
ERROR if nothing to commit (no staged or unstaged changes). Note what's already staged vs unstaged.
If git status shows modified submodules (e.g., M plugin), gather info for CLI input:
git -C plugin diff --name-only HEAD
Note changed files and draft a submodule commit message. The CLI handles staging, committing, and pointer update via the ## Submodule input section.
D+B anchor:
Read(.claude/settings.local.json)
{} → skip to step 2| Classification | Action | Examples |
|---------------|--------|----------|
| Permanent — recurring workflow feature | Edit .claude/settings.json to add entry, Edit .claude/settings.local.json to remove it | pbcopy, open, osascript, frequently-used WebFetch domains (docs.claude.com, github.com) |
| Session — one-time grant, exploratory | Edit .claude/settings.local.json to remove it | One-off WebFetch domains, temporary Bash patterns used during investigation |
| Job-specific — needed by active worktree or in-progress task | Keep in .claude/settings.local.json only if handoff context justifies retention | Worktree sandbox paths (managed by _worktree CLI) |
After triage, .claude/settings.local.json should be empty {} or contain only job-justified entries. Stage modified settings files:
git add .claude/settings.local.json .claude/settings.json
Classification signal: If the entry already exists in settings.json, it was granted redundantly — remove from local, no promotion needed.
Based on discovery output or conversation context. Follow format above. Do NOT run git log — style is defined in this skill.
Read references/gitmoji-index.txt (~78 entries). Analyze commit semantics, select most specific match. Prefix title with emoji. Skip if --no-gitmoji.
Build structured markdown input and pipe to CLI:
edify _commit <<'EOF'
## Files
- path/to/file1.py
- path/to/file2.md
## Options
- no-vet
## Submodule plugin
> Submodule commit message
## Message
🔧 Parent commit message
EOF
Sections:
## Files — specific files from git status (not git add -A). Include session.md, plans/, submodule pointers if changed.## Options — from flags: --test or --lint → just-lint, --no-vet or trivial classification → no-vet. Omit section if no options.## Submodule <path> — if submodule changes detected (Step 1b), include submodule commit message as blockquote. Omit if no submodule changes.## Message — drafted message with gitmoji prefix from Steps 2-3.Exit codes: 0 = success. 1 = validation failure (surface CLI output). 2 = parse error (fix input).
After successful commit, output:
Committed: <commit subject line>
Status.
Stop hook renders via _status CLI.
Read continuation from additionalContext or [CONTINUATION: ...] suffix. If continuation present: peel first entry, tail-call with remainder. If empty: stop (terminal skill — default-exit is []).
Do NOT include continuation metadata in Task tool prompts.
tools
Manage git worktrees for parallel task execution. Triggers on "create a worktree", "set up parallel work", "merge a worktree", "branch off a task", or uses the `wt`, `wt merge`, or `wt-rm` shortcuts. Worktree lifecycle: creation, focused sessions, merge ceremony, cleanup, parallel task setup.
testing
Recall behavioral knowledge from project decisions. Triggers on "when to do X", situational patterns, or decision content for recognized situations. Invoke with "/when <trigger>".
tools
Sync edify fragments and portable justfile to match the current plugin version. Detects user-edited files and warns instead of overwriting. Use --force to overwrite conflicts.
testing
Write compact bash scripts using exec tracing pattern. Triggers when writing bash scripts with 3+ sequential commands. The exec 2>&1 + set -xeuo pipefail pattern eliminates echo statements via automatic command tracing, reducing script size by 40-60%.