skills/knowledge/git-workflow/SKILL.md
Git workflow patterns and version control best practices for teams of any size. Use when the user asks to choose a branching strategy (trunk-based, GitHub Flow, Git Flow, GitLab Flow), define commit conventions, set up PR workflows, plan release management, structure a monorepo, or establish team git standards. Covers branch naming, merge vs rebase, conventional commits, semantic versioning, changelog generation, and protected branch policies.
npx skillsauth add krzysztofsurdy/code-virtuoso 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.
Effective version control is not just about tracking changes - it is about enabling teams to collaborate predictably, release confidently, and maintain a history that tells a coherent story. The right workflow depends on team size, release cadence, and how much process the project can absorb without slowing down.
No single branching model fits every team. The right choice depends on how often you release, how large your team is, and how much ceremony you can tolerate.
| Strategy | Release Cadence | Team Size | Complexity | Best For | |---|---|---|---|---| | Trunk-Based | Continuous (multiple per day) | Any (works best with strong CI) | Low | SaaS, cloud-native, teams with mature CI/CD | | GitHub Flow | On-demand (per merged PR) | Small to medium | Low | Web apps, startups, teams wanting simplicity | | Git Flow | Scheduled / versioned releases | Medium to large | High | Packaged software, mobile apps, multiple supported versions | | GitLab Flow | Environment-promoted | Medium to large | Medium | Teams needing environment-specific branches (staging, production) |
See Branching Strategies Reference for detailed mechanics, feature flag integration, and migration paths between strategies.
Good commit messages serve three audiences: reviewers reading the PR, developers reading git log next month, and automation tools generating changelogs and version bumps.
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
| Type | Purpose | Version Impact |
|---|---|---|
| feat | New feature visible to users | Minor bump |
| fix | Bug fix | Patch bump |
| refactor | Code restructuring with no behavior change | None |
| perf | Performance improvement | Patch bump |
| test | Adding or updating tests | None |
| docs | Documentation only | None |
| chore | Tooling, dependencies, build config | None |
| ci | CI/CD pipeline changes | None |
| build | Build system or dependency changes | None |
Append ! after the type or add a BREAKING CHANGE: footer to signal incompatible changes. Either notation triggers a major version bump when used with automated release tooling.
feat(api)!: remove deprecated /v1/users endpoint
BREAKING CHANGE: The /v1/users endpoint has been removed. Use /v2/users instead.
| Commit Contains | Version Bump | Example |
|---|---|---|
| fix: | Patch (1.0.0 -> 1.0.1) | Bug corrections |
| feat: | Minor (1.0.0 -> 1.1.0) | New capabilities |
| BREAKING CHANGE or ! | Major (1.0.0 -> 2.0.0) | Incompatible changes |
See Commit Conventions Reference for scope naming patterns, multi-line body guidelines, changelog automation setup, and git hook validation.
Pull requests are the primary collaboration point in most git workflows. Their quality directly affects review speed, defect discovery, and team velocity.
| PR Size (lines changed) | Review Quality | Recommended | |---|---|---| | < 50 | Excellent - reviewer catches most issues | Ideal for stacked PRs | | 50-200 | Good - manageable cognitive load | Sweet spot for most changes | | 200-400 | Acceptable - requires focused review time | Upper bound for single reviews | | 400+ | Poor - reviewer fatigue, defects slip through | Split into smaller PRs |
| Strategy | History Shape | Best For | |---|---|---| | Merge commit | Preserves branch topology, creates merge node | Open-source projects, audit trails | | Squash and merge | Collapses branch into single commit on main | Feature branches with messy intermediate commits | | Rebase and merge | Linear history, no merge commits | Teams wanting clean, linear logs |
See PR Patterns Reference for description templates, CODEOWNERS configuration, branch protection rules, stacked PR workflows, and review assignment strategies.
Release management bridges development and deployment. The approach depends on whether releases are continuous, scheduled, or versioned.
| Model | How It Works | When to Use | |---|---|---| | Continuous release | Every merged PR deploys automatically | SaaS with strong CI/CD and monitoring | | Scheduled release | Changes accumulate, release on a cadence (weekly, biweekly) | Teams needing coordination windows | | Versioned release | Explicit version tags, release branches for stabilization | Libraries, APIs, packaged software |
Tags mark specific commits as release points. Use annotated tags for releases because they store author, date, and message metadata.
# Create an annotated release tag
git tag -a v1.2.0 -m "Release 1.2.0: Add user dashboard and fix auth timeout"
# Push tags to remote
git push origin v1.2.0
# List existing tags matching a pattern
git tag -l "v1.*"
When conventional commits are combined with release automation tooling, the pipeline can:
This eliminates manual version decisions and ensures the changelog stays synchronized with actual changes.
When a critical bug is found in production:
# Branch from the release tag
git checkout -b hotfix/fix-auth-crash v1.2.0
# After fixing and committing
git tag -a v1.2.1 -m "Hotfix: prevent auth crash on expired tokens"
git push origin v1.2.1
# Merge fix back to main
git checkout main
git merge hotfix/fix-auth-crash
| Problem | Likely Cause | Resolution | |---|---|---| | Frequent merge conflicts | Long-lived branches, infrequent integration | Merge main into feature branches daily, or switch to trunk-based | | Broken main branch | No CI on PRs, insufficient test coverage | Require passing CI before merge, add branch protection | | Unclear release contents | No commit conventions, manual changelogs | Adopt conventional commits, automate changelog generation | | Slow PR reviews | PRs too large, no clear ownership | Set size guidelines, configure CODEOWNERS, use stacked PRs | | Accidental commits to main | No branch protection | Enable branch protection rules, require PR reviews |
| Reference | Contents | |---|---| | Branching Strategies | Trunk-based, GitHub Flow, Git Flow, GitLab Flow - mechanics, feature flags, comparison matrix | | Commit Conventions | Conventional commits format, scope patterns, semantic versioning, changelog automation, git hooks | | PR Patterns | Size guidelines, description templates, CODEOWNERS, merge strategies, branch protection, stacked PRs |
| Situation | Recommended Skill |
|---|---|
| Setting up CI/CD pipelines for branch protection | Install knowledge-virtuoso from krzysztofsurdy/code-virtuoso for testing strategies |
| API versioning aligned with git release tags | Install knowledge-virtuoso from krzysztofsurdy/code-virtuoso for API design principles |
| Coordinating releases across microservices | Install knowledge-virtuoso from krzysztofsurdy/code-virtuoso for microservices patterns |
| Sprint-aligned release planning | Install knowledge-virtuoso from krzysztofsurdy/code-virtuoso for scrum workflows |
development
Spawn and coordinate a pre-composed agent team from a team definition file. Reads team files from teams/, resolves agents and skills, picks the best spawning mode (peer or sequential), and runs the workflow. Use when the user asks to run a team, dispatch a development team, start a feature delivery, or coordinate multiple agents for a multi-phase task.
development
Pre-composed agent team library. Use when the user asks which teams are available, what a team does, when to pick one team over another, or to browse multi-agent compositions. Catalogs ready-to-run teams (development team, review squad, war room) with their purpose, agent roster, workflow type, and when to use each. The actual dispatching is handled by the dispatching-agent-teams skill.
tools
Ecosystem discovery advisor. Use when the user asks 'what skill should I use', 'what agent should I delegate to', 'which team fits this task', or when onboarding to available skills, agents, and teams. Scans ALL installed skills at runtime -- not limited to any single plugin or vendor. Triggers: 'which skill', 'which agent', 'what do I use for', 'orient me', 'what tools do I have'.
tools
Interactive tool to scaffold a complete Claude Code plugin -- plugin.json manifest, skills, agents, hooks, MCP servers, LSP servers, and an optional marketplace.json catalog entry. Use when the user asks to create a plugin, build a Claude Code plugin, scaffold a plugin marketplace, convert an existing .claude/ configuration into a plugin, or package skills and agents for distribution. Runs a guided questionnaire, writes all required files to disk, and prints test instructions.