कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

wip-file-guard

parkertoddbrooks द्वारा

Coding Agents & IDEs
561clawskills.sh द्वारा बताए गए डाउनलोड
0व्यूज़
0 लाइकइस स्किल को लाइक करने के लिए साइन इन करें
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

Hook that blocks destructive edits to protected identity files.

विवरण

यह स्किल क्या करती है

A hook that intercepts Write and Edit operations on protected identity files before they execute. Write is always blocked on protected files; Edit is blocked when it removes more than 2 net lines. Works with Claude Code CLI and OpenClaw.

Unlike prompt-based instructions that get erased during context compaction, this hook enforces file protection at the tool call level regardless of agent state.

इसे कब इस्तेमाल करें

  • Prevent Claude from overwriting CLAUDE.md during a long session
  • Keep MEMORY.md intact after context compaction resets agent behavior
  • Block accidental deletion of SOUL.md or IDENTITY.md mid-task
  • Protect journal or daily log files from bulk replacement
  • Enforce append-only edits to shared context files in multi-agent setups

उदाहरण वर्कफ़्लो

इनपुट

User asks: 'Rewrite CLAUDE.md with updated instructions'

एजेंट
  1. 1

    Agent issues a Write call targeting CLAUDE.md

  2. 2

    Hook intercepts the PreToolUse event and checks the filename against the protected list

  3. 3

    Hook denies the Write operation and returns a message instructing the agent to use Edit instead

  4. 4

    Agent retries with an Edit call

  5. 5

    Hook checks net line removal; if under 2 lines removed, the edit proceeds

आउटपुट

Edit is allowed or blocked based on net line change, and CLAUDE.md is never fully overwritten

इंस्टॉलेशन

clawhub install parkertoddbrooks/wip-file-guard

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक