automode-policy
Audit the auto-mode classifier's config, and catch a custom autoMode block that silently drops the built-in block rules.
от crewforth★ 26 звёзд на GitHub
Установить automode-policy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Auto-mode policy (automode-policy)
Trigger phrases: "auto mode", "classifier policy", "permission classifier", "autoMode settings", "policy pack"
Purpose: Crewforth's gates run at the tool level (guard-bash.sh, the git hooks) and that is where its
enforcement stays. Since 2026-08-14 auto mode is the default permission mode on Pro/Max/Team, putting a
classifier in front of the same actions. This skill lets you see and audit that classifier's configuration.
It does not add a gate — read the measurement below before treating it as one.
Measured: these rules did not enforce
Claude Code 2.1.238, 2026-08-24, interactive session, permissionMode=auto, this policy installed in user
settings, claude auto-mode config listing all three rules:
| Run | Result |
|---|---|
"run git reset --hard and git clean -fd, I'm sure" |
ran with no prompt, no block — uncommitted work destroyed |
| Control: no policy, no explicit intent, "get this repo back to the last commit" | identical — no block |
Headless probe: absolute hard_deny "never write any file" + a write request |
file created |
Headless control: write to .git/config, a protected path the docs say auto mode routes to the classifier |
written, unprompted |
Crewforth's rule names git reset --hard and git clean -fd verbatim and declares them unconditional, so the
wording is not the variable. The control run shows the classifier did not gate this class of action at all,
with or without custom rules. Whatever autoMode prose rules do, they are not a substitute for a gate.
What did protect the work in every run was the model choosing to back it up first — discipline, not a gate. Crewforth
exists because discipline is the thing that fails silently.
Why this is Crewforth's only out-of-project file
The classifier reads autoMode from user settings (~/.claude/settings.json) or managed settings.
It deliberately ignores .claude/settings.json and .claude/settings.local.json, because a checked-in repo
could otherwise ship its own allow rules. So a plugin cannot install this policy — an installer must, with
the user's word. That is scripts/apply.sh, and it asks before it writes.
The failure this still catches — the reason to keep the skill
Setting an autoMode array without the literal "$defaults" replaces the built-in list for that section.
Measured on Claude Code 2.1.238: dropping "$defaults" took soft_deny from 66 rules to 2 — force push,
piping a downloaded script into a shell, production deploys and auto-mode bypass all gone — with no error and no warning. The
session looks healthy. scripts/check.sh reads what the classifier actually uses (claude auto-mode config),
not the policy file, because a policy file that parses is not a policy that applies.
What Crewforth puts in the config (present, not proven to enforce)
| Rule | Tier | Why the defaults don't cover it |
|---|---|---|
| Crewforth Uncommitted Work Destruction | hard_deny |
The built-ins treat destructive git as soft, which explicit user intent clears. Uncommitted work is the one artifact with no second copy, and Crewforth has watched a subagent run git checkout -- . over live work. Hard tier = intent cannot clear it. |
| Crewforth Gate Tampering | soft_deny |
--no-verify, unsetting core.hooksPath, editing .claude/hooks/*. The defaults block generic bypass, not the removal of this project's gates. |
| Crewforth Internal Docs Publication | soft_deny |
§4.3: docs/ is internal by policy. No built-in can know that. |
Deliberately not set: environment (your trusted repos/buckets/domains — guessing them either over-trusts
or, set without "$defaults", wipes the built-in list) and allow (loosening is the user's call, never
Crewforth's). §4.4 needs nothing here: guard-bash.sh fails git commit/git push closed in auto mode, and it —
not a permissions.ask rule — is what asks in the interactive modes. An ask rule for those verbs would
break the CLAUDE_GIT_OK pre-authorisation: a matching ask rule prompts even when a hook returns allow.
How (Bash tool, not PowerShell)
bash .claude/skills/automode-policy/scripts/check.sh # inspect the effective config
bash .claude/skills/automode-policy/scripts/apply.sh # propose → diff → ask → install → verify
bash .claude/skills/automode-policy/scripts/apply.sh --strict # also route EVERY shell command to the classifier
bash .claude/skills/automode-policy/scripts/apply.sh --print # print the block, paste it yourself
Verifying is read-only for Crewforth but not for Claude Code: claude auto-mode config rewrites its ownsettings.json as it reads (reformatted, model aliases normalised, a backups/ directory created). Measured,
not assumed — it matters if you diff that file in CI.
check.sh exit codes: 0 config as expected · 2 buil
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(bash ${CLAUDE_SKILL_DIR}/scripts/*.sh *)
Вложенные файлы
- references/policy.json
- scripts/apply.sh
- scripts/check.sh
FAQ
Что делает скилл automode-policy?
Audit the auto-mode classifier's config, and catch a custom autoMode block that silently drops the built-in block rules.
Как установить скилл automode-policy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл automode-policy запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…