
reedom-git
Git workflow commands for conventional commits
Install
/plugin install reedom-git@reedom-commands-and-skillsRun it inside Claude Code after adding the marketplace with /plugin marketplace add reedom/claude-code-commands.
Contents
Discovered from sourceSkills 1
This skill analyzes staged git files and returns commit specifications as JSON. It:
- Collects staged file metadata via script
- Reads diff content to understand changes
- Groups files by category (deps, ci, config, source, test, docs)
- Generates conventional commit messages for each group
- Returns JSON specs for the caller to execute
Arguments
| Arg | Default | Description |
|---|---|---|
--lang | context | Message language (conversation context → system locale → en) |
Output Contract
This skill ALWAYS returns JSON. The caller executes git commands based on this output.
Success:
{
"commits": [
{"message": "type(scope): subject\n\nBody", "files": ["file1", "file2"]}
],
"summary": {"total_commits": 1, "total_files": 2}
}
Error:
{"error": "description", "error_code": "CODE"}
Workflow
Step 1: Collect file info
${CLAUDE_PLUGIN_ROOT}/skills/collect-commit-info/scripts/collect-info.sh --lang <code>
Script returns JSON with temp_dir, files array (with categories), and paths.diff_content.
On error JSON → return it immediately and stop.
Step 2: Read diff content
Read the file at paths.diff_content to understand what changed.
Step 3: Group files by category
Group files from the files array. Commit order:
deps- Dependencies (package.json, lock files)ci- CI/CD (.github/*)config- Configuration (*.yml, *.toml, rc files)source- Source codetest- Tests (_test., .test., .spec.)docs- Documentation (.md, docs/)
Step 4: Generate commit messages
For each group, create a conventional commit message:
type(scope): imperative subject (max 50 chars)
Optional body explaining what and why.
Type by category:
| Category | Type |
|---|---|
| deps | chore |
| ci | ci |
| config | chore |
| source | feat/fix/refactor (analyze diff) |
| test | test |
| docs | docs |
For source files, analyze diff to determine type:
- New functionality →
feat - Bug fixes, error handling →
fix - Restructuring, cleanup →
refactor
Scope: Derive from paths (e.g., src/auth/* → auth)
Language: Use lang.effective from script output. If conversation context indicates a preferred language, use that instead.
Step 5: Cleanup and return
${CLAUDE_PLUGIN_ROOT}/skills/collect-commit-info/scripts/cleanup.sh <temp_dir>
Return the JSON commit specs.
Commands 1
This command selects files, determines complexity, and delegates to the appropriate agent.
Arguments
| Flag | Default | Description |
|---|---|---|
--staged, -s | false | Commit already-staged files (skip file selection) |
--single | false | Force simple single-commit mode |
--lang | context | Commit message language |
Agent Selection
Two agents are available:
| Agent | Use Case |
|---|---|
simple-commit-maker | Single commit for single-category changes |
commit-maker | Multiple commits for mixed-category changes |
Auto-detection logic:
- Categorize files into: deps, ci, config, source, test, docs
- All files in same category →
simple-commit-maker - Mixed categories →
commit-maker
Override:
--singleflag forcessimple-commit-makerregardless of categories
File Categories
| Category | Pattern |
|---|---|
| deps | package.json, -lock., requirements.txt, Cargo.toml, go.mod, Gemfile |
| ci | .github/*, .gitlab-ci.yml, Jenkinsfile |
| config | *.yml, *.yaml, .toml, .rc, tsconfig., jest.config. |
| test | _test., .test., .spec., tests/, tests/ |
| docs | *.md, .rst, docs/ |
| source | Everything else |
Workflow
With --staged flag
Skip file selection. Categorize already-staged files:
git diff --cached --name-only
Then proceed to agent selection.
Without --staged flag
Step 1: Recall files from conversation memory
List files that were created or modified by you in this conversation.
If you have memory of files → go to Step 3.
Step 2: Fallback to git status (only if no memory)
If you have no memory of modified files:
git status --porcelain
Select files based on:
- Modified/added/deleted files (
M,A,D,R) - Related untracked files (
??) in same directory - Exclude: IDE config (.idea/, .vscode/), temp files
Step 3: Categorize files
For each selected file, assign a category based on the patterns above.
Count distinct categories.
Step 4: Select agent and delegate
If --single flag OR only one distinct category:
Task(
subagent_type: "reedom-git:simple-commit-maker",
prompt: "--lang=<lang> --files=<comma-separated-paths>"
)
Otherwise (multiple categories):
Task(
subagent_type: "reedom-git:commit-maker",
prompt: "--lang=<lang> --files=<comma-separated-paths>"
)
Agents 2
Arguments
| Arg | Description |
|---|---|
--lang | Commit message language |
--files | Comma-separated files to stage |
Workflow
Step 1: Stage files
git add -- <file1> <file2> ...
Step 2: Get commit specs from skill
Skill(reedom-git:collect-commit-info) --lang <code>
Returns JSON:
{"commits": [{"message": "...", "files": ["..."]}]}
On error JSON: report and stop.
Step 3: Execute each commit
For each commit spec:
git reset HEAD -- . # (skip for first)
git add -- <spec.files>
git commit -m "<spec.message>"
Step 4: Output summary
| Commit | Message | Files |
|--------|---------|-------|
| abc1234 | feat(auth): add login | 3 |
**Total: N commits, M files**
Arguments
| Arg | Description |
|---|---|
--lang | Commit message language (default: en) |
--files | Comma-separated files to stage |
Workflow
Step 1: Stage files
git add -- <file1> <file2> ...
Step 2: Read staged diff
git diff --cached --stat
git diff --cached
Analyze the diff to understand:
- What changed (additions, deletions, modifications)
- The purpose of changes (new feature, bug fix, refactor, docs, etc.)
Step 3: Generate commit message
Create a conventional commit message:
type(scope): subject (max 50 chars, imperative mood)
Optional body explaining:
- What changed and why
- Any important details
Type selection:
feat: New functionalityfix: Bug fix, error handlingrefactor: Code restructuring without behavior changedocs: Documentation onlytest: Test additions or fixeschore: Dependencies, config, CI/CDstyle: Formatting, whitespace (no logic change)
Scope: Derive from file paths (e.g., src/auth/* → auth)
Body: Include when changes need explanation. Omit for trivial changes.
Step 4: Execute commit
git commit -m "<message>"
Use HEREDOC for multi-line messages:
git commit -m "$(cat <<'EOF'
type(scope): subject
Body paragraph here.
EOF
)"
Step 5: Output summary
| Commit | Message |
|--------|---------|
| abc1234 | feat(auth): add login validation |
**1 commit, N files**
Sponsors
Details
- Marketplace
- reedom/claude-code-commands
- Source
- git
- Author
- HANAI Tohru
- Category
- Productivity
- Keywords
- git, commit