skills/session-setup/SKILL.md
Always-on session initialization for Developer. Generates session ID, manages session-locks.json, creates feature branches, and returns active session count for conditional multi-session loading.
npx skillsauth add mdmagnuson-creator/yo-go session-setupInstall 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 always runs during Developer Phase 0B. It handles session initialization that is required regardless of whether other sessions are active.
⛔ 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.
Session setup provides lightweight, always-on coordination for every Developer session. It:
session-locks.jsonThe caller (Developer) uses the session count to decide whether to load the multi-session skill for full coordination (heartbeat, merge queue, conflict resolution).
agents.multiSession check)SESSION_ID="developer-$(openssl rand -hex 3)"
echo $SESSION_ID # e.g., developer-a1b2c3
LOCKS_FILE="docs/session-locks.json"
if [ ! -f "$LOCKS_FILE" ]; then
# Create lazily on first run
echo '{"sessions":[]}' > "$LOCKS_FILE"
git add "$LOCKS_FILE"
fi
If the file already exists, read it to get the current sessions array.
Add a new entry to the sessions array:
{
"sessionId": "developer-abc123",
"prdId": "print-templates",
"prdFile": "docs/prds/prd-print-templates.json",
"branch": "feature/print-templates",
"claimedAt": "2026-02-19T15:00:00Z",
"heartbeat": "2026-02-19T15:00:00Z",
"currentStory": null,
"status": "in_progress"
}
Update the PRD registry: set PRD status to "in_progress".
Commit and push to main:
git add docs/session-locks.json docs/prd-registry.json
git commit -m "chore: claim [prdId] for $SESSION_ID"
git push origin main
# Branch naming: prd-id → feature/id (strip "prd-" prefix)
BRANCH="feature/print-templates"
# Create new branch from main, or checkout existing
git checkout -b "$BRANCH" main 2>/dev/null || git checkout "$BRANCH"
git fetch origin main
git rebase origin/main
If rebase conflicts occur:
status: "blocked", add blockedReasonAfter writing the session entry, count active sessions:
ACTIVE_SESSIONS=$(jq '[.sessions[] | select(.status == "in_progress")] | length' docs/session-locks.json)
echo "Active sessions: $ACTIVE_SESSIONS"
The caller (Developer) uses this count:
| Count | Action |
|-------|--------|
| 1 (only this session) | Proceed without loading multi-session skill — no coordination overhead |
| > 1 (other sessions active) | Load multi-session skill for heartbeat, merge queue, and conflict coordination |
| 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 |
If another session claimed between your read and push:
git fetch origingit rebase origin/mainsession-locks.json — check if PRD was claimed by another sessiondata-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.