Skip to content
Skills Library
AI & agents · Writing

draft-auto-mode-rules

/draft-auto-mode-rules

Draft a paste-ready `autoMode` classifier block by interviewing the user about what should and should not be auto-approved, each entry in the shape the classifier reads well and every section keeping `$defaults`. Use when: 'help me write auto mode rules', 'draft an autoMode block', 'set up auto mode', 'add an auto-mode rule for X', 'my auto mode rules are too vague', 'rewrite this classifier entry', or an audit shows rules dropped or ignored. Prints only, never writes a settings file.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

84/ 100Class: good
Format9 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
2
HTML comments
1
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

Scripts: scripts/draft-automode-block.sh, scripts/draft-automode-block.test.sh

What it does and when to use it

Draft a paste-ready `autoMode` classifier block by interviewing the user about what should and should not be auto-approved, each entry in the shape the classifier reads well and every section keeping `$defaults`. Use when: 'help me write auto mode rules', 'draft an autoMode block', 'set up auto mode', 'add an auto-mode rule for X', 'my auto mode rules are too vague', 'rewrite this classifier entry', or an audit shows rules dropped or ignored. Prints only, never writes a settings file.

Triggers from the description

help me write auto mode rulesdraft an autoMode blockset up auto modeadd an auto-mode rule for Xmy auto mode rules are too vaguerewrite this classifier entry

Arguments

/draft-auto-mode-rules [environment|allow|soft_deny|hard_deny]
Original author description

Draft a paste-ready `autoMode` classifier block by interviewing the user about what should and should not be auto-approved, each entry in the shape the classifier reads well and every section keeping `$defaults`. Use when: 'help me write auto mode rules', 'draft an autoMode block', 'set up auto mode', 'add an auto-mode rule for X', 'my auto mode rules are too vague', 'rewrite this classifier entry', or an audit shows rules dropped or ignored. Prints only, never writes a settings file.

How it works

  1. Purpose
  2. Report-only, permanently
  3. Scope boundary (route out)
  4. Boundary, the built-in /auto-mode-setup command
  5. Inputs, and one deliberate omission
  6. Phase 1: Read what already exists
  7. Phase 2: Interview
  8. Phase 3: Compose
  9. Phase 4: Hand it over
  10. Gotchas
Original SKILL.md headings · 161 lines, 1,282 words
SKILL.md preview
---
description: "Draft a paste-ready `autoMode` classifier block by interviewing the user about what should and should not be auto-approved, each entry in the shape the classifier reads well and every section keeping `$defaults`. Use when: 'help me write auto mode rules', 'draft an autoMode block', 'set up auto mode', 'add an auto-mode rule for X', 'my auto mode rules are too vague', 'rewrite this classifier entry', or an audit shows rules dropped or ignored. Prints only, never writes a settings file."
argument-hint: "[environment|allow|soft_deny|hard_deny]"
user-invocable: true
disable-model-invocation: false
metadata:
  workflow-stage: anytime
  summary: Interview and draft a paste-ready autoMode block, never writing settings
---

## Purpose

The `autoMode` block is a natural-language prompt for a classifier, not a rule list the harness
matches, so it fails in ways a config file does not. We write each condition as its own short entry
the classifier can see, never buried in a long paragraph, because a condition deep in prose is the
one a single classifier pass is likeliest to miss.

This skill applies that at authoring time instead of reporting it afterwards, the job
`claude auto-mode critique` does after the fact.

