How this skill is triggered — by the user, by Claude, or both
Slash command
/openspec-autodev:claimThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the file ownership manager for multi-session collaboration.
You are the file ownership manager for multi-session collaboration. Manage which session owns which files to prevent edit conflicts.
Before any claim operation, check if coordination is enabled:
cat .claude/coordination.json 2>/dev/null
When coordination is enabled, saving .claude/sessions/<session-id>.json updates the server copy of fileClaims automatically (PostToolUse hook, full replace). If you change claims without writing that JSON file, use the REST calls below.
If enabled, all claim operations must sync to the remote server in addition to local files:
POST <server>/api/v1/claims/<session-id> with { "claims": ["<pattern>"] }
DELETE <server>/api/v1/claims/<session-id>PUT <server>/api/v1/claims/transfer with { "from": "<id>", "to": "<id>", "pattern": "<pattern>" }GET <server>/api/v1/sessions and display all sessions' claimsIf the server is unreachable, perform the operation locally and warn:
⚠️ Coordination server unreachable — change applied locally only.
Run /openspec-autodev:status when server is back to verify sync.
Parse $ARGUMENTS to extract:
add, release, transfer, or list (default: list)src/search/*.ts)transfer)Read the current session's file claims from .claude/sessions/<session-id>.json and display:
=== Your File Claims (session: <session-id>) ===
📁 Claimed files/patterns:
1. src/search/index.ts
2. src/search/utils.ts
3. src/api/search.ts
To release: /openspec-autodev:claim release <pattern>
To add: /openspec-autodev:claim add <pattern>
Before adding a claim, check all other active sessions for overlapping claims:
# Read all session files in .claude/sessions/
# For each other active session, check if any of their fileClaims
# overlap with the requested pattern
If no conflict: Add the pattern to the current session's fileClaims array:
# Update .claude/sessions/<session-id>.json
# Append the new pattern to fileClaims
Report: ✅ Claimed: <pattern>
If conflict detected: Report and offer options:
⚠️ Conflict: <pattern> overlaps with session <other-id> (<user>, <feature>)
Options:
1. Force claim — override (the other session will be warned on next edit)
2. Request transfer — ask the other user to release
3. Cancel — do not claim
Reply with your choice.
If user chooses "Force claim", add the claim and log a warning in the other session's directory:
echo "WARNING: <your-session> force-claimed <pattern> at <timestamp>" >> .claude/sessions/<other-id>/conflict-log.txt
Remove the specified pattern from the current session's fileClaims:
# Update .claude/sessions/<session-id>.json
# Remove matching patterns from fileClaims
Report: ✅ Released: <pattern>
Transfer a file claim from the current session to another session:
Confirm the pattern is in the current session's claims.
fileClaimsfileClaimsReport: ✅ Transferred: <pattern> → <target-session-id>
Note: File claims are typically set automatically during Phase 2 (Environment Setup) of auto-dev and iterate workflows. The micro-task decomposition step identifies which files each task modifies, and these are registered as claims for the session.
Manual claim management is for:
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub wonder-zhang/openspec-autodev --plugin openspec-autodev