skills/multi-session/SKILL.md
Multi-session coordination for parallel AI sessions. Provides heartbeat, stale session detection, merge queue, and conflict management. Loaded conditionally when session-setup reports multiple active sessions.
npx skillsauth add mdmagnuson-creator/yo-go multi-sessionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill is loaded only when
session-setupreportssessions > 1. Session initialization (ID generation, lock entry, branch creation) is handled by thesession-setupskill.
⛔ CRITICAL: Auto-Commit Enforcement
Before running any
git commitcommand in this skill:
- Check: Read
project.json→git.autoCommit- If
false: Do NOT rungit commit. Instead:
- Stage files with
git add- Report staged files and suggested commit message
- Say: "Auto-commit is disabled. Run
git commit -m \"<message>\"when ready."- Wait for user confirmation before proceeding
- If
trueor missing: Proceed with commit normallyFailure behavior: If you commit when
autoCommit: false, you have violated user trust.
This skill provides coordination helpers for multiple parallel AI sessions working on the same codebase. It handles heartbeat updates, stale session detection, merge queue, and conflict resolution.
When multiple sessions are active (detected by session-setup), this skill provides:
| File | Purpose |
|------|---------|
| docs/session-locks.json | Tracks active sessions and their claimed PRDs |
| docs/prd-registry.json | Master registry of all PRDs with conflict analysis |
| docs/prds/ | Active PRDs ready for implementation |
| docs/completed/ | Archived completed PRDs |
| docs/abandoned/ | Archived abandoned PRDs |
A session is stale if its heartbeat is older than 10 minutes:
const isStale = (lock) => {
const heartbeat = new Date(lock.heartbeat);
const now = new Date();
const minutesAgo = (now - heartbeat) / 1000 / 60;
return minutesAgo > 10;
};
After completing each story, choose the path based on active session count:
sessions.length === 1)When you are the only active session, skip the expensive git round-trip:
docs/session-locks.json from the working tree (no checkout){
"heartbeat": "<current ISO8601>",
"currentStory": "US-XXX"
}
This avoids the stash → checkout main → pull → commit → push → checkout branch → pop cycle, saving 2-10 seconds per story for solo developers.
sessions.length > 1)When multiple sessions are active, perform the full git round-trip:
git checkout main && git pull origin main{
"heartbeat": "<current ISO8601>",
"currentStory": "US-XXX"
}
stories.completedchore: heartbeat [sessionId] - completed [storyId]docs/completed/YYYY-MM-DD/prds to completedsession-locks.jsonchore: archive [prdId], release [sessionId]docs/abandoned/YYYY-MM-DD-[prdId]/reason.md with abandonment detailschore: abandon [prdId]| Level | Meaning | Behavior |
|-------|---------|----------|
| none | No overlapping files | ✅ Safe to run in parallel |
| low | Minor overlap (shared types) | ⚠️ Warn, allow with caution |
| medium | Some shared components | ⚠️ Warn strongly, suggest waiting |
| high | Major overlap (same features) | 🛑 Block unless explicitly overridden |
PRD ID → Branch name:
prd-print-templates → feature/print-templates
prd-permissions → feature/permissions
The branchName field in each PRD specifies the exact branch name.
status: "blocked", add blockedReasongit fetch origingit rebase origin/mainWhen user encounters stale session:
| Action | Steps | |--------|-------| | Resume | Update lock with new sessionId → checkout branch → continue | | Abandon | Delete branch → move to abandoned/ → remove lock | | Skip | Leave stale alone → claim different PRD |
# Read session-locks.json from working tree
# Update your heartbeat timestamp in-place
# Write back — no commit, no push, no branch switching
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
'.sessions[] | select(.sessionId == "developer-abc123") .heartbeat = $ts' \
docs/session-locks.json > docs/session-locks.json.tmp && \
mv docs/session-locks.json.tmp docs/session-locks.json
# Continue working on feature branch — zero git overhead
# Save current work
git stash
# Switch to main
git checkout main
git pull origin main
# Update heartbeat (edit session-locks.json and prd-registry.json)
# ...
# Commit and push
git add docs/session-locks.json docs/prd-registry.json
git commit -m "chore: heartbeat developer-abc123 - completed US-003"
git push origin main
# Return to work
git checkout feature/print-templates
git stash pop
To see current session status, invoke the session-status agent:
@session-status
This displays:
data-ai
Generate verification contracts before delegating tasks to sub-agents, defining how success will be measured. Triggers on: verification contract, delegation contract, task verification, contract-first delegation.
testing
Verify that Vercel environment variables point to the correct Supabase project for each environment to prevent staging/production cross-wiring. Triggers on: vercel supabase check, environment alignment, env var check, supabase environment.
development
Manage codebase and database vectorization for semantic search. Use when initializing, refreshing, or querying the vector index. Triggers on: vectorize init, vectorize refresh, vectorize search, semantic search, vector index, enable vectorization.
testing
Patterns for XCUITest UI tests for native Apple apps (macOS/iOS). Use when writing or reviewing XCUITest tests for Swift apps. Triggers on: XCUITest, xcuitest, native app testing, Apple UI tests, SwiftUI tests, AppKit tests, UIKit tests.