- **Pointer**: when deciding how the classifier reads entries, fetch
  [auto mode config: override the block and allow rules](https://code.claude.com/docs/en/auto-mode-config#override-the-block-and-allow-rules)
  and, for the critique command,
  [auto mode config: inspect the defaults and your effective config](https://code.claude.com/docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config)
  live.
- **As of**: 2026-10-11
- **Recheck trigger**: either section changes how entries are read or what the critique reviews.

## Report-only, permanently

**This skill writes nothing, in any scope, under any flag.** It prints a block; you paste it. Editing
a consumer's settings file would be making a permission decision on their behalf, which is the one
thing this plugin exists not to do.

## Scope boundary (route out)

- What is in effect now, what auto mode drops, what a section discards →
  `harness-config:audit-permission-state`. **Run it first.** Drafting against rules you have not read
  is how a block ends up contradicting itself.
- Grant portability and auto-mode durability → `harness-config:audit-permission-grants`.
- Whether an existing block is any good → `claude auto-mode critique`, surfaced by
  `audit-permission-state --critique`. It owns the semantic judgment; this skill owns composition.

## Boundary, the built-in `/auto-mode-setup` command

Both surfaces help a person write auto mode classifier content, so a request to "set up auto mode"
can mean either.

- **`/auto-mode-setup` (built-in command)**: drafts `autoMode.environment` entries from the
  project and recent sessions, with optional rule tweaks, lets the person review the draft, and
  saves it to user settings. It is reserved for the person to run; the model does not invoke it.
- **This skill (marketplace plugin).** Interviews for entries in every section (`environment`,
  `allow`, `soft_deny`, `hard_deny`), each with stated exclusions and a transcript-visible
  condition, and prints the block without writing anything.

**Routing.** At the start of the run, offer it to the person: you can run `/auto-mode-setup`
instead of or alongside this skill to have the `environment` section drafted from your sessions
and saved for you; this interview then covers the allow and deny sections. If they take it, run
Phase 1 again after it saves so the draft builds on what it wrote. An unattended run records the
offer in its output instead of asking.

**Mutation gate.** `/auto-mode-setup` writes user settings when the person confirms its draft. This
skill writes nothing and never chains into that command on the person's behalf.

**Availability is never assumed.** The command is hidden, gated by plan and version, and varies by
platform; this section states what to offer, never that it is present. The four-part records live
in [reference/native-auto-mode-setup.md](reference/native-auto-mode-setup.md).

## Inputs, and one deliberate omission

The draft is built from **the interview plus the effective merge** (`audit-permission-state`), and
nothing else. An optional argument, `environment`, `allow`, `soft_deny`, or `hard_deny`, names one
section to focus the interview on.

There is no history input: a read of "the repo's observed prompt and denial history" names no actual
location, and an unnamed read surface in a skill shipped to consumers is unreviewable.

## Phase 1: Read what already exists

Before asking anything, run the audit sibling and read its output:

```shell
bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-permission-state/scripts/automode-block-lint.sh"
```

Three things there change what you should ask:

- A section missing `"$defaults"` means built-in rules are **already** discarded. Say so before adding
  to that section.
- A `C2b-contradiction` or `C3-shadowed` finding means the block already disagrees with itself.
  Resolving that comes before adding an entry that would deepen it.
- A `status=skipped` or `status=unavailable` result means you could **not** read the block. Draft
  anyway if asked, but say plainly that you are drafting blind.

## Phase 2: Interview

<!-- fresh-eyes-exempt: external-input -- the material judged here is the consumer's stated intent and their own existing configuration; no step judges output this skill authored -->

Ask about one entry at a time. For each, you need four things, and the fourth is where drafts fail:

1. **Which section.** `allow` (auto-approve), `soft_deny` (block, overridable), `hard_deny` (never),
   `environment` (facts the classifier needs: organization, repositories, trusted domains).
2. **A short label**: the subject, two or three words. It is what a reader scans for.
3. **What is covered, and what is explicitly not.** Both. An entry with no stated exclusions is one
   the classifier will over-apply.
4. **A condition visible in the transcript.** This is the one that matters. The critique's finding was
   that "uncheckable conditions are the biggest weakness". Entries state preconditions the classifier
   cannot evaluate from the command text, so it either allows blindly (the condition is decorative) or
   blocks (the grant is inoperable), with no stated disposition.

   Some answers name something the classifier cannot see: a person's intent, a fact about the
   build server, whether a change was reviewed. **Say so and ask for the observable form instead.**
   "Only when the deploy is approved" is not checkable; "only when the command names the staging
   endpoint" is.

Stop when they say stop. A short correct block beats a long vague one.

## Phase 3: Compose

Feed the answers to the drafter, one record per line:

```text
section allow
label Test Execution
covered running the repository's own test suite via its documented runner
not installing new dependencies as a side effect
why the runner is named in the command text
```

```shell
bash "${CLAUDE_PLUGIN_ROOT}/skills/draft-auto-mode-rules/scripts/draft-automode-block.sh" < answers
```

It prints a JSON object carrying only the sections that got entries. **An unknown section name
is a hard failure**, exiting 2 with nothing on stdout rather than warning beside partial output,
because a caller capturing both streams together would otherwise get unparsable JSON. **Every section opens with
`"$defaults"`.** We keep the token in every section so a customized section never loses the shipped
rules (Pointer: when deciding what a section without the token keeps, fetch
[auto mode config: define trusted infrastructure](https://code.claude.com/docs/en/auto-mode-config#define-trusted-infrastructure)
and
[auto mode config: override the block and allow rules](https://code.claude.com/docs/en/auto-mode-config#override-the-block-and-allow-rules)
live. As of: 2026-10-11. Recheck trigger: that section changes what customizing a section does to
the built-in list, or retires `$defaults`).

## Phase 4: Hand it over

Print the block. Say exactly where it goes: the `autoMode` key of
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json`. Then stop.

Two things to say while handing it over, because both are load-bearing:

- **Project and local settings will not work.** The classifier reads `autoMode` from user settings,
  managed settings, and inline `--settings`/SDK JSON only. A block pasted into `.claude/settings.json`
  is silently inert.
- **Merging into an existing block is theirs to do.** If they already have an `autoMode` section, the
  drafted sections replace what they paste over. Point them at the audit sibling to confirm the result
  rather than assuming it merged.

## Gotchas

- **Do not offer to write the file.** Not with `--fix`, not "shall I apply this", not as a follow-up.
  The no-write posture is the skill's contract, not a default someone can opt out of.
- **A drafted block is not a reviewed block.** After they paste it, `claude auto-mode critique` is what
  judges it. Say that rather than implying the draft is validated.
- **`claude auto-mode reset` is never run.** It strips the `autoMode` section from user settings, and
  on a chezmoi-managed home that loss is not recoverable from the settings file alone.
- **Prose provenance does not belong in an entry.** Dates, issue numbers, and prior-draft archaeology
  cost classifier attention and buy nothing; the critique names stripping them explicitly. Version
  control owns that history.
Files in this package (5)
  • SKILL.md 9 KB
  • evals/evals.json 3 KB
  • reference/native-auto-mode-setup.md 2 KB
  • scripts/draft-automode-block.sh 7 KB
  • scripts/draft-automode-block.test.sh 11 KB

Versions

The database has no other skills named draft-auto-mode-rules.

Database snapshot: 13.11.2026 · package version 68a09b7256de (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100eks-automode-onboard
    Onboarding guide for EKS Auto Mode newcomers. Use when the user asks about EKS Auto Mode concepts, wants to deploy their first Auto Mode cluster, needs help picking an example, or hits common first-day issues. Triggers: what is Auto Mode, how do I deploy, which example, getting…
  • 84audit-permission-state
    When the bundled fewer-permission-prompts skill resolves in this session, prefer it to reduce prompts via an allowlist; this skill to see the state in effect. Report-only: merges every settings scope into the allow/ask/deny set in effect with source and precedence per rule, and…
  • 100growth
    The weekly growth routine for AutoMode: take a metrics snapshot, check every submission in marketing/registry.json, find new lists and directories, and draft the week's posts in one PR. Use it when asked to promote AutoMode, draft social posts, submit to awesome lists or mod…
  • 100eks-automode-maintain
    Repo maintenance for sample-aws-eks-auto-mode. Keeps docs, templates, rendered YAML, and tagging layers in sync. Use when updating nodepool templates, terraform config, examples, tagging, cleanup scripts, or docs. Triggers: maintain, docs sync, tagging update, template change,…
  • 90auto-build-mode
    当用户询问"如何平衡自动化与安全性"、"能否一次性实现所有任务"或"如何提高开发效率"时调用此 skill。不适用于:需要频繁人工干预的场景、高风险项目、需求不明确的场景。关键 trigger 信号:auto-build、自动化、一次性实现、效率提升、自主运行。
  • 100update-stop-gate
    Use when the user describes a bad Claude behavior pattern to add as a stop-gate rule. Handles updating both autonomy-rules.md and the classifier prompt in stop-gate.py. Trigger phrases: update stop gate, add stop gate rule, new autonomy rule, add stall class, update autonomy…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.