用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/javimosch/open-claw-skills --skill wip-file-guard命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | wip-file-guard |
| description | Hook that blocks destructive edits to protected identity files. For Claude Code CLI and OpenClaw. |
| license | MIT |
| interface | ["cli","module","hook","plugin","skill"] |
| metadata | {"display-name":"Identity File Protection","version":"1.0.1","homepage":"https://github.com/wipcomputer/wip-file-guard","author":"Parker Todd Brooks","category":"dev-tools","capabilities":["file-protection","edit-blocking","identity-guard"],"requires":{"bins":["node"]},"openclaw":{"requires":{"bins":"[Truncated]"},"install":["[Truncated]"],"emoji":"🛡️"}} |
| compatibility | Requires node. Node.js 18+. |
Hook that blocks destructive edits to protected identity files. For Claude Code CLI and OpenClaw.
Use wip-file-guard for:
This is a technical guardrail, not a prompt. It blocks the operation before it happens.
Two rules:
CLAUDE.md, SHARED-CONTEXT.md, SOUL.md, IDENTITY.md, CONTEXT.md, TOOLS.md, MEMORY.md
Any file matching: memory, memories, journal, diary, daily log
node guard.mjs --list # list protected files
bash test.sh # run test suite
Add to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "node \"/path/to/wip-file-guard/guard.mjs\"",
"timeout": 5
}
]
}
]
}
}
The deny message tells the agent to re-read the file and use Edit instead. If the agent ignores it, it's likely post-compaction and has lost context. The hook will keep blocking.
Check the net line removal. Edits that remove more than 2 lines from a protected file are blocked. Small edits (adding or replacing 1-2 lines) are allowed.
基于 SOC 职业分类