analyze-dependencies
Analyze project dependencies and evaluate architectural health. Trigger with "analyze dependencies", "detect circular dependencies", "architecture issues?",…
Split changes into semantic units and commit. Trigger with "commit", "commit changes", "split and commit", "semantic commit", "commit in logical units".
$ npx -y skills add wasabeef/claude-code-cookbook --skill semantic-commit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/semantic-commitContext preview
The summary Claude sees to decide when to auto-load this skill.
Split changes into semantic units and commit. Trigger with "commit", "commit changes", "split and commit", "semantic commit", "commit in logical units".
description: 'Split changes into semantic units and commit. Trigger with "commit", "commit changes", "split and commit", "semantic commit", "commit in logical units".' allowed-tools: - Bash(git *) - Read - Grep
Breaks big changes into small, meaningful commits with proper messages. Uses only standard git commands.
/semantic-commit [options]
# Analyze current changes and commit in logical units /semantic-commit # Check split proposal only (no actual commit) /semantic-commit --dry-run # Generate commit messages in English /semantic-commit --lang en # Split into maximum 5 commits /semantic-commit --max-commits 5
1. **Analyze Changes**: Check what changed with `git diff HEAD` 2. **Group Files**: Put related files together 3. **Create Messages**: Write semantic commit messages for each group 4. **Commit Step by Step**: Commit each group after you approve
We split when we see:
1. **Many Files**: 5+ files changed 2. **Many Lines**: 100+ lines changed 3. **Multiple Features**: Changes in 2+ areas 4. **Mixed Types**: feat + fix + docs together
# Analyze change scale
CHANGED_FILES=$(git diff HEAD --name-only | wc -l)
CHANGED_LINES=$(git diff HEAD --stat | tail -1 | grep -o '[0-9]\+ insertions\|[0-9]\+ deletions' | awk '{sum+=$1} END {print sum}')
if [ $CHANGED_FILES -ge 5 ] || [ $CHANGED_LINES -ge 100 ]; then
echo "Large change detected: splitting recommended"
fi# Identify functional units from directory structure git diff HEAD --name-only | cut -d'/' -f1-2 | sort | uniq # → src/auth, src/api, components/ui, etc.
# New files vs existing file modifications git diff HEAD --name-status | grep '^A' # New files git diff HEAD --name-status | grep '^M' # Modified files git diff HEAD --name-status | grep '^D' # Deleted files
# Detect import relationship changes git diff HEAD | grep -E '^[+-].*import|^[+-].*require' | \ cut -d' ' -f2- | sort | uniq
# Get list of changed files
git diff HEAD --name-only
# Analyze each file's changes individually
git diff HEAD -- <file>
# Determine change type for files
git diff HEAD --name-status | while read status file; do
case $status in
A) echo "$file: New creation" ;;
M) echo "$file: Modification" ;;
D) echo "$file: Deletion" ;;
R*) echo "$file: Renamed" ;;
esac
done1. **By Feature**: Keep related functions together
2. **By Type**: Same kind of changes
3. **By Dependencies**: Files that need each other
4. **By Size**: Keep commits manageable
$ /semantic-commit Analyzing changes... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Detected changes: • src/auth/login.ts (modified) • src/auth/register.ts (new) • src/auth/types.ts (modified) • tests/auth.test.ts (new) • docs/authentication.md (new) Proposed commit splits: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Commit 1/3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Message: feat: implement user registration and login system Included files: • src/auth/login.ts • src/auth/register.ts • src/auth/types.ts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Commit 2/3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Message: test: add comprehensive tests for authentication system Included files: • tests/auth.test.ts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Commit 3/3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Message: docs: add authentication system documentation Included files: • docs/authentication.md Execute commit with this split plan? (y/n/edit):
$ /semantic-commit --dry-run Analyzing changes... (DRY RUN) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [Commit split proposal display] ℹ️ DRY RUN mode: No actual commits will be executed 💡 To execute, run again without --dry-run option
# Detect bug fix patterns - Keywords like "fix", "bug", "error" - Addition of exception handling - Condition branch fixes # Detect new feature patterns - New file creation - New method additions - API endpoint additions
# Reset unstaged changes if any git reset HEAD git status --porcelain > /tmp/original_state.txt # Check working branch CURRENT_BRANCH=$(git branch --show-current) echo "Working branch: $CURRENT_BRANCH"
# Read split plan while IFS= read -r commit_plan; do group_num=$(echo "$c
A collection of commands, roles, and automation scripts for Claude Code. Automate your workflow without unnecessary confirmations, allowing you to focus on what matters.
Repo: wasabeef/claude-code-cookbook
Analyze project dependencies and evaluate architectural health. Trigger with "analyze dependencies", "detect circular dependencies", "architecture issues?",…
Performance analysis based on Core Web Vitals with UX scoring. Trigger with "analyze performance", "improve speed", "check Core Web Vitals", "page speed",…
Verify information accuracy against codebase and documentation. Trigger with "is this correct?", "fact check", "verify this", "is this accurate?".
Evaluate and improve AI prompt quality. Trigger with "check this prompt", "evaluate prompt quality", "improve this prompt".
Generate commit messages from staged changes. Trigger with "suggest commit message", "generate commit message", "what should the commit say?", "write commit…