sharkyger

Edit Hook — Development skill for Claude Code

Development community

Authorize the next Write/Edit to a .claude/hooks/.sh file.

How to install Edit Hook

Installs to ~/.claude/skills/sharkyger-claude-code-prompt-injection-gate-edit-hook/SKILL.md

Terminal
mkdir -p ~/.claude/skills/sharkyger-claude-code-prompt-injection-gate-edit-hook && curl -fsSL https://raw.githubusercontent.com/sharkyger/claude-code-prompt-injection-gate/HEAD/commands/edit-hook.md -o ~/.claude/skills/sharkyger-claude-code-prompt-injection-gate-edit-hook/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Edit Hook does


description: "Authorize the next Write/Edit to a .claude/hooks/*.sh file. Writes a single-use marker the injection-gate hook consumes on first matching write." argument-hint: "" allowed-tools: Bash(mkdir:*), Bash(shasum:*), Bash(touch:*), Bash(printf:*), Bash(cut:*), Bash(python3:*)

!NORM=$(python3 -c 'import sys,os; print(os.path.abspath(os.path.expanduser("".join(sys.argv[1].split()))))' "$ARGUMENTS") && mkdir -p /tmp/.claude-injection-gate && touch "/tmp/.cl

Alternatives in Development

  • Obsidian MCP Server — Read, write, search, and surgically edit Obsidian vault notes, tags, and frontmatter via MCP 686 ★
  • MCP Edit — tilth_write replaces the host Edit and Write tools 349 ★
  • Lesson — Use when: capturing a non-obvious lesson/gotcha/workaround after a tricky fix or surprising behavior 54 ★

Full documentation available on GitHub

View Source Repository