.agents/skills/scientiacapital-git-workflow/SKILL.md
Git workflow patterns - conventional commits, branch naming, PR templates, merge strategies. Use when: commit, PR, branch naming, git workflow, conventional commits, semantic versioning.
npx skillsauth add kissrosecicd-hub/agents-evolution git-workflowInstall 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.
This skill complements worktree-manager-skill (which handles parallel development) by providing the conventions for commits and PRs within those worktrees. </objective>
<quick_start> Conventional Commit format:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Example:
git commit -m "feat(auth): add JWT refresh token rotation
Implements automatic token refresh 5 minutes before expiry.
Closes #123"
Branch naming: <type>/<ticket>-<short-description>
git checkout -b feat/AUTH-123-refresh-tokens
</quick_start>
<success_criteria> Git workflow is successful when:
<type>/<ticket>-<description> pattern<conventional_commits>
Based on conventionalcommits.org
| Type | Description | Changelog Section | Version Bump | |------|-------------|-------------------|--------------| | feat | New feature | Features | Minor | | fix | Bug fix | Bug Fixes | Patch | | docs | Documentation only | - | - | | style | Formatting, no code change | - | - | | refactor | Code change, no feature/fix | - | - | | perf | Performance improvement | Performance | Patch | | test | Adding/fixing tests | - | - | | build | Build system changes | - | - | | ci | CI configuration | - | - | | chore | Maintenance tasks | - | - |
Add ! after type or BREAKING CHANGE: in footer:
# Method 1: Bang notation
feat(api)!: change response format to JSON:API
# Method 2: Footer
feat(api): change response format to JSON:API
BREAKING CHANGE: Response structure changed from { data } to { data, meta, links }
Scope is optional but recommended. Use consistent scopes per project:
# Good scopes
auth, api, ui, db, config, deps
# Examples
feat(auth): add OAuth2 support
fix(api): handle null response from external service
docs(readme): add installation instructions
<type>(<scope>): <subject>
│ │ │
│ │ └─> Summary in present tense, no period, max 50 chars
│ │
│ └─> Component/area affected (optional)
│
└─> Type: feat, fix, docs, style, refactor, perf, test, build, ci, chore
[blank line]
[optional body - explain what and why, not how]
[blank line]
[optional footer(s) - breaking changes, issue references]
| Bad | Good | Why |
|-----|------|-----|
| fixed bug | fix(auth): prevent token expiry race condition | Specific, scoped |
| updates | refactor(api): extract validation middleware | Describes change |
| WIP | feat(ui): add loading skeleton (WIP) | Clear intent |
| misc changes | chore: update dependencies to latest versions | Typed, meaningful |
</conventional_commits>
<branch_naming>
<type>/<ticket-id>-<short-description>
| Type | Use For | Example | |------|---------|---------| | feat/ | New features | feat/AUTH-123-oauth-login | | fix/ | Bug fixes | fix/API-456-null-response | | hotfix/ | Urgent production fixes | hotfix/PROD-789-payment-failure | | docs/ | Documentation | docs/README-update | | refactor/ | Code restructuring | refactor/cleanup-legacy-api | | test/ | Test additions | test/add-auth-integration | | chore/ | Maintenance | chore/update-deps | | release/ | Release branches | release/v2.1.0 |
feat/auth-login not feat/Auth-Loginfix/null-response not fix/null_responsefeat/JIRA-123-descriptionfeat/user-profile not feat/feature1| Branch | Protection | Merge Strategy | |--------|------------|----------------| | main | Require PR + review | Squash merge | | develop | Require PR | Merge commit | | release/* | Require PR + CI pass | Merge commit |
# Feature work
git checkout -b feat/PROJ-123-user-authentication
# Bug fix
git checkout -b fix/PROJ-456-login-redirect-loop
# Hotfix (from main)
git checkout main
git checkout -b hotfix/PROJ-789-payment-timeout
# Documentation
git checkout -b docs/api-endpoint-reference
# Chore
git checkout -b chore/upgrade-node-20
</branch_naming>
<pr_templates>
## Summary
<!-- 1-3 bullet points describing the change -->
-
## Type of Change
<!-- Check one -->
- [ ] feat: New feature
- [ ] fix: Bug fix
- [ ] docs: Documentation
- [ ] refactor: Code restructuring
- [ ] test: Test coverage
- [ ] chore: Maintenance
## Test Plan
<!-- How did you verify this works? -->
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated (if needed)
- [ ] No console.log or debug code
- [ ] No sensitive data exposed
## Related Issues
<!-- Link related issues -->
Closes #
## Screenshots
<!-- If UI change, add before/after -->
## What
<!-- One sentence -->
## Why
<!-- One sentence -->
## Test
<!-- How verified -->
Closes #
## Release v{VERSION}
### Changes Since Last Release
<!-- Auto-generated or manual list -->
### Breaking Changes
<!-- List any breaking changes -->
### Migration Guide
<!-- If breaking changes, how to migrate -->
### Deployment Notes
<!-- Any special deployment steps -->
### Rollback Plan
<!-- How to rollback if issues -->
</pr_templates>
<merge_strategies>
| Branch Type | Strategy | Rationale | |-------------|----------|-----------| | feat/* | Squash | Clean single commit in main | | fix/* | Squash | Clean single commit in main | | hotfix/* | Merge | Preserve hotfix history | | release/* | Merge | Preserve release commits | | refactor/* | Squash or Rebase | Depends on commit count |
# Squash merge (recommended for features)
git checkout main
git merge --squash feat/my-feature
git commit -m "feat(scope): description"
# Merge commit (for releases)
git checkout main
git merge --no-ff release/v2.0.0
# Rebase (for clean linear history)
git checkout feat/my-feature
git rebase main
git checkout main
git merge feat/my-feature
# Interactive rebase (clean up before PR)
git rebase -i HEAD~5
Is this a feature or fix branch?
├── Yes → Squash merge
└── No → Is this a release or hotfix?
├── Yes → Merge commit (preserve history)
└── No → Consider context
</merge_strategies>
<commit_hooks>
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [
'feat', 'fix', 'docs', 'style', 'refactor',
'perf', 'test', 'build', 'ci', 'chore'
]],
'scope-case': [2, 'always', 'lowercase'],
'subject-case': [2, 'always', 'sentence-case'],
'subject-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 100],
}
};
# Install
npm install -D husky @commitlint/cli @commitlint/config-conventional
# Initialize
npx husky init
# Add commit-msg hook
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
# .husky/pre-commit
#!/bin/sh
npm run lint
npm run test -- --run
</commit_hooks>
<versioning> ## Semantic VersioningMAJOR.MINOR.PATCH
│ │ │
│ │ └─> Bug fixes (fix:)
│ │
│ └─> New features (feat:)
│
└─> Breaking changes (feat!: or BREAKING CHANGE:)
| Commit Type | Example | Version Change | |-------------|---------|----------------| | fix: | fix: null check | 1.0.0 → 1.0.1 | | feat: | feat: new endpoint | 1.0.1 → 1.1.0 | | feat!: | feat!: new API format | 1.1.0 → 2.0.0 |
# Using standard-version
npx standard-version
# Using semantic-release (CI)
npx semantic-release
</versioning>
<workflow_examples>
# 1. Create feature branch
git checkout main
git pull origin main
git checkout -b feat/PROJ-123-user-profile
# 2. Make commits (conventional format)
git add .
git commit -m "feat(ui): add profile avatar component"
git commit -m "feat(api): add profile update endpoint"
git commit -m "test(profile): add integration tests"
# 3. Rebase if needed
git fetch origin
git rebase origin/main
# 4. Push and create PR
git push -u origin feat/PROJ-123-user-profile
gh pr create --title "feat(profile): add user profile page" \
--body "## Summary\n- Add profile avatar\n- Add update endpoint\n\nCloses #123"
# 5. After approval, squash merge
gh pr merge --squash
# 1. Create from main
git checkout main
git pull origin main
git checkout -b hotfix/PROD-456-payment-timeout
# 2. Fix and commit
git commit -m "fix(payment): increase timeout to 30s
Production payments timing out during high load.
Closes PROD-456"
# 3. Push and merge (no squash to preserve hotfix history)
git push -u origin hotfix/PROD-456-payment-timeout
gh pr create --title "hotfix: payment timeout" --body "Emergency fix"
gh pr merge --merge
# 1. Create release branch
git checkout develop
git checkout -b release/v2.1.0
# 2. Version bump
npm version minor
git commit -am "chore(release): v2.1.0"
# 3. Merge to main
git checkout main
git merge --no-ff release/v2.1.0
git tag v2.1.0
# 4. Back-merge to develop
git checkout develop
git merge release/v2.1.0
</workflow_examples>
<checklist> ## Git Workflow ChecklistBefore each commit:
! or footerBefore creating PR:
Before merging:
| Topic | Reference File | When to Load |
|-------|----------------|--------------|
| Commit message examples | reference/commit-examples.md | Need more examples |
| PR template variants | reference/pr-templates.md | Project-specific templates |
| Git hooks setup | reference/git-hooks.md | Setting up enforcement |
To load: Ask for the specific topic or check if context suggests it. </references>
Write to ~/.claude/skill-analytics/last-outcome-git-workflow.json:
{"ts":"[UTC ISO8601]","skill":"git-workflow","version":"1.0.0","variant":"default","status":"[success|partial|error]","runtime_ms":[ms],"metrics":{"commits_created":[n],"prs_opened":[n],"branches_managed":[n]},"error":null,"session_id":"[YYYY-MM-DD]"}
tools
KISS reference skill for v2rayA on Arch/Ubuntu/Fedora with TUN, RoutingA, DoH DNS and Outline key import.
testing
Identifies dependencies at heightened risk of exploitation or takeover. Use when assessing supply chain attack surface, evaluating dependency health, or scoping security engagements.
development
Run Semgrep static analysis scan on a codebase using parallel subagents. Supports two scan modes — "run all" (full ruleset coverage) and "important only" (high-confidence security vulnerabilities). Automatically detects and uses Semgrep Pro for cross-file taint analysis when available. Use when asked to scan code for vulnerabilities, run a security audit with Semgrep, find bugs, or perform static analysis. Spawns parallel workers for multi-language codebases.
development
Identifies error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes. Use when reviewing API designs, configuration schemas, cryptographic library ergonomics, or evaluating whether code follows 'secure by default' and 'pit of success' principles. Triggers: footgun, misuse-resistant, secure defaults, API usability, dangerous configuration.