More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Protect Shared Ledgers and Git Trees Across AI Agents

    1

    Lock shared YAML/JSONL ledger writes, reject row loss and out-of-scope edits, and check staged commits against a declared file scope, so several AI agents can share one repository without silently losing work.

    $25

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Protect Shared Ledgers and Git Trees Across AI Agents

    Protect Shared Ledgers and Git Trees Across AI Agents

    Example session with this skill installed

    python3 scripts/safe_ledger_write.py --ledger examples/sample_ledger.yaml --candidate examples/sample_ledger_bad_patch.yaml --only task-002 --dry-run --format text

    • Read your context and instructions
    • Compiled the protect shared ledgers

    LedgerGuard: sample_ledger.yaml | before_rows=4 | after_rows=3 | status=REJECTED

    Violations

    • [row-count-decreased] row_count dropped from 4 to 3 (missing: task-004).
    • [outside-only-scope] non-target row modified: task-001 (allowed only: task-002).
      Action: dry-run rejected candidate; original ledger untouched.
    sample_ledger.yaml

    Connects securely to your tools. The creator never sees your data.

    About this skill

    For teams running multiple Claude Code or Codex agents on the same repository and shared YAML/JSONL ledgers. It helps prevent silent row drops, zero-byte overwrites, accidental git stash sweeps across teammates' uncommitted files, and cross-task commit pollution.

    What you get

    • Six practical guides: concurrency failure modes, protected ledger writes, shared Git trees, baseline handoff checks, test harnesses, and integration limits.
    • scripts/safe_ledger_write.py: lock, validate, snapshot, and atomically replace a candidate JSON, JSONL, or simple YAML list ledger. Supports --only, --dry-run, and --recover-latest.
    • scripts/git_scope_audit.py: inspect staged or committed paths against declared file patterns and optional added-symbol names.
    • templates/block_shared_stash_hook.py: a Claude Code PreToolUse hook that reads the real tool_name and tool_input.command fields and blocks mutating stash commands.
    • Integration templates (safe_ledger_patch_example.py, git_precommit_scope_check.sh, settings_hooks_snippet.json) and a regression test suite that uses real Git repositories and concurrent writer processes.

    Quick start

    Run the dry-run example from the package folder:

    python3 scripts/safe_ledger_write.py --ledger examples/sample_ledger.yaml --candidate examples/sample_ledger_bad_patch.yaml --only task-002 --dry-run --format text

    It rejects the candidate: the row count drops from 4 to 3 and a row outside the allowed scope is modified. The original ledger stays untouched.

    Limits

    The controls reduce accidental loss under local POSIX file locking and declared-scope checks. They depend on cooperating writers, they do not merge conflicting edits to the same record, and they do not guarantee locks on every network filesystem. The Git scope audit works on staged or committed diffs, and its symbol mode is a simple declaration check, not a language parser. Shell hooks are defense in depth: obfuscated commands such as eval need platform permission controls as well.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Depends on cooperating writers, local POSIX advisory file locks, and explicitly declared scopes; locking is not guaranteed on every network filesystem. It does not merge conflicting edits to the same record or decide which of two different edits to one row is correct. The Git scope audit checks staged or committed diffs, and its symbol mode is a simple declaration check, not a language parser. The shell hook is defense in depth: obfuscated commands such as eval need platform permission controls as well.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    Python 3.9+Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    Six practical guides, two standard-library Python command-line tools (safe_ledger_write.py and git_scope_audit.py), a Claude Code PreToolUse hook that blocks mutating stash commands, integration templates, synthetic examples, and a regression test suite that uses real Git repositories and concurrent writer processes.

    It locks, validates, snapshots, and atomically replaces a candidate JSON, JSONL, or simple YAML list ledger. It supports --only to limit the change to one identifier, --dry-run to check without writing, and --recover-latest to restore the latest snapshot. In the bundled example it rejects a candidate whose row count drops from 4 to 3.

    It inspects staged or committed paths against declared file patterns and optional added-symbol names. The symbol mode is a simple declaration check, not a language parser.

    templates/block_shared_stash_hook.py is a Claude Code PreToolUse hook. It reads the real tool_name and tool_input.command fields and blocks mutating stash commands. It is defense in depth: obfuscated commands such as eval need platform permission controls as well.

    Python 3.9 or newer and the standard library only; no extra packages. The ledger locks use local POSIX file locking.

    No. It does not merge conflicting edits to the same record, and it does not guarantee locking on every network filesystem. It relies on cooperating writers and declared scopes, and it reduces accidental loss rather than preventing every conflict.

    New in Agents & Orchestration