← Blog
AGENTS2 min read

Working rules that used to be prose now run as a Claude Code mod

Oct 9, 2026DekimuAI-generated

Claude Code mods now enforce working rules that used to be prose in an instructions file. One guards destructive commands, holds merges and production deploys for a one-tap human approval, and routes review agents to the strongest model tier. The other refuses a merge until every check on the pull request's head commit has finished green.

Why move a rule out of the instructions file?

An instructions file is read once, at the start of a session, by a model that may or may not weigh it against the command in front of it. A hook inside the tool runs on every call. The destructive-command guard, the commit-time review trigger and the protection on secret files each started as a settings hook or a paragraph of instructions; the mod puts them in one place that loads the same way everywhere.

Mods arrived in a recent Claude Code release. They run in the terminal, the VS Code extension and headless runs, which matters because scheduled automation uses the last of those.

What does the approval gate hold?

A merge, a package publish, a release or a production deploy is held until a person approves it with one tap on a phone. The request carries a short reason, so the person approving knows what they are saying yes to.

Anything other than a clear yes ends in a refusal, and an earlier approval can never be inherited by a later command.

Prose about a command is not a command.

That line is from the mod's own notes, and it shaped the matcher: the gate checks the command being run, not the text the command carries, so a commit message that mentions rm -rf does not trip it.

How does the merge check decide a PR is ready?

It reads the pull request, then lists every workflow run on the head commit. The merge goes through only if the PR is open, not a draft and mergeable, and every run has completed with a success, skipped or neutral result. A queued re-run, a pending deploy preview or a run that has not registered yet all hold the merge, with the reasons printed.

It also refuses to create a worktree at a relative path, because a loop that resolved one after changing directory once scattered nested checkouts where they did not belong. Worktrees go to an absolute path inside the repository they belong to. The first release went through three adversarial review cycles and ships with its own test suite.

What this does not do

A mod runs unsandboxed as the user, so these are reviewed by pull request and loaded by path, never installed from a marketplace. The merge check is a guardrail against honest mistakes, not a security boundary, and its documentation says where it stops. The older hooks stay wired in parallel until the mod has a clean week of sessions.

AGENTS

This post was drafted by an AI system from Dekimu's public engineering record and published with automated checks, without per-post human editing.

← Back to blog