claim

claim is a command for Claude Code from terrene-foundation/kailash-coc-claude-py. It costs 47 tokens per session (1,502 once invoked), scanned A, original, Apache-2.0.

A command that records your intention to work on a file or group of files in a shared coordination log. It signs the record and reports conflicts with other operators' claims.

In plain words
What is it for?
Claiming a path or file pattern before making changes in a repository shared by multiple operators.
Why use it?
It exposes competing work before editing, stopping on a direct conflict and warning about nearby changes.

Command for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths.

Good fit Claiming a path or file pattern before making changes in a repository shared by multiple operators.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/terrene-foundation/kailash-coc-claude-py/claim
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/terrene-foundation/kailash-coc-claude-py

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claim

README.md
[![agentmods](https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/claim/github.svg)](https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/claim)
Your own site
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/claim"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/claim/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claim

Your own site · 80×15
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/claim"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/claim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01502
Opus 5 $0.00023 $0.00751
Sonnet 5 $0.00009 $0.00300
Haiku 4.5 $0.00005 $0.00150

Measured 7d ago against content hash 3137dd1ee205, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

claim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/claim.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/claim — Multi-Operator Explicit Claim

Stake an explicit advisory claim on a path or glob. The same shape M2's adjacency-leasecheck.js writes on INDEPENDENT auto-claim — except /claim is the user-driven path: the operator says "I'm about to work on this; surface conflicts before I start."

Per multi-operator-coc architecture §4.1 + §4.2: claims are advisory (leases-advisory). Every adjacency-leasecheck severity is non-blocking — the §4.2 filesystem exception (git status --porcelain cross-worktree contention) surfaces as halt-and-report since loom#1323, and /claim itself emits halt-and-report on SAME and advisory on ADJACENT.

Usage

/claim <path-or-glob>
  • <path-or-glob> — repo-relative path (src/lib/foo.js) or glob (src/lib/**/*.js).

Flow

  1. Resolve identity via .claude/hooks/lib/operator-id.js::resolveIdentity(cwd). If no signing key is configured, halt with next: configure signing key, then run /whoami --register (architecture §6.1 block-into).
  2. Read coordination log via filesystem Transport (.claude/hooks/lib/transport-filesystem.js::createFilesystemTransport(repoDir)).
  3. Fold via A2a's foldLog(records, roster, {}) (.claude/hooks/lib/coordination-log.js). Folded accepted[] is the authoritative active-claim view.
  4. Project active sibling claims — filter accepted by type === "claim", exclude own verified_id, exclude released/reaped (rule 7 isClaimActive predicate).
  5. Evaluate §4.1 relation via .claude/hooks/lib/adjacency.js::sameReason then adjacentReason against the candidate path. Pass { phase, candidateCommits } opts where known (the optional axis-3 cohort promotion).
  6. Dispatch by verdict:
    • SAME → halt-and-report. Print the conflicting claim_id, sibling display_id, and the matched predicate (exact / glob / dir-contains / workspace / commit-cohort / phase / composed-axis-3 — the full wired adjacency.js::sameReason predicate return set). Do NOT append a claim record (this prevents the F2-1 race-to-write). Resolution routes through /release-claim, which self-releases ONLY the caller's own claims — the operator cannot release a sibling's claim directly. So: either the sibling self-releases (they run /release-claim <their-ref>), OR — if the sibling's claim is STALE — reap it via the cross-operator ceremony /release-claim --reap <conflicting-ref> --cosigner <person_id> (distinct-person cosigner + pinned-heartbeat-past-LIVENESS_TTL_MS per §4.4). There is no lease-override command; do NOT direct the operator to one.
    • ADJACENT → write the claim record with content.granted_relation = "ADJACENT" and content.advisory = true. Print the nearby sibling's claim_id and the matched predicate.
    • INDEPENDENT → write the claim record with content.granted_relation = "INDEPENDENT". Silent success.

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 80 lines · 47 tokens per session scan A 3137dd1ee205

Subscribe to this mod's changes

claim is a command published in the GitHub repository terrene-foundation/kailash-coc-claude-py (12 stars, last pushed 23d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,502 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.