dibs

Claims and releases single-occupancy directory locks so one coding agent mutates a worktree at a time.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill dibs-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dibs
Source: https://github.com/laicluse/agent-fieldkit/tree/main/.agents/plugins/generated/dibs/skills/dibs
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill dibs-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When multiple coding agents (Claude, Codex, or others) work on the same machine, two agents can edit the same git worktree or directory simultaneously and corrupt each other's work. This Skill provides a vendor-neutral, file-based lock so only one agent holds write occupancy of a directory at any moment. ## Core Features & Use Cases - Atomic lock claiming: Creates a lock via exclusive file creation keyed by the resolved directory realpath, with pid-based liveness detection and automatic takeover of stale locks whose holder process has died. - Full lock lifecycle: Commands to claim, check, release, and release-all locks, plus an exclude/include list for directories that should never be locked (such as /tmp or agent config homes). - Required work descriptions: Every lock records a human-readable description of the change being made, so a blocked agent can tell the operator which session holds a directory and what it was doing. - Use Case: A Claude session and a Codex session both try to edit the same repository. The first claims the lock with a description; the second is refused, sees who holds it, and spins up a separate git worktree instead of colliding. ## Quick Start Ask the agent to claim dibs on the current project directory with a short description of the change before making any edits.

Frequently Asked Questions about dibs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent two coding agents from editing the same directory?▼

Claim a directory lock before the first mutating edit using the dibs CLI claim command with a short work description. Other agents attempting to write are refused and shown the current holder, its pid, and its described work.

How do I release a directory lock when my work is done?▼

Run the release command on the directory, or release-all to free every lock held by your session in one sweep. Only the recorded holder, identified by pid, session id, or stable owner plus agent, can release a lock.

What happens if an agent crashes while holding a lock?▼

Liveness is pid-based, so a lock whose holder process has died is treated as stale and taken over by the next claimer. A max-age-hours cap and the acquired-at timestamp bound the residual risk from pid recycling.

Does this directory lock work across network filesystems or multiple machines?▼

No, the lock is single-machine only because atomic-create semantics and pid liveness are host-local. Directories shared over NFS or other network filesystems are out of scope and would need a lease broker.

Can I exclude certain directories from being locked?▼

Yes, the exclude command adds a directory to a per-machine never-lock list, and include reverses it. Built-in defaults like /tmp and agent config homes are always excluded, and matching is by resolved realpath.