analyze-dependencies
Analyzes your project's dependencies and checks architecture health.
Breaks big changes into small, meaningful commits with proper messages. Uses only standard git commands.
> /plugin marketplace add wasabeef/claude-code-cookbookHow it fires
How this command gets triggered: by you, by Claude, or both.
/semantic-commitContext preview
What this command does when you run it.
Breaks big changes into small, meaningful commits with proper messages. Uses only standard git commands.
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 "$commit_plan" | cut -d':' -f1)
files=$(echo "$commit_plan" | cut -d':' -f2- | tr ' ' '\n')
echo "=== Executing commit $group_num ==="
# Stage only relevant files
echo "$files" | while read file; do
if [ -f "$file"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
Analyzes your project's dependencies and checks architecture health.
Analyzes application performance from a user experience perspective and quantifies experience improvements from optimizations. Calculates UX scores based on…
Verifies if a statement is true by checking your project's code and documentation.
A comprehensive collection of best practices for evaluating and improving the quality of prompts for AI Agents. It systematizes knowledge gained from actual…
Generates commit messages from staged changes (git diff --staged). This command only creates messages and copies them to your clipboard—it doesn't run any git…