A greenfield project for testing two-developer collaboration workflows powered by Claude Code.
From Ryan Decker to Bryan -- March 2026
CollabTest is a purpose-built repository for exploring and validating best practices when two developers both use Claude Code extensively on a shared codebase. It serves as both a living experiment and a reference implementation for the patterns described below.
The goal: figure out the smoothest possible two-person workflow using Claude Code's latest capabilities -- worktree isolation, agent teams, GitHub Actions integration, shared configuration -- and document what works.
- Quick Start
- 1. Shared CLAUDE.md -- The Foundation
- 2. Git Worktrees for Parallel Work
- 3. @claude on GitHub for Async Handoffs
- 4. Agent Teams for Complex Features
- 5. Subagent Worktree Isolation
- 6. Shared Skills and Custom Commands
- 7. Recommended Daily Workflow
- Project Structure
- Setup Checklist
- Contributing
# Clone the repo
git clone https://github.com/allaspectsdev/CollabTest.git
cd CollabTest
# Start Claude Code in a worktree for your feature
claude --worktree your-feature-name
# Or launch in a tmux pane
claude --worktree your-feature-name --tmuxThe single most important thing for team collaboration with Claude Code is a shared CLAUDE.md file versioned in the Git repository. Every team member gets the same context and instructions, keeping Claude's behavior consistent regardless of who's prompting.
| Layer | Location | Purpose |
|---|---|---|
| Personal | ~/.claude/CLAUDE.md |
Individual preferences (model defaults, formatting quirks) |
| Project | CLAUDE.md at repo root (committed) |
Architecture decisions, stack conventions, test commands, module boundaries |
| Team | Optional team-level config | Scales beyond two people if needed |
- Preferred frameworks, ORMs, and libraries
- Monorepo tooling and build conventions
- Testing patterns and required test coverage
- Module boundaries and ownership
- Code style preferences beyond what linters enforce
- Deployment and CI/CD conventions
Both developers running Claude Code on the same repo will get identical context loading from the project-level CLAUDE.md.
This is the killer feature for our setup. Git worktrees create separate working directories, each with their own files and branch, while sharing the same repository history and remote connections. Claude Code has built-in worktree support (shipped February 2026).
# Ryan works on the API layer
claude --worktree feature-api-refactor
# Bryan works on the frontend
claude --worktree feature-dashboard-ui
# Add --tmux to launch in its own tmux pane
claude --worktree feature-auth --tmux- If you exit a worktree session with no changes, the worktree and its branch are removed automatically
- If edits exist, the worktree persists with the branch name, ready for review and merge
- Teams using this pattern report only ~3% conflict rate across parallel sessions (as long as work targets non-overlapping files)
For more control over branch naming or base branch:
git worktree add ../CollabTest-feature-a -b feature-a
cd ../CollabTest-feature-a && claudeInstall the Claude GitHub App by running /install-github-app from your Claude Code terminal. This sets up Anthropic's official GitHub Action (anthropics/claude-code-action@v1) which runs Claude Code inside GitHub Actions runners with full access to the repo.
- Either developer tags
@claudeon an issue or PR comment - Claude picks it up in CI -- reads the repo, analyzes diffs, posts findings
- For issues: Claude creates a branch, makes the fix, runs tests, opens a PR
- For PRs: Claude reviews code, suggests improvements, catches bugs
Ryan opens an issue --> tags @claude --> Claude produces a PR --> Bryan reviews it
No one had to pull the repo, switch branches, or spin up a dev environment for small fixes.
- Add
ANTHROPIC_API_KEYto repository secrets - Copy the workflow YAML into
.github/workflows/ - Grant appropriate permissions:
contents: write,pull-requests: write - Add a CI-specific section to
CLAUDE.mdso Claude knows to never push directly to main
Agent teams (shipped with Opus 4.6) let you coordinate multiple Claude Code instances working together. One session acts as the team lead, coordinating work and assigning tasks. Teammates work independently, each in its own context window, and communicate directly through a shared task list and messaging system.
# Enable agent teams
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
# Or add to .claude/settings.json:
# { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }| Subagents | Agent Teams | |
|---|---|---|
| Communication | Report back to parent only | Message each other directly |
| Coordination | Fire-and-forget | Shared task list, claim tasks, debate approaches |
| Context | Isolated | Shared findings across teammates |
Tell the orchestrator which model each teammate should run:
- Debugger on Opus -- deep reasoning
- Implementation on Sonnet -- speed
- Tests on Haiku -- cost efficiency
- Research & review -- multiple teammates investigate different aspects simultaneously
- New modules or features -- teammates each own a separate piece
- Debugging with competing hypotheses -- teammates test theories in parallel and debate
- Cross-layer coordination -- frontend, backend, and tests each owned by a different teammate
Combine worktrees with subagents for truly conflict-free parallel execution. Add isolation: worktree to the agent's frontmatter:
---
name: refactor-module-a
isolation: worktree
---
Refactor the authentication module...Each subagent gets its own isolated worktree -- a temporary branch and repo copy -- preventing file collisions even when Claude spawns multiple sub-agents within a single session.
- No changes --> worktree auto-cleans
- Edits made --> worktree persists with branch name, ready for review
After productive sessions, ask Claude Code to generate a skill that codifies those learnings. Skills encode organizational best practices that scale across developers.
Commit custom slash commands to .claude/commands/ in the repo. Both developers get them automatically:
.claude/commands/
review-pr.md # PR review workflow
run-full-ci.md # Full CI pipeline locally
deploy-staging.md # Staging deployment steps
The Hooks system lets you enforce behavior that fires 100% of the time (linting, formatting, security checks), unlike CLAUDE.md which is advisory.
+-------------------+ +---------------------+ +-------------------+
| 1. Shared Repo | | 2. Worktrees for | | 3. GitHub Actions |
| + CLAUDE.md | --> | Isolation | --> | + @claude |
| | | | | |
| Identical context | | claude --worktree | | Tag @claude on |
| for both devs | | <feature-name> | | issues & PRs |
+-------------------+ +---------------------+ +-------------------+
| | |
v v v
+-------------------+ +---------------------+ +-------------------+
| 4. PR-Based | | 5. Shared Custom | | 6. Agent Teams |
| Flow | <-- | Commands | <-- | for Big Features |
| | | | | |
| Both open PRs, | | .claude/commands/ | | Parallelize across|
| Claude reviews, | | committed to repo | | frontend, backend,|
| human approves | | | | and tests |
+-------------------+ +---------------------+ +-------------------+
- Shared Repo + CLAUDE.md -- Both developers get identical Claude context
- Worktrees for Isolation --
claude --worktree <feature>so sessions never collide - GitHub Actions + @claude -- Tag Claude on issues for small tasks, automated PR reviews, doc updates
- PR-Based Flow -- Both devs open PRs, Claude reviews automatically, other human does final review
- Shared Custom Commands -- Team knowledge in
.claude/commands/ - Agent Teams for Big Features -- Spawn teams to parallelize across frontend, backend, and tests
CollabTest/
├── CLAUDE.md # Shared project context (the foundation)
├── README.md # This file
├── .claude/
│ ├── commands/ # Shared custom slash commands
│ │ └── .gitkeep
│ └── settings.json # Shared Claude Code settings
├── .github/
│ ├── workflows/
│ │ └── claude-code.yml # @claude GitHub Action
│ └── PULL_REQUEST_TEMPLATE.md # PR template
├── src/ # Application source code
│ └── .gitkeep
├── tests/ # Test files
│ └── .gitkeep
└── .gitignore
- Create public GitHub repo
- Initialize with README and CLAUDE.md
- Set up
.github/workflows/claude-code.yml - Create
.claude/commands/directory - Add
.gitignore - Add PR template
- Add
ANTHROPIC_API_KEYto repository secrets - Install Claude GitHub App (
/install-github-app) - Bryan clones the repo and verifies Claude Code loads
CLAUDE.md - Test worktree workflow with a sample feature branch
- Test
@claudetagging on a sample issue - Enable agent teams and run a test coordination session
This is a two-person project between Ryan Decker and Bryan. See CONTRIBUTING.md for the full collaboration process — how we claim work, review PRs, keep CLAUDE.md in sync, and resolve disagreements.
The short version: Issues → self-assign → branch → PR (under 300 lines) → human review → merge. Never push directly to main.
MIT
Built with Claude Code -- testing the future of AI-assisted collaborative development.