From crew
Classifies staged git changes as structural (tidy) or behavioral (build) per Kent Beck's Tidy First principles, and detects when both are mixed in a single commit. Invoke before committing to check: should I split this commit? Are my renames/refactors mixed with new features? Is this a valid [tidy] or [feat] commit? Also handles commit prefix selection, hotfix exceptions, and staged diff readiness review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/crew:commit-disciplineThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Enforces Tidy First: separate structural and behavioral changes.
Enforces Tidy First: separate structural and behavioral changes.
git diff --cached --stat 2>/dev/null || echo "(no staged changes)"git diff --cached --name-only 2>/dev/null || echo "(none)"status: VALID | INVALID | MIXED_CHANGE_DETECTED
change_type: tidy | build | mixed
suggestion: [commit split recommendation if mixed]
"Never mix structural and behavioral changes in the same commit." — Kent Beck, Tidy First
/crew:review| Prefix | Type | Allowed Changes |
|---|---|---|
[tidy] | Structural | Rename, extract, reorganize, dead code |
[feat] | Behavioral | New functions, features |
[fix] | Behavioral | Logic corrections |
[test] | Behavioral | New/updated tests |
[docs] | Neutral | Comments, README |
No behavior change: rename, extract method, move code, remove dead code, formatting Verify: Tests pass before AND after
Alters behavior: new function, logic change, new tests, new deps Verify: New tests written, all pass
structural_indicators: rename, similar_line_count (±5%), no_new_exports/functions/logic
behavioral_indicators: new_exports, new_functions, logic_additions, new_tests, new_deps
classification:
all_structural → tidy
all_behavioral → build
mixed → SPLIT_REQUIRED
1. Read git diff --staged
2. Classify each file
3. Aggregate:
- All tidy → ✅ [tidy] prefix
- All build → ✅ [feat]/[fix] prefix
- Mixed → ❌ Block, suggest split
⚠️ Mixed Change Detected
Structural: jwt.ts rename, helpers.ts extract
Behavioral: jwt.ts new function, modified logic
Recommendation:
1. [tidy] Improve naming in auth module
2. [feat] Add token refresh functionality
| Case | Approach |
|---|---|
| Large refactor | Multiple small [tidy] commits |
| Emergency fix | [hotfix] allowed, document why |
Will: Analyze staged changes, block mixed commits, suggest splitting Won't: Auto-split (requires user), modify staged, force without consent
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub jaebit/claudemate --plugin crew