tyfarrago-hub/compound/concurrent-sessions
Claude Code and agent skill by tyfarrago-hub/compound
- community
Checking that the SKILL.md file is still in the repository.
Safety rules for multiple Claude Code sessions or agents working in the same git repository at the same time. Use when the user says other agents/sessions are working on the repo, when files look half-broken or inconsistent mid-task, when an edit fails with "string to replace not found", or before committing or deploying from a shared working tree.
Install
npx vskill@latest install tyfarrago-hub/compound/concurrent-sessionsSKILL.md
The same SKILL.md was published earlier as tyfarrago-hub/compound/concurrent-sessions.
concurrent-sessions
Running several Claude Code sessions on one repo at once is a superpower right up until two of them fight over the same file. These rules come from real collisions: one session began reverting "broken-looking" files that a second session was actively mid-rewrite on, four minutes from finishing. The revert would have destroyed an hour of work. Every rule below was paid for.
The mental model
A shared working tree is live mutable state with last-write-wins per file and no locking. Treat every file you did not just write as potentially owned by someone else, and treat "this looks half-broken" as evidence of work in flight, never as evidence of work to clean up.
Rules
1. Check mtimes before touching anything suspicious
Before reverting or overwriting any file that looks half-finished:
(on Linux: stat -c "%y %n"). A modification time in the last few minutes means another agent is live in that file. Do not touch it. Wait, or work elsewhere.
2. Back up before any cross-file "cleanup"
If you genuinely must untangle a mixed state: git diff HEAD > backup.patch and copy the specific files first, so anything you do is recoverable.
3. Commit only your own files, by explicit path
Never git add -A or git add . in a shared tree. Stage exactly the files you changed:
The other session's uncommitted work stays uncommitted, under their control.
4. Deploy from an isolated worktree, never from the shared tree
The shared tree contains someone else's work-in-progress. A build from it ships their half-finished code. Instead:
This proves your commit builds and deploys WITHOUT their WIP. If the build needs untracked assets the other session created (a logo, an env file), copy those in deliberately, and note it.
5. Re-read before every edit
Another agent may have changed a file since you last read it. "String to replace not found" means the file moved under you: re-read it and re-derive the edit. Never retry the same edit blind, and never assume your in-memory version is current after any pause.
6. Respect the other agent's domain
A subsystem another session is actively redesigning is theirs. Make your changes coherent with the direction they are taking; do not complete, "fix", or revert their in-flight vision. If your work and theirs meet in one file (a global stylesheet, a shared config), merge surgically: your hunks and theirs are usually in disjoint ranges, so you can splice rather than choose sides.
7. When you need real isolation, take a worktree from the start
If your task is likely to collide (same components, same styles), start in a branch worktree instead of sharing the tree:
Copy in env files, clone node_modules if the platform supports cheap copies (APFS: cp -Rc), run your own dev server on its own port. Merge deliberately later. The merge is where you decide file by file: full-rewrite files taken whole from one side (git checkout --theirs <file> takes the incoming branch's version), genuinely shared files resolved hunk by hunk in place.
8. Sanity-check coherence across the seam
Type checkers catch broken imports but nothing catches a component emitting CSS classes that no stylesheet defines. After any merge or shared-file splice, grep the classes and symbols one side emits and confirm the other side defines them.
The one-line summary
In a shared tree: recent mtime means hands off, commits are explicit-path only, deploys come from isolated worktrees, and every edit starts with a fresh read.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/concurrent-sessions/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tyfarrago-hub/compound/concurrent-sessions)