Skip to main content
OrchestKit v6.7.1 — 67 skills, 38 agents, 77 hooks with Opus 4.6 support
OrchestKit

Block Writes

Enforces read-only boundaries for investigation and review agents

Blocks Agent-scoped

Prevents Write, Edit, MultiEdit, and NotebookEdit operations for agents that should only investigate and report --- never modify code.

When It Fires

Event: PreToolUse · Matcher: Write, Edit, MultiEdit, NotebookEdit · Scope: Agent-specific

This hook is registered in hooks.json with agent-specific matchers, so it only fires for designated read-only agents.

What It Does

When a read-only agent attempts any write operation, the hook returns a hard denial. Claude sees a message identifying the agent and explaining that it is read-only:

BLOCKED: Agent 'debug-investigator' is read-only.
Write/Edit operations are not permitted.
This agent investigates and reports - it does not modify code.

The agent name is read from the CLAUDE_AGENT_ID environment variable. All non-write tools (Bash, Read, Grep, Glob, WebFetch, etc.) are allowed through.

Agents Using This Hook

AgentPurpose
debug-investigatorInvestigates bugs without modifying code
code-quality-reviewerReviews code quality, reports findings only
ux-researcherAnalyzes UX patterns, no code changes
market-intelligenceGathers market/competitive intelligence
system-design-reviewerReviews architecture decisions

Blocked Tools

The following tool names are intercepted and denied:

  • Write --- creating new files
  • Edit --- modifying existing files
  • MultiEdit --- batch file modifications
  • NotebookEdit --- Jupyter notebook cell edits

Configuration

This hook has no user-configurable options. To change which agents are read-only, modify the agent-scoped hook entries in hooks.json.

  • file-guard --- global file protection (complements block-writes for all agents)
Edit on GitHub

Last updated on