skills/workflow/finishing-a-development-branch/SKILL.md
Use when ready to merge feature branch. Complete checklist before creating PR/MR. Ensures professional quality and prevents embarrassing mistakes.
npx skillsauth add liauw-media/codeassist finishing-a-development-branchInstall 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.
Before creating a Pull/Merge Request, complete a comprehensive checklist to ensure professional quality work.
NEVER create a PR/MR without completing the finish checklist.
Incomplete PRs waste reviewer time and damage your reputation.
./scripts/safe-test.sh)I'm using the finishing-a-development-branch skill before creating PR.
Running through complete checklist...
Code Completion:
✅ All features implemented
✅ No TODO comments
✅ No debugging code
Testing:
✅ Running final test suite with backup
✅ All 127 tests pass
✅ Coverage: 87%
[... complete all sections ...]
Ready to create PR ✅
# Ensure branch is up to date
git checkout main
git pull origin main
git checkout feature/authentication
git merge main
# Or use rebase for cleaner history
git rebase main
# Resolve any conflicts
[if conflicts, resolve them]
# Run tests again after merge/rebase
./scripts/safe-test.sh vendor/bin/paratest
If commit history is messy:
# Interactive rebase to squash/reword commits
git rebase -i main
# Squash all commits into one (if appropriate)
# Or clean up commit messages
# Or split large commits
# Force push after rebase (ONLY on feature branches)
git push --force-with-lease origin feature/authentication
Template:
## What
Brief description of what this PR does
## Why
Why is this change needed? What problem does it solve?
## Changes
- Bullet point list of major changes
- Added X
- Modified Y
- Removed Z
## Testing
How to test these changes:
1. Step 1
2. Step 2
3. Expected result
Test results:
- All tests pass (X tests)
- Manual testing completed
- No regressions detected
## Screenshots/Videos
(If applicable, add screenshots or video demonstrating changes)
## Breaking Changes
(If any, list them with migration instructions)
## Checklist
- [ ] Tests pass
- [ ] Documentation updated
- [ ] No merge conflicts
- [ ] Reviewed own code
Closes #123
Example:
## What
Implements JWT token-based authentication for API using Laravel Sanctum
## Why
Needed stateless authentication to support mobile app. Session-based auth doesn't work well for mobile clients.
## Changes
- Added Laravel Sanctum package
- Created AuthController with register/login/logout endpoints
- Added auth:sanctum middleware to protected routes
- Implemented token generation and revocation
- Added 15 tests covering auth flows
- Updated API documentation
## Testing
How to test:
1. POST /api/register with email/password
2. Receive token in response
3. Use token in Authorization header for protected routes
4. POST /api/logout to revoke token
Test results:
- All 127 tests pass (added 15 new auth tests)
- Manual testing completed with Postman
- Tested token expiration
- Tested invalid credentials
- Tested protected route access
## API Endpoints
New endpoints:
- POST /api/register - User registration
- POST /api/login - User login (returns token)
- POST /api/logout - Token revocation (protected)
Protected endpoints now require:
Authorization: Bearer {token}
## Breaking Changes
None. Existing endpoints unchanged. New auth is opt-in for protected routes.
## Migration Instructions
1. Run migrations: `php artisan migrate`
2. Publish Sanctum config (optional): `php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"`
3. Add `SANCTUM_STATEFUL_DOMAINS` to .env (for SPA, optional)
## Rollback Plan
If issues occur:
```bash
php artisan migrate:rollback --step=2
composer remove laravel/sanctum
Closes #45
### Step 5: Create PR/MR
**GitHub:**
```bash
# Using GitHub CLI
gh pr create \
--title "feat(auth): Add JWT token authentication" \
--body-file pr-description.md \
--base main \
--head feature/authentication
# Or interactively
gh pr create
GitLab:
# Using GitLab CLI
glab mr create \
--title "feat(auth): Add JWT token authentication" \
--description "$(cat pr-description.md)" \
--source-branch feature/authentication \
--target-branch main
# Or interactively
glab mr create
After creating PR:
PR created: #156
Post-PR checklist:
- [ ] Link to related issues
- [ ] Request reviewers
- [ ] Add labels (feature, enhancement, etc.)
- [ ] Assign to milestone (if applicable)
- [ ] Add to project board (if applicable)
- [ ] Notify team in chat/email
Monitoring:
- Watch for CI/CD results
- Address reviewer comments promptly
- Keep branch up to date if base changes
Bad PR:
Title: "Update"
Description: "Fixed stuff"
Changes: 50 files modified, no explanation
Why bad: Reviewers have no context, can't review effectively
Fix: Complete title, thorough description, explain changes
Bad PR:
Title: "Add authentication, payment, and notification systems"
Changes: 150 files, 5000 lines
Why bad: Too large to review effectively, high chance of bugs
Fix: Split into multiple smaller PRs
Good size: < 400 lines of actual code changes
Bad PR:
- Tests: 5 passing, 3 failing
- CI: ❌ Failed
- Description: "Tests will pass after merge"
Why bad: Breaks the build, unprofessional
Fix: Make tests pass BEFORE creating PR
Bad PR:
- Status: Has merge conflicts with main
- Comment: "Can someone resolve the conflicts?"
Why bad: PR author should resolve conflicts
Fix: Merge main into your branch, resolve conflicts, test, push
Bad PR:
Title: "Fix bug"
Description: (empty)
Changes: Modified 3 files
Why bad: Reviewers don't know what bug or how it was fixed
Fix: Explain the bug, root cause, and solution
Reviewer comment:
"This AuthController method is 100 lines. Can you split it?"
Good response:
"Good catch! I'll refactor this into:
- validateCredentials() method
- generateToken() method
- logAuthEvent() method
Will push update today."
[Make changes, push, notify reviewer]
"Updated! AuthController methods now < 30 lines each."
Reviewer comment:
"Use bcrypt instead of argon2"
Your response (if you disagree):
"I chose argon2 because:
1. More secure (2015 Password Hashing Competition winner)
2. Better resistance to GPU attacks
3. Laravel default since 5.8
However, happy to switch to bcrypt if there's a specific concern. What do you think?"
[Discuss, reach consensus, implement agreed solution]
Prerequisites:
code-review - Self-review before PRverification-before-completion - Final checksexecuting-plans - Implementation completeUse with:
git-workflow - Commit conventionsdatabase-backup - Test before PRsystematic-debugging - If issues foundAfter PR created:
This skill is based on:
Social Proof: Google, Facebook, Microsoft all have rigorous PR processes.
Before creating PR/MR:
Bottom Line: Your PR represents you. Make it professional, complete, and easy to review. Reviewers' time is valuable - respect it by submitting quality work.
development
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.