skills/workflow/branch-discipline/SKILL.md
Enforce one branch per issue, small focused commits, and clean git history. Use with /branch command.
npx skillsauth add liauw-media/codeassist branch-disciplineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Principles for clean git history: one issue per branch, small commits, clear scope.
Every branch addresses exactly ONE issue, feature, or bug fix.
✓ feature/123-fix-login-validation
✓ feature/456-add-user-export
✗ feature/misc-fixes # Too vague
✗ feature/login-and-export # Two issues
Each commit is a single logical change that could be reverted independently.
✓ "fix(#123): validate email format"
✓ "fix(#123): add error message for invalid email"
✓ "test(#123): add email validation tests"
✗ "fix stuff"
✗ "WIP"
✗ "fix login, add export, refactor auth"
If you find another issue while working:
Working on #123 (login validation)
Found #789 (password reset bug)
✗ Fix both in same branch
✓ Note #789, continue with #123, branch for #789 later
Use git worktrees when you need to:
# Main repo stays on main
/project/ # main branch
# Each issue gets its own worktree
/project-123/ # feature/123 branch
/project-456/ # feature/456 branch
/branch [issue-id] [description] # Create branch + checklist
/branch [issue-id] [description] -w # + worktree for parallel work
Then immediately:
/mentor review requirements for #[id]: [description]
This catches unclear requirements and flawed approaches BEFORE you write code. Record findings in the checklist.
Before each commit, ask:
Incorporate mentor advice from initial review
Check progress:
/branch-status
Found unrelated issue?
/mentor review my implementation for #[id]
This catches blind spots and edge cases before team review. Record findings in the checklist.
/branch-done # Verify checklist, create PR
type(#issue): description
[optional body]
Types:
feat - new featurefix - bug fixrefactor - code restructuretest - add/update testsdocs - documentationchore - maintenanceExamples:
feat(#123): add email validation to login form
fix(#456): prevent duplicate user exports
refactor(#789): extract auth logic to service
test(#123): add unit tests for email validator
When using multiple agents simultaneously:
# Create worktrees for each agent/issue
git worktree add ../project-123 -b feature/123-task-a
git worktree add ../project-456 -b feature/456-task-b
git worktree add ../project-789 -b feature/789-task-c
../project-123/ → Issue #123../project-456/ → Issue #456../project-789/ → Issue #789# After merging
git worktree remove ../project-123
git branch -d feature/123-task-a
✗ "implement user management" # 50 files, 2000 lines
Break into:
✓ "feat(#100): add user model"
✓ "feat(#100): add user repository"
✓ "feat(#100): add user service"
✓ "feat(#100): add user controller"
✓ "test(#100): add user management tests"
✗ Branch for #123 contains fixes for #456 and #789
Keep branches focused:
✓ feature/123-login-fix → only #123 changes
✓ feature/456-export-bug → only #456 changes
✓ feature/789-auth-refactor → only #789 changes
✗ "WIP"
✗ "fix"
✗ "stuff"
Write meaningful messages:
✓ "fix(#123): handle null email input"
Each branch should have a checklist (created by /branch):
# Issue #[ID]: [Description]
## Scope
- What this branch WILL do
- What this branch will NOT do
## Checklist
### Before Starting
- [ ] Requirements understood
- [ ] Mentor review: `/mentor review requirements for #[ID]`
### During Work
- [ ] Changes limited to scope
- [ ] Mentor advice incorporated
- [ ] Tests added
### Before PR
- [ ] Mentor review: `/mentor review implementation for #[ID]`
- [ ] Tests passing
- [ ] Commits logical (max 3-5)
## Mentor Reviews
### Initial (before starting)
**Findings:** [mentor feedback]
**Action:** [what you changed]
### Final (before PR)
**Findings:** [mentor feedback]
**Action:** [what you changed]
## Commits
| Hash | Message |
|------|---------|
## Out-of-Scope Issues Found
- #XXX: [description] - branch later
| Command | Purpose |
|---------|---------|
| /branch [id] [desc] | Create focused branch + checklist |
| /branch [id] [desc] -w | + create worktree |
| /branch-status | Check progress on current branch |
| /branch-done | Complete branch, create PR |
| /branch-list | List all active branches/worktrees |
Works with:
git-workflow skill - general git practicesgit-worktrees skill - worktree detailscode-review skill - before mergingdevelopment
Use when decomposing complex work. Dispatch fresh subagent per task, review between tasks. Flow: Load plan → Dispatch task → Review output → Apply feedback → Mark complete → Next task. No skipping reviews, no parallel dispatch.
development
# Server Documentation System Set up a documentation system that tracks changes and maintains server/project documentation with Claude Code hooks. ## When to Use - Setting up a new server or development environment - Need to track configuration changes over time - Want automatic documentation of work sessions - Maintaining changelog for infrastructure ## Directory Structure ``` ~/docs/ # User home directory (cross-platform) ├── changelog.md # Global over
development
Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations.
development
Use when working on multiple features simultaneously. Creates isolated workspaces without branch switching, enabling parallel development.