git-workflow
Skill2 starsChanged 8 months agoMITView on GitHub
Git conventions for parallel Claude Code workstreams in Conductor. Covers branching strategy, merge order, conflict prevention, shared file protection, and the checkpoint pattern. Use this skill throughout the build phase, especially when running multiple Conductor workspaces. Prevents the merge conflicts and corrupted state that kill momentum.
- Deletes or force-pushes
- Commits and pushes
118 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- 1pedroosilva/databricks-genie-skillstheir own version, first seen Oct 2, 2026
- vospr/context-engineering-templatetheir own version, first seen Oct 1, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 1, 2026
Used with
Projects with it also use squad-commands, typescript-patterns and 10 more.
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.
MicrosoftSkillsquad-commands
Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.
Also in 3 projects that use this
cohen-lielSkilltypescript-patterns
TypeScript best practices and patterns. Use when writing TypeScript code, defining types, working with generics, or converting JavaScript to TypeScript.
Also in 4 projects that use this
martinholovskySkillllm-integration
Expert skill for integrating local Large Language Models using llama.cpp and Ollama. Covers secure model loading, inference optimization, prompt handling, and protection against LLM-specific vulnerabilities including prompt injection, model theft, and denial of service attacks.
Also in 4 projects that use this
MicrosoftSkillcost-optimization
Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: \"optimize Azure costs\", \"reduce cloud spending\", \"rightsize resources\", \"find idle resources\", \"orphaned disk\", \"deleted VM still charged\", \"public IP still charging\", \"reservation utilization\", \"Savings Plan coverage\", \"commitment recommendation\", \"why is pay-as-you-go still charged\". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.
Also in 5 projects that use this
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 3 projects that use this
Vimalk0703Skilldependency-management
Vet packages before adoption, audit for vulnerabilities, pin versions, and prevent dependency bloat.
Also in 3 projects that use this
- +1 more from microsoft
Other versions118 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 118
- JetBrains/ideavim★ 10ksame name
- Galaxy-Dawn/claude-scholar★ 5.7ksame name
- github/gh-aw★ 5.3ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.1ksame name
- microsoft/waza★ 1.4ksame name
- laolaoshiren/claude-code-skills-zh★ 876same name
- Mindrally/skills★ 266same name
- Azure/fleet★ 226same name
- povvo/claudikins-kernel★ 128same name
- extra-org/extra★ 113same name
108 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 repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-specSkill
- app-store-prepSkill
- app-visionSkill
- dark-mode-legibilitySkill
- data-persistenceSkill
- design-systemSkill
- device-testingSkill
- figma-to-codeSkill
- mcp-setupSkill
- pixel-and-stroke-geometrySkill
- platform-gotchasSkill
- polish-and-refinementSkill
- post-launchSkill
- scaffoldingSkill
- screen-by-screenSkill
- session-managementSkill
- swiftui-native-firstSkill
- testing-strategySkill
- uikit-bridgingSkill
- verification-loopSkill
- xcode-integrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 15 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 101 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Every Conductor workspace creates its own branch automatically.
- Distinctive: line 24
Always branch from a freshly-pulled
main: Never reuse old branches across iterations: - Distinctive: line 35
Push eagerly: After every meaningful commit, git push.
- Distinctive: line 37
One topic per branch: If you find yourself fixing two unrelated things, stop and split into two branches.
- Distinctive: line 91
After screens are merged, do integration work in a single workspace:
- Distinctive: line 93
Add shared state that multiple screens need
- Distinctive: line 98
Add this to your CLAUDE.md:
- Distinctive: line 114
Commit frequently. Commits are your save points.
- Distinctive: line 138
If you do get a merge conflict (it happens):
- Distinctive: line 146
Before merging any workspace:
- Distinctive: line 155
When managing merges from your phone:
- Distinctive: line 163
When you start a Claude Code session via Dispatch from your phone, it runs directly in your repo directory without Conductor's git worktree …
- Distinctive: line 198
When you're back at your desk:
- Distinctive: line 204
If the Dispatch session got 80% of the way and needs more work:
- Distinctive: line 206
Create a new workspace from the dispatch branch (not from main)
“Common” is measured: kept by at least 6 in 10 of the 101 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
Git Workflow
Parallel workstreams are powerful until they step on each other. This skill prevents that.
Branching Convention
Every Conductor workspace creates its own branch automatically. Name your workspaces descriptively:
workspace: build-projects-home → branch: build-projects-home
workspace: build-settings-flow → branch: build-settings-flow
workspace: build-explore-tab → branch: build-explore-tabBranch-per-Iteration Rhythm
Whether you're in Conductor or running a single Claude Code session, the rhythm that works on production builds:
- Always branch from a freshly-pulled
main. Never reuse old branches across iterations:
Reusing branches accumulates stale state, makes diffs unreviewable, and re-introduces fixes you already merged.git checkout main && git pull origin main && git checkout -b feat/<topic> - Open a PR on the FIRST commit, not at the end. A PR is a conversation, not a deliverable. Pushing the first commit and opening a PR immediately:
- Surfaces the change to anyone watching the repo
- Lets CI run early (catches build / lint failures before you've layered more on top)
- Gives reviewers a stake in the iteration before it's locked in
- Push eagerly. After every meaningful commit,
git push. The branch is more valuable on the remote than on your machine. If your laptop dies mid-iteration, the work isn't lost. - One topic per branch. If you find yourself fixing two unrelated things, stop and split into two branches. Reviews stay tight; reverts stay surgical.
- After every merge, the re-sync ritual. Local
mainneeds to be in sync with remotemainbefore you start the next branch — otherwise tools like Xcode that read from your working directory keep showing the old code:
Make this a reflex. It prevents an entire class of "I fixed it but it's still broken on simulator" confusion.git fetch origin && git checkout main && git pull origin main
This rhythm pairs with Conductor's parallel workspaces below. Conductor automates step 1 per workspace, and the rhythm above describes how to operate WITHIN each workspace.
Recovery: Commit Landed on main Locally
This happens occasionally — git checkout -b immediately followed by edits and a commit can land the commit on main instead of the new branch if some system event interrupts the checkout (mid-MCP-call, mid-file-system-event, etc.). Symptom: git log on your "new branch" shows the upstream commit, while git log on main shows your fix.
Recovery:
# 1. Checkout the branch that should have the fix
git checkout <branch-with-the-fix>
# 2. Reset it to the commit that's currently on local main
git reset --hard <fix-commit-sha>
# 3. Force-push (with-lease, never plain --force)
git push origin <branch-name> --force-with-lease
# 4. Reset local main back to the upstream tip
git checkout main && git reset --hard origin/main--force-with-lease is the safety belt: it refuses to overwrite remote commits you haven't seen. Plain --force will silently destroy work; never use it.
The Merge Order Rule
Structural changes go first. Screen-specific changes go second.
Wave 0: Foundation (Single Workspace, Sequential)
Changes that touch shared files. Do these BEFORE parallel work:
- ContentView.swift (TabView setup, root navigation)
- App entry point ([AppName]App.swift)
- Shared models (if data models are defined early)
- Shared components in /Components
- Any file that multiple screens will import
Merge Wave 0 into main before starting parallel workspaces.
Wave 1-3: Parallel Screen Work
Now branch out. Each workspace touches only its own screen files:
- Views/Projects/ProjectsHomeView.swift (Workspace 1)
- Views/Settings/SettingsView.swift (Workspace 2)
- Views/Explore/ExploreView.swift (Workspace 3)
These don't conflict because they're different files.
Wave 4: Integration
After screens are merged, do integration work in a single workspace:
- Wire up cross-screen navigation that wasn't in the skeleton
- Add shared state that multiple screens need
- Resolve any inconsistencies between screens
The Shared File Protection Rule
Add this to your CLAUDE.md:
## Git Safety
- Do NOT modify ContentView.swift, [AppName]App.swift, or any
file in /Models or /Components unless this is the only active
workspace. Ask me before touching shared files.
- If you need to add an import or reference to a shared file,
tell me what needs to change and I'll do it in a separate
workspace after this one merges.This prevents the most common Conductor conflict: two workspaces both adding a NavigationLink to ContentView.
The Checkpoint Pattern
Commit frequently. Commits are your save points.
After every meaningful change (not every line):
git add . && git commit -m "Descriptive message"Tell Claude Code:
## Commit Frequency
Commit after completing each logical unit of work:
- After the view layout is done
- After interactions are wired up
- After edge cases (empty state, error state) are handled
- Before starting any risky refactor
Commit messages should describe WHAT changed, not HOW:
- "Add project list with progress rings and context menu"
- "Wire up New Project sheet with form fields"
- NOT "Update ProjectsHomeView.swift"Conflict Resolution
If you do get a merge conflict (it happens):
- Don't panic. Git conflicts in SwiftUI files are usually straightforward.
- Tell Claude Code: "There's a merge conflict in [filename]. The main branch has [describe]. My branch has [describe]. Resolve the conflict by keeping both changes."
- If the conflict is in .pbxproj: Abort the merge. Revert to main. Re-do the work in a new workspace. Never manually resolve .pbxproj conflicts.
Pre-Merge Checklist
Before merging any workspace:
- Build succeeds (via XcodeBuildMCP)
- All existing navigation still works (no broken paths)
- No changes to shared files (unless this is Wave 0 or Wave 4)
- Commit messages are descriptive
- Preview renders correctly (via Xcode MCP Bridge)
Working with Remote Control
When managing merges from your phone:
- Review the diff in the Conductor PR view (visible on phone via GitHub)
- Tell Claude Code via Remote Control: "Merge this workspace and delete the branch"
- Switch to the next workspace that needs attention
- You can't see the full Conductor overview on your phone, so check workspaces one at a time via Remote Control and use GitHub's PR list as your dashboard
Bridging Dispatch Sessions into Conductor
When you start a Claude Code session via Dispatch from your phone, it runs directly in your repo directory without Conductor's git worktree isolation. Without guardrails, this session could modify main directly, which is dangerous and invisible to Conductor.
The Rule: Dispatch Sessions Always Branch First
Add this to your CLAUDE.md:
## Dispatch Session Safety
If this session was NOT started from a Conductor workspace:
1. BEFORE making any code changes, create a new branch:
git checkout -b dispatch/[descriptive-name]
2. Make all changes on this branch, never on main
3. Commit with descriptive messages as you work
4. When finished, push the branch:
git push origin dispatch/[descriptive-name]
5. Create a pull request:
gh pr create --title "[description]" --body "Dispatch session from phone"
6. Do NOT merge the PR. Leave it for review.
7. When done, check out main again:
git checkout mainWhat This Produces
A Dispatch session from your phone creates the exact same artifact as a Conductor workspace: a branch with a PR. The only difference is how it was started.
Conductor workspace → branch: build-settings-flow → PR #12
Dispatch session → branch: dispatch/fix-progress → PR #13Both show up in GitHub's PR list. Both can be reviewed and merged the same way.
The Handoff: Dispatch to Conductor
When you're back at your desk:
Option A: Merge via GitHub (simplest) Open the PR on GitHub. Review the changes. Merge. Done. Conductor's next workspace will be based on the updated main.
Option B: Pull into Conductor (if you want to iterate) If the Dispatch session got 80% of the way and needs more work:
- Open Conductor
- Create a new workspace from the dispatch branch (not from main)
- Continue the work in Conductor with full isolation
- Merge via Conductor's normal PR flow
Option C: Review via Remote Control first From your phone, switch to the Dispatch session via Remote Control. Review what Claude Code built. If it looks good, tell it: "Push the branch and create a PR." If it needs changes, give feedback and let it iterate. Then handle the merge when you're at your desk.
Preventing Main Branch Pollution
The critical risk with Dispatch is Claude Code making changes directly on main without branching. The CLAUDE.md rule prevents this, but as a safety net:
Protect your main branch on GitHub:
Settings > Branches > Add rule > Branch name pattern: main
- Require a pull request before merging
- Require status checks to pass (if you have CI/CD)
This means even if Claude Code accidentally tries to push to main, GitHub rejects it. All changes MUST go through a PR. This single GitHub setting makes the entire Dispatch workflow safe.
The Complete Phone-to-Merge Flow
1. Phone: Open Dispatch
2. Phone: "Start a Claude Code session in Patchwork. Create a branch
called dispatch/fix-dark-mode-tint. The progress ring is hard to
see in dark mode. Make the ring color brighter in dark mode."
3. Mac: Claude Code creates branch, fixes the issue, commits, pushes, creates PR
4. Phone: Get notified the task is done (via Dispatch)
5. Phone: Open GitHub in browser, review the PR diff
6. Desk (later): Open Conductor, merge the PR, continue other work
OR
Phone: Approve and merge the PR directly on GitHub mobileNaming Convention for Dispatch Branches
dispatch/[action]-[target]
Examples:
dispatch/fix-progress-ring
dispatch/add-haptic-counter
dispatch/update-settings-layout
dispatch/bump-version-1.0.1The dispatch/ prefix makes it immediately clear in GitHub's branch list and Conductor which branches came from phone sessions vs. Conductor workspaces.
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.

