From craft
Gates all file writes outside .craft/ and .claude/ directories, requiring explicit user approval before any modification. Creates scoped approval tasks and manages the write gate lifecycle.
How this skill is triggered — by the user, by Claude, or both
Slash command
/craft:approveThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are requesting permission to write files. This skill gates ALL writes outside `.craft/` and `.claude/` directories. It requires explicit user approval every single time - no exceptions, no bypass, no auto-approve.
You are requesting permission to write files. This skill gates ALL writes outside .craft/ and .claude/ directories. It requires explicit user approval every single time - no exceptions, no bypass, no auto-approve.
Call this skill BEFORE your first write attempt when:
.craft/Do NOT call this for writes to .craft/ or .claude/ directories - those are always allowed.
Before asking for approval, gather what you're about to do. Be specific:
Use AskUserQuestion. This step CANNOT be skipped. Ever.
question: "I need write access to make these changes. Approve?"
header: "Write Access"
options:
- label: "Approve"
description: "{summary of what will be changed}"
- label: "Deny"
description: "Block these changes"
- label: "Modify scope"
description: "I want to adjust what's allowed"
If "Deny" -> Stop. Do not open the gate. Report to the caller that writes were denied.
If "Modify scope" -> Let the user describe the adjusted scope. Re-present the AskUserQuestion with the new scope. Loop until approved or denied.
If "Approve" -> Continue to Step 3.
Create exactly two tasks:
Task 1 - The approved work:
TaskCreate({
subject: "Approved: {brief description of changes}",
description: "Files: {file list}. Scope: {what was approved}.",
activeForm: "Writing approved changes"
})
Set this task to in_progress immediately.
Task 2 - Close the gate:
TaskCreate({
subject: "Close write gate",
description: "Set CRAFT_WRITE_ENABLED='' after approved work is done.",
activeForm: "Closing write gate"
})
Set addBlockedBy to Task 1's ID so it can't complete before the work is done.
Run via Bash:
${CLAUDE_PLUGIN_ROOT}/hooks/scripts/update-global-state.sh CRAFT_WRITE_ENABLED true
The write gate is now open. The agent can write files.
The caller (workflow, fix skill, implementer, etc.) performs the approved changes. As work completes, the approved-work task stays in_progress.
This skill does NOT do the writing itself. It opens the gate and returns control to the caller. The caller writes, then calls back to close.
When the approved work is done, the caller MUST close the gate:
completed:TaskUpdate({ taskId: "{task-1-id}", status: "completed" })
${CLAUDE_PLUGIN_ROOT}/hooks/scripts/update-global-state.sh CRAFT_WRITE_ENABLED ""
completed:TaskUpdate({ taskId: "{task-2-id}", status: "completed" })
session-start.sh will detect CRAFT_WRITE_ENABLED=true with no active story/workflow and reset it.grep "CRAFT_WRITE_ENABLED" "${CRAFT_PROJECT_ROOT:-.}/.craft/.global-state"
If already true, skip this skill.
npx claudepluginhub drobins25/craft --plugin craftBlocks Edit/Write/Bash actions and forces concrete investigation (importers, schemas, user instructions) before allowing edits. Improves output quality by +2.25 points.
Blocks Edit/Write/Bash (including MultiEdit) until investigating importers via Grep, data schemas, affected functions, and user instructions verbatim. Improves output quality in multi-module codebases.
Validates file modifications stay within authorized scope by checking user requests, task descriptions, and dependencies. Prevents scope creep and unauthorized edits.