agentleFS
leaf76leaf76/agent-skills/parallel-dev/SKILL.md

parallel-dev

Skill0 starsChanged 3 months agoMITView on GitHub

Parallel development workflow using Git worktrees to run multiple Codex sessions without conflicts. Use when user mentions "parallel", "concurrent", "multiple sessions", "avoid conflicts", or wants to work on multiple features simultaneously.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create coordination file in the new worktree:

    line 29
  2. Very specific:

    Read all .Codex/scratchpad.md files in sibling worktrees

    line 54
  3. Distinctive:

    Check if any session is modifying the same file

    line 55
  4. Distinctive:

    If conflict risk exists, wait or coordinate

    line 56
  5. Distinctive:

    Update own scratchpad before proceeding

    line 57
  6. Distinctive:

    Test files for specific features

    line 67
  7. Distinctive:

    When multiple sessions exist, each session should:

    line 87
  8. Distinctive:

    Only modify files within its designated feature directory

    line 88
  9. Distinctive:

    Create NEW files rather than editing shared ones when possible

    line 89
  10. Distinctive:

    Use feature flags or separate endpoints instead of modifying core routing

    line 90

“Common” is measured: kept by at least 6 in 10 of the 3 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Parallel Development Skill

Enable conflict-free parallel Codex sessions using Git worktrees.

When to Use

  • User wants to develop multiple features simultaneously
  • User experiences merge conflicts or git stash issues with multiple sessions
  • User asks about running parallel Codex instances

Setup Parallel Session

Step 1: Create Worktree

# Get project name and create worktree
PROJECT_NAME=$(basename $PWD)
FEATURE_NAME="<feature>"
git worktree add "../${PROJECT_NAME}-${FEATURE_NAME}" "feature/${FEATURE_NAME}"

Step 2: Initialize Scratchpad

Create coordination file in the new worktree:

mkdir -p "../${PROJECT_NAME}-${FEATURE_NAME}/.Codex"
cat > "../${PROJECT_NAME}-${FEATURE_NAME}/.Codex/scratchpad.md" << 'EOF'
## Current Task
Working on: <feature name>
Files being modified: <none yet>
Blocked on: <none>
Last updated: <timestamp>
EOF

Step 3: Instruct User

Tell user:

Worktree created. Open a new terminal and run:
  cd ../<project>-<feature> && Codex

Coordination Protocol

Before Editing Shared Files

  1. Read all .Codex/scratchpad.md files in sibling worktrees
  2. Check if any session is modifying the same file
  3. If conflict risk exists, wait or coordinate
  4. Update own scratchpad before proceeding

Shared File Examples

  • Main entry points: app.py, main.py, index.ts
  • Configuration: pyproject.toml, package.json
  • Database models: models.py, schema.prisma
  • Routing: routes.py, urls.py

Safe to Parallel Edit

  • Feature-specific modules in separate directories
  • Test files for specific features
  • Static assets and templates

Merge Back to Main

# In the worktree
git add . && git commit -m "[<feature>] <description>"

# Return to main project
cd <main-project-dir>
git merge feature/<feature>

# Cleanup
git worktree remove ../<project>-<feature>
git branch -d feature/<feature>

File Ownership Rules

When multiple sessions exist, each session should:

  • Only modify files within its designated feature directory
  • Create NEW files rather than editing shared ones when possible
  • Use feature flags or separate endpoints instead of modifying core routing
  • Complete isolated work first, integration changes last

Scratchpad Update Protocol

Update .Codex/scratchpad.md when:

  • Starting a new task
  • Beginning to edit a file
  • Completing a task
  • Encountering a blocker

Format:

## Current Task
Working on: <feature name>
Files being modified: <comma-separated list>
Blocked on: <description or "none">
Last updated: <YYYY-MM-DD HH:MM>

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.