Use when working with git operations - generates smart commit messages (present tense, imperative), manages branches, creates PRs with summaries, follows git best practices. Activates when user says "commit this", "create PR", "push changes", mentions "git", "branch", "merge", or before committing code.
Automates git workflows with smart commits, branch management, and PR creation. Activates when you mention git operations like "commit this" or "create PR", generating conventional commits and preventing dangerous operations.
/plugin marketplace add xbklairith/kisune/plugin install dev-workflow@kisuneThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Manage git operations with best practices, generating meaningful commit messages, managing branches safely, creating comprehensive pull requests, and preventing common git mistakes.
Activate this skill when:
Goal: Generate meaningful, consistent commit messages that explain WHY changes were made
Process:
Analyze Changes
# Check what files changed
git status
# See actual changes
git diff
Understand Intent
Generate Commit Message Follow this format:
[type]: [concise description in present tense]
Commit Types:
feat - New featurefix - Bug fixrefactor - Code restructuring without behavior changetest - Adding or updating testsdocs - Documentation changeschore - Maintenance tasks (deps, config, etc.)style - Code formatting (no logic change)perf - Performance improvementsMessage Guidelines:
Show and Confirm Present the commit message to user:
Proposed commit message:
feat: Add JWT authentication with refresh tokens
This will commit:
- src/auth/jwt.js
- src/auth/refresh.js
- tests/auth/jwt.test.js
Proceed with this commit?
Execute and Verify
# Stage files if not already staged
git add [files]
# Commit with generated message
git commit -m "feat: Add JWT authentication with refresh tokens"
# Verify commit
git log -1 --oneline
Examples of Good Commit Messages:
feat: Add RSI indicator to market analysis
fix: Handle division by zero in position sizing
refactor: Extract strategy validation into separate function
test: Add edge cases for order execution
docs: Update API documentation with new endpoints
chore: Update dependencies to latest versions
perf: Optimize database queries with indexes
Examples of Bad Commit Messages (Avoid):
updated files ❌ Too vague
fixed bug ❌ Which bug?
WIP ❌ Not descriptive
asdfgh ❌ Nonsense
Added new stuff ❌ Past tense, vague
implemented feature ❌ Past tense, which feature?
Branch Naming Conventions:
Follow this structure: [type]/[description]
Branch Types:
feature/[feature-name] - New featuresfix/[issue-description] - Bug fixesrefactor/[component-name] - Code restructuringexperiment/[idea-name] - Experimental workhotfix/[critical-issue] - Urgent production fixesExamples:
feature/user-authentication
fix/login-timeout-error
refactor/payment-processing
experiment/ml-price-prediction
hotfix/security-vulnerability
Branch Operations:
Creating Branch:
# Create and switch to new branch
git checkout -b feature/user-authentication
# Or with newer syntax
git switch -c feature/user-authentication
Switching Branches:
# Switch to existing branch
git checkout feature/user-authentication
# Or with newer syntax
git switch feature/user-authentication
Listing Branches:
# Local branches
git branch
# All branches (including remote)
git branch -a
# With last commit info
git branch -v
Deleting Branches:
# Delete local branch (safe - prevents deleting unmerged)
git branch -d feature/old-feature
# Force delete (use with caution)
git branch -D feature/abandoned-work
# Delete remote branch
git push origin --delete feature/old-feature
Safety Warnings:
Before dangerous operations, warn user:
⚠️ WARNING: You're about to push to main/master
This is generally discouraged. Consider:
1. Creating a feature branch
2. Opening a pull request for review
Proceed anyway? (yes/no)
Goal: Create comprehensive PRs with clear context and checklists
Process:
Analyze All Commits
# See all commits in this branch
git log main..HEAD --oneline
# See detailed changes
git diff main...HEAD
Review Changes
Generate PR Description Use this template:
## Summary
[Brief overview of what this PR does and why]
## Changes
- [Key change 1]
- [Key change 2]
- [Key change 3]
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
- [ ] Edge cases tested
## Code Quality
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex logic
- [ ] No console.log or debug code left
- [ ] Documentation updated
## Screenshots (if applicable)
[Add screenshots for UI changes]
## Related Issues
Closes #[issue number]
Create PR with gh CLI
# Create PR with title and body
gh pr create --title "[Type]: Brief description" --body "$(cat <<'EOF'
## Summary
[Description]
## Changes
- [Change 1]
- [Change 2]
## Testing
- [ ] All tests pass
EOF
)"
Return PR URL
✅ Pull Request Created!
URL: https://github.com/user/repo/pull/42
Title: feat: Add user authentication system
Next steps:
- Request reviewers
- Wait for CI/CD checks
- Address review feedback
Pre-Commit Safety:
Before allowing commit, check:
No Secrets
# Look for potential secrets
git diff --cached | grep -i "api_key\|secret\|password\|token"
If found:
⚠️ SECURITY WARNING: Potential secrets detected!
Found suspicious patterns:
- API_KEY on line 23 of config.js
DO NOT commit secrets to version control!
Actions:
1. Add to .gitignore
2. Use environment variables
3. Use secret management tools
Abort commit? (yes/no)
Tests Pass
# Run test suite
npm test
If tests fail:
⚠️ TEST FAILURE: Cannot commit with failing tests
Failed tests:
- auth.test.js: login should return token
- auth.test.js: invalid password should reject
Fix tests before committing.
Large Commits Warning If more than 10 files changed:
⚠️ LARGE COMMIT WARNING
This commit changes 23 files.
Consider breaking into smaller, focused commits:
Example:
1. Commit core logic changes
2. Commit test updates
3. Commit documentation
Proceed with large commit anyway? (yes/no)
Pre-Push Safety:
Before pushing:
Check Current Branch
git branch --show-current
If on main/master:
⚠️ DANGER: You're on the main branch!
Direct pushes to main are discouraged.
Recommended workflow:
1. Create feature branch
2. Make changes
3. Open pull request
4. Merge after review
Proceed with push to main? (yes/no)
Force Push Warning
If user attempts git push --force:
🚨 CRITICAL WARNING: Force push detected!
Force push to main/master is DESTRUCTIVE and will:
- Rewrite history for all collaborators
- Potentially lose work from others
- Break ongoing pull requests
This should ONLY be done if you know exactly what you're doing.
Branch: [branch-name]
Target: origin/[branch-name]
Type "I understand the risks" to proceed:
Pre-Merge Safety:
Before merging:
Check for Conflicts
git merge --no-commit --no-ff [branch]
git merge --abort
Verify CI Status
gh pr checks
Confirm Approvals
gh pr view --json reviews
User: "I've finished the authentication feature, let's commit"
Assistant:
Activating git-workflow skill for smart commit.
Analyzing changes...
$ git status
$ git diff
Changes detected:
- src/auth/login.js (new file, 150 lines)
- src/auth/session.js (new file, 80 lines)
- tests/auth/login.test.js (new file, 200 lines)
- package.json (modified, +2 dependencies)
Commit type: feat (new feature)
Proposed commit message:
feat: Add JWT authentication with session management
This includes:
- Login endpoint with JWT generation
- Session management with refresh tokens
- Comprehensive test coverage
Proceed with this commit? (yes/no)
User: "yes"
Assistant:
Running pre-commit checks...
✅ No secrets detected
✅ Tests passing (52/52)
✅ Linter clean
Committing...
$ git add src/auth tests/auth package.json
$ git commit -m "feat: Add JWT authentication with session management"
✅ Commit successful!
[feature/user-authentication a1b2c3d] feat: Add JWT authentication with session management
4 files changed, 432 insertions(+)
Next steps:
- Push to remote: git push -u origin feature/user-authentication
- Create pull request
Would you like me to push and create a PR?
[Confidence: 0.9]
User: "Create a PR for my authentication feature"
Assistant:
Activating git-workflow skill for PR creation.
Analyzing branch changes...
$ git log main..HEAD --oneline
Commits to include:
a1b2c3d feat: Add JWT authentication with session management
b2c3d4e test: Add edge cases for token expiration
c3d4e5f docs: Update API documentation for auth endpoints
$ git diff main...HEAD --stat
Files changed:
- src/auth/ (6 files, 430 additions)
- tests/auth/ (4 files, 350 additions)
- docs/api.md (45 additions)
Generating PR description...
## Summary
Implements JWT-based authentication system with session management and refresh token support. Provides secure user login, token validation, and automatic session renewal.
## Changes
- JWT token generation and validation
- Refresh token mechanism for extended sessions
- Session middleware for protected routes
- Comprehensive test suite with edge cases
- API documentation updates
## Type of Change
- [x] New feature (non-breaking change which adds functionality)
## Testing
- [x] Unit tests pass (52/52)
- [x] Integration tests pass (12/12)
- [x] Manual testing completed
- [x] Edge cases tested (token expiration, invalid tokens)
## Code Quality
- [x] Code follows project style guidelines
- [x] Self-review completed
- [x] Comments added for complex logic
- [x] No debug code left
- [x] Documentation updated
Creating PR...
$ gh pr create --title "feat: Add JWT authentication system" --body "[body]"
✅ Pull Request Created!
URL: https://github.com/user/repo/pull/42
Title: feat: Add JWT authentication system
Status: Open
Next steps:
1. Request reviewers: gh pr review --request @reviewer
2. Monitor CI checks: gh pr checks
3. Address feedback when reviews come in
[Confidence: 0.9]
User: "Push my changes to main"
Assistant:
Activating git-workflow skill for safety check.
$ git branch --show-current
main
⚠️ DANGER: You're about to push directly to main!
This is generally discouraged because:
- No code review before merging
- Potential to break production
- No CI/CD verification gate
- Difficult to revert if issues arise
Recommended workflow:
1. Create feature branch: git checkout -b feature/your-feature
2. Push to feature branch: git push -u origin feature/your-feature
3. Create pull request: gh pr create
4. Get code review
5. Merge via PR after approval
Alternative: If this is your personal project and you're certain, you can:
- Ensure all tests pass first
- Review your own changes carefully
- Proceed with direct push
What would you like to do?
1. Create feature branch and PR (recommended)
2. Run tests then push to main (risky)
3. Cancel operation
[Confidence: 1.0]
code-quality skill for pre-commit reviewsspec-driven skill for commit messages during executionsystematic-testing skill to verify tests before commitThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.