ワンクリックで
file-lock
Acquire and release file-level locks to prevent concurrent modifications during multi-agent or human+agent workflows
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Acquire and release file-level locks to prevent concurrent modifications during multi-agent or human+agent workflows
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Time-boxed investigation of a technical question, feasibility study, or proof-of-concept — produces a findings artifact with a recommendation and optional backlog linkage
Time-boxed investigation of a technical question, feasibility study, or proof-of-concept — produces a findings artifact with a recommendation and optional backlog linkage
Usage: Build feature {task-id} with harness {harness-cmd}. Implements a requested feature by continuously looping a fast worker agent against a strict, passing-import but failing test harness until success is achieved.
Review and maintain institutional learnings in docs/compound/ so the compound library stays accurate, deduplicated, and evidence-backed
Risk-triggered plan reinforcement that deepens verification, rollback, and guardrail detail before plan review
Manages the full PR lifecycle: creation, review comment handling, CI remediation, and user-approved merge
| name | file-lock |
| description | Acquire and release file-level locks to prevent concurrent modifications during multi-agent or human+agent workflows |
Manage per-file advisory locks so that multiple agents (or an agent and a human operator) do not clobber the same file during complex refactors or parallel work sessions.
Invoke before modifying any source file when concurrent access is possible. This includes multi-agent orchestration, long-running refactors, and any session where a human may be editing files in the same workspace.
Agents MUST follow the concurrency protocol defined in
.github/instructions/concurrency.instructions.md.
filepath: (Required) Path to the target file, relative to the workspace root.action: (Required) One of acquire or release.acquire success: lock file created, exit code 0.acquire failure: lock already held by another process, exit code 1.release success: lock file removed, exit code 0.release failure: lock file not found (already released), exit code 0 with warning.Both PowerShell and Bash equivalents are provided for cross-platform compatibility. Use whichever matches the runtime environment.
Acquires a file lock by creating a .{filename}.lock file in the same
directory as the target file. Fails if the lock already exists.
PowerShell: scripts/acquire_lock.ps1 <filepath>
Bash: scripts/acquire_lock.sh <filepath>
The lock file contains:
$env:AGENT_NAME / $AGENT_NAME or "unknown")Releases a file lock by deleting the .{filename}.lock file.
PowerShell: scripts/release_lock.ps1 <filepath>
Bash: scripts/release_lock.sh <filepath>
1. Agent identifies file to modify
2. Agent runs: scripts/acquire_lock.{ps1|sh} <filepath>
├─ Exit 0 → lock acquired, proceed to edit
└─ Exit 1 → lock held, wait or prompt operator
3. Agent modifies the file
4. Agent verifies the modification (compile, test, etc.)
5. Agent runs: scripts/release_lock.{ps1|sh} <filepath>