Loading...
Loading...
Git workflow and GitHub collaboration patterns including conventional commits, branch naming, PR workflow, and gh CLI usage. Use when creating commits, branches, or pull requests. TRIGGER when: git commit, branch, PR, pull request, merge, gh cli. DO NOT TRIGGER when: code implementation, testing, documentation without git operations.
npx skill4agent add akaszubski/autonomous-dev git-github<type>(<scope>): <description>
[optional body]
[optional footer(s)]| Type | When to Use |
|---|---|
| New feature or capability |
| Bug fix |
| Documentation only changes |
| Formatting, missing semicolons, etc. |
| Code change that neither fixes a bug nor adds a feature |
| Performance improvement |
| Adding or correcting tests |
| Build process, auxiliary tools, or maintenance |
| CI/CD configuration changes |
feat(auth): add JWT token refresh endpoint
fix(api): handle null response from upstream service
docs: update API reference for v2 endpoints
refactor(db): extract query builder into separate module
test(auth): add integration tests for OAuth flow
chore: upgrade dependencies to latest versions!BREAKING CHANGE:feat(api)!: change response format from XML to JSON<type>/<issue-number>-<short-description>| Pattern | Example |
|---|---|
| Feature | |
| Bug fix | |
| Docs | |
| Refactor | |
# Create PR with title and body
gh pr create --title "feat: add user authentication" --body "$(cat <<'EOF'
## Summary
- Add JWT-based authentication
- Implement login/logout endpoints
## Test plan
- [ ] Unit tests for token generation
- [ ] Integration tests for auth flow
EOF
)"
# Create draft PR
gh pr create --draft --title "wip: refactor database layer"
# Create PR targeting specific base branch
gh pr create --base develop --title "feat: new feature"# List open PRs
gh pr list
# View PR details
gh pr view 123
# Check out PR locally
gh pr checkout 123
# Approve PR
gh pr review 123 --approve
# Request changes
gh pr review 123 --request-changes --body "Please fix the error handling"
# Merge PR
gh pr merge 123 --squash --delete-branch# Create issue with title and body
gh issue create --title "Bug: login fails on Safari" --body "Steps to reproduce..."
# Create with labels
gh issue create --title "feat: dark mode" --label "enhancement,ui"
# Create with assignee
gh issue create --title "fix: memory leak" --assignee "@me"| Label | Color | Purpose |
|---|---|---|
| red | Something broken |
| blue | New feature request |
| green | Docs improvement |
| purple | Beginner friendly |
| orange | Needs immediate attention |
# In PR body
Closes #123
Fixes #456
Resolves #789# Format code
black --check src/
isort --check src/
# Lint
flake8 src/
# Check for secrets
detect-secrets scan# Run tests
pytest tests/ -x --timeout=60
# Type check
mypy src/# Validate conventional commit format
pattern="^(feat|fix|docs|style|refactor|perf|test|chore|ci)(\(.+\))?!?: .{1,72}"
if ! echo "$1" | grep -qE "$pattern"; then
echo "Invalid commit message format"
exit 1
figit stash push -m "wip: authentication changes"
git stash list
git stash popgit rebase -i HEAD~3 # Squash last 3 commitsgit cherry-pick abc1234 # Apply specific commitgit merge main # Trigger merge
# Fix conflicts in editor
git add .
git commit # Complete merge.envtype/issue-descriptionfeat:fix:docs: