git-workflow
Skill3.4k starsChanged 2 months agoMITView on GitHub
Squad branching model: dev-first workflow with insiders preview channel
- Deletes or force-pushes
- Installs packages
- Commits and pushes
192 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- juninmd/skillstheir own version, first seen Nov 8, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- haythamasalama/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ci-cd-pipelines and native-nostalgia-stack.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
harrissohail6Skillci-cd-pipelines
CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.
Also in 6 projects that use this
frostneySkillnative-nostalgia-stack
Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.
Also in 3 projects that use this
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- github/gh-aw★ 5.6k99% same
- microsoft/waza★ 1.5k97% same
- Azure/fleet★ 22799% same
- kubefleet-dev/kubefleet★ 16499% same
- Azure/apiops-cli★ 3299% same
- microsoft/github-vteam-industry-demos★ 299% same
- microsoft/fsi-banking-payments-dispute-resolution-accelerator★ 099% same
Wrote their own version · 185
- langfuse/langfuse★ 37ksame name
- modelcontextprotocol/typescript-sdk★ 14ksame name
- JetBrains/ideavim★ 10ksame name
- jokob-sk/NetAlertX★ 7.4ksame name
- netalertx/NetAlertX★ 7.4ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- modelcontextprotocol/csharp-sdk★ 4.6ksame name
- antonbabenko/pre-commit-terraform★ 3.8ksame name
- jd-opensource/xllm★ 1.6ksame name
- laolaoshiren/claude-code-skills-zh★ 907same name
175 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository247 other files it gives its agents.
- .github/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- packages/squad-cli/templates/copilot-instructions.mdCopilot instructions
- packages/squad-sdk/templates/copilot-instructions.mdCopilot instructions
- .squad-templates/copilot-instructions.mdCopilot instructions
- .squad/templates/copilot-instructions.mdCopilot instructions
- templates/copilot-instructions.mdCopilot instructions
- action-skill-contractsSkill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- architectural-reviewSkill
- archival-integritySkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- content-scopeSkill
- distributed-meshSkill
- documentation-maintenanceSkill
- github-multi-accountSkill
- history-hygieneSkill
- init-modeSkill
- model-selectionSkill
- pr-lifecycleSkill
- protected-filesSkill
- release-processSkill
- reskillSkill
- reviewer-protocolSkill
- secret-handlingSkill
- security-reviewSkill
- squad-conventionsSkill
- test-disciplineSkill
- windows-compatibilitySkill
- agentic-workflow-designerSkill
- gh-aw-reliabilitySkill
- iterative-retrievalSkill
- reflectSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-machine-coordinationSkill
- cross-squad-communicationSkill
- cross-squadSkill
- distributed-meshSkill
- docs-standardsSkill
- e2e-template-testingSkill
- economy-modeSkill
- error-recoverySkill
- external-commsSkill
- fact-checkingSkill
- gh-auth-isolationSkill
- gh-aw-enlistmentSkill
- github-multi-accountSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 169 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
When the coordinator routes multiple issues simultaneously (e.g., "fix bugs X, Y, and Z"), use git worktree to give each agent an isolated …
- Very specific: line 110
All PRs target dev independently.
- Very specific: line 117
Rule: Never rewrite or reorder .squad/ files in a worktree — append only
- Distinctive: line 121
After a worktree's PR is merged to dev:
- Distinctive: line 131
If a worktree was deleted manually (rm -rf), git worktree prune recovers the state.
- Very specific: line 137
When work spans multiple repositories (e.g., squad-cli changes need squad-sdk changes, or a user's app depends on squad):
- Distinctive: line 154
Create PRs in each repo independently
- Distinctive: line 165
Before pushing, verify cross-repo changes work together:
- Very specific: line 180
Important: Remove local links before committing.
“Common” is measured: kept by at least 6 in 10 of the 169 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context
Squad uses a three-branch model. All feature work starts from dev, not main.
| Branch | Purpose | Publishes |
main | Released, tagged, in-npm code only | npm publish on tag |
dev | Integration branch — all feature work lands here | npm publish --tag preview on merge |
insiders | Early-access channel — synced from dev | npm publish --tag insiders on sync |
Branch Naming Convention
Issue branches MUST use: squad/{issue-number}-{kebab-case-slug}
Examples:
squad/195-fix-version-stamp-bugsquad/42-add-profile-api
Workflow for Issue Work
- Branch from dev:
git checkout dev git pull origin dev git checkout -b squad/{issue-number}-{slug} - Mark issue in-progress:
gh issue edit {number} --add-label "status:in-progress" - Create draft PR targeting dev:
gh pr create --base dev --title "{description}" --body "Closes #{issue-number}" --draft - Do the work. Make changes, write tests, commit with issue reference.
- Push and mark ready:
git push -u origin squad/{issue-number}-{slug} gh pr ready - After merge to dev:
git checkout dev git pull origin dev git branch -d squad/{issue-number}-{slug} git push origin --delete squad/{issue-number}-{slug}
Parallel Multi-Issue Work (Worktrees)
When the coordinator routes multiple issues simultaneously (e.g., "fix bugs X, Y, and Z"), use git worktree to give each agent an isolated working directory. No filesystem collisions, no branch-switching overhead.
When to Use Worktrees vs Sequential
| Scenario | Strategy |
| Single issue | Standard workflow above — no worktree needed |
| 2+ simultaneous issues in same repo | Worktrees — one per issue |
| Work spanning multiple repos | Separate clones as siblings (see Multi-Repo below) |
Setup
From the main clone (must be on dev or any branch):
# Ensure dev is current
git fetch origin dev
# Create a worktree per issue — siblings to the main clone
git worktree add ../squad-195 -b squad/195-fix-stamp-bug origin/dev
git worktree add ../squad-193 -b squad/193-refactor-loader origin/devNaming convention: ../{repo-name}-{issue-number} (e.g., ../squad-195, ../squad-pr-42).
Each worktree:
- Has its own working directory and index
- Is on its own
squad/{issue-number}-{slug}branch from dev - Shares the same
.gitobject store (disk-efficient)
Per-Worktree Agent Workflow
Each agent operates inside its worktree exactly like the single-issue workflow:
cd ../squad-195
# Work normally — commits, tests, pushes
# ⚠️ NEVER use `git add .`, `git add -A`, or other broad staging commands
git add -- {specific files you modified} && git commit -m "fix: stamp bug (#195)"
git push -u origin squad/195-fix-stamp-bug
# Create PR targeting dev
gh pr create --base dev --title "fix: stamp bug" --body "Closes #195" --draftAll PRs target dev independently. Agents never interfere with each other's filesystem.
.squad/ State in Worktrees
The .squad/ directory exists in each worktree as a copy. This is safe because:
.gitattributesdeclaresmerge=unionon append-only files (history.md, decisions.md, logs)- Each agent appends to its own section; union merge reconciles on PR merge to dev
- Rule: Never rewrite or reorder
.squad/files in a worktree — append only
Cleanup After Merge
After a worktree's PR is merged to dev:
# From the main clone
git worktree remove ../squad-195
git worktree prune # clean stale metadata
git branch -d squad/195-fix-stamp-bug
git push origin --delete squad/195-fix-stamp-bugIf a worktree was deleted manually (rm -rf), git worktree prune recovers the state.
Multi-Repo Downstream Scenarios
When work spans multiple repositories (e.g., squad-cli changes need squad-sdk changes, or a user's app depends on squad):
Setup
Clone downstream repos as siblings to the main repo:
~/work/
squad-pr/ # main repo
squad-sdk/ # downstream dependency
user-app/ # consumer projectEach repo gets its own issue branch following its own naming convention. If the downstream repo also uses Squad conventions, use squad/{issue-number}-{slug}.
Coordinated PRs
- Create PRs in each repo independently
- Link them in PR descriptions:
Closes #42 **Depends on:** squad-sdk PR #17 (squad-sdk changes required for this feature) - Merge order: dependencies first (e.g., squad-sdk), then dependents (e.g., squad-cli)
Local Linking for Testing
Before pushing, verify cross-repo changes work together:
# Node.js / npm
cd ../squad-sdk && npm link
cd ../squad-pr && npm link squad-sdk
# Go
# Use replace directive in go.mod:
# replace github.com/org/squad-sdk => ../squad-sdk
# Python
cd ../squad-sdk && pip install -e .Important: Remove local links before committing. npm link and go replace are dev-only — CI must use published packages or PR-specific refs.
Worktrees + Multi-Repo
These compose naturally. You can have:
- Multiple worktrees in the main repo (parallel issues)
- Separate clones for downstream repos
- Each combination operates independently
Anti-Patterns
- ❌ Branching from main (branch from dev)
- ❌ PR targeting main directly (target dev)
- ❌ Non-conforming branch names (must be squad/{number}-{slug})
- ❌ Committing directly to main or dev (use PRs)
- ❌ Switching branches in the main clone while worktrees are active (use worktrees instead)
- ❌ Using worktrees for cross-repo work (use separate clones)
- ❌ Leaving stale worktrees after PR merge (clean up immediately)
Promotion Pipeline
- dev → insiders: Automated sync on green build
- dev → main: Manual merge when ready for stable release, then tag
- Hotfixes: Branch from main as
hotfix/{slug}, PR to dev, cherry-pick to main if urgent
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

