Git workflow patterns for multi-environment deployments with GitHub. Applied automatically for branch management and release workflows.
Automates GitFlow for multi-environment deployments with staging and production branches. Claude will use this when creating branches, writing commits, or managing PRs to enforce proper workflow patterns.
/plugin marketplace add LeanEntropy/civax-cc-agents/plugin install railway-deployer@civax-cc-agentsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This workflow is optimized for projects with staging and production environments.
Production Deploys
↑
main ─────●───────────────●───────────────●──────►
↑ ↑ ↑
│ merge │ merge │ merge
│ │ │
develop ──●───●───●───●───●───●───●───●───●──────►
↑ ↑ ↑
│ │ │
feature/a ────┘ │ │
feature/b ────────────┘ │
hotfix/x ─────────────────────────┘
Staging Deploys
| Pattern | Purpose | Example |
|---|---|---|
main | Production code | - |
develop | Staging/integration | - |
feature/* | New features | feature/user-auth |
bugfix/* | Bug fixes | bugfix/login-error |
hotfix/* | Production emergencies | hotfix/security-patch |
release/* | Release preparation | release/v1.2.0 |
docs/* | Documentation | docs/api-reference |
<type>(<scope>): <subject>
<body>
<footer>
| Type | When to Use |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting (no code change) |
refactor | Code restructuring |
perf | Performance improvement |
test | Adding/fixing tests |
build | Build system changes |
ci | CI configuration |
chore | Maintenance tasks |
revert | Reverting changes |
feat(auth): implement JWT refresh tokens
Added automatic token refresh when JWT expires.
Tokens are refreshed 5 minutes before expiration.
Closes #123
fix(api): handle null response from payment gateway
The gateway occasionally returns null instead of error object.
Added defensive null check to prevent TypeError.
Fixes #456
chore(deps): update dependencies to latest versions
- Updated React from 18.2 to 18.3
- Updated FastAPI from 0.109 to 0.115
- Ran security audit, no vulnerabilities
<type>: <brief description>
Examples:
feat: Add user authentication systemfix: Resolve memory leak in image processingdocs: Update API documentation## Summary
Brief description of what this PR does.
## Changes
- Change 1
- Change 2
- Change 3
## Testing
How to test these changes:
1. Step 1
2. Step 2
3. Expected result
## Screenshots (if UI changes)
Before | After
--- | ---
 | 
## Checklist
- [ ] Tests pass
- [ ] No breaking changes
- [ ] Documentation updated
- [ ] Reviewed my own code
Closes #ISSUE_NUMBER
MAJOR.MINOR.PATCH
1.0.0 → 1.0.1 (patch: bug fix)
1.0.1 → 1.1.0 (minor: new feature, backward compatible)
1.1.0 → 2.0.0 (major: breaking change)
# 1. Ensure develop is stable
git checkout develop
git pull origin develop
# 2. Update version (if needed)
# Edit package.json, pyproject.toml, etc.
# 3. Create release PR
gh pr create --base main --head develop \
--title "Release v1.2.0" \
--body "## Release v1.2.0
### New Features
- Feature A
- Feature B
### Bug Fixes
- Fix X
- Fix Y
### Breaking Changes
None"
# 4. After merge, tag
git checkout main
git pull origin main
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin v1.2.0
# During merge
git merge develop
# CONFLICT in file.js
# 1. Open conflicted files
# Look for conflict markers:
<<<<<<< HEAD
current branch code
=======
incoming branch code
>>>>>>> develop
# 2. Edit to resolve (keep what you need)
# 3. Mark as resolved
git add file.js
# 4. Complete merge
git commit -m "Merge develop: resolve conflicts in file.js"
git status # Current state
git log --oneline -10 # Recent history
git diff # Unstaged changes
git diff --staged # Staged changes
git branch -vv # Branches with tracking
git checkout -b feature/x # Create and switch
git branch -d feature/x # Delete local (safe)
git branch -D feature/x # Delete local (force)
git push origin --delete feature/x # Delete remote
git log --graph --oneline # Visual history
git blame file.js # Who changed what
git show abc123 # View specific commit
git log --follow file.js # History of renamed file
git checkout -- file.js # Discard unstaged changes
git reset HEAD file.js # Unstage file
git reset --soft HEAD~1 # Undo commit, keep changes
git reset --hard HEAD~1 # Undo commit, discard changes
git revert abc123 # Create undo commit
git stash # Save work temporarily
git stash list # View stashes
git stash pop # Restore and delete stash
git stash apply # Restore, keep stash
git stash drop # Delete stash
# PRs
gh pr create # Create PR interactively
gh pr list # List open PRs
gh pr view 123 # View PR details
gh pr checkout 123 # Checkout PR locally
gh pr merge 123 --squash # Merge with squash
# Issues
gh issue create # Create issue
gh issue list # List issues
gh issue close 123 # Close issue
# Repository
gh repo view # View repo info
gh repo clone owner/repo # Clone repository
main branch:develop branch:#!/bin/sh
# Run linting before commit
npm run lint
#!/bin/sh
# Validate commit message format
if ! grep -qE "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?: .+" "$1"; then
echo "Invalid commit message format"
exit 1
fi
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 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 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.