Smart commit and push with auto-splitting across domains. Creates atomic commits. Use when asked to "commit", "push changes", "save my work", or after completing implementation work. Automatically groups changes into logical commits.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/howells/arc/blob/main/skills/commit/SKILL.md -a claude-code --skill commitInstallation paths:
.claude/skills/commit/<progress_context> **Use Read tool:** `docs/progress.md` (first 50 lines) Check recent work context to inform commit message writing. </progress_context> # Commit Changes Commit and push changes, intelligently splitting into separate commits when changes span multiple domains. Usage: - `/arc:commit` - Auto-analyze and commit (may create multiple commits) - `/arc:commit [message]` - Single commit with provided message $ARGUMENTS will contain the optional commit message. ## Current Git State **Status:** ``` !`git status --porcelain 2>/dev/null || echo "(no changes)"` ``` **Changes summary:** ``` !`git diff --stat 2>/dev/null | head -20 || echo "(no diff)"` ``` **Recent commits (for style reference):** ``` !`git log --oneline -5 2>/dev/null || echo "(no commits)"` ``` ## Instructions ### 1. Analyze Changes Review the git state above. If you need more detail: ### 2. Determine Commit Strategy **Single commit** if: - $ARGUMENTS contains a commit message, OR - All changes are in the same domain/area, OR - Changes are tightly coupled (e.g., feature + its tests) **Multiple commits** if $ARGUMENTS is empty AND changes span multiple unrelated domains: - Different packages (e.g., `packages/ui`, `packages/api`) - Different apps (e.g., `apps/web`, `apps/admin`) - Config vs source changes - Unrelated features or fixes ### 3. Group Files by Domain Common groupings: - `packages/<name>/**` - Package-specific changes - `apps/<name>/**` - App-specific changes - Root config files (`.eslintrc`, `turbo.json`, etc.) - Config - `*.stories.tsx` with their component - Same commit as component - `*.test.ts` with their source - Same commit as source ### 4. Create Commits For each logical group: 1. Stage only files for that group: ```bash git add [files...] ``` 2. Create commit with conventional message format: ```bash git commit -m "$(cat <<'EOF' type(scope): description EOF )" ``` **Commit types:** - `feat` - New feature - `fix` - Bug fix - `ref