/harness-config:draft-auto-mode-rules [environment|allow|soft_deny|hard_deny] [--unattended]from harness-config
Interviews users to draft a paste-ready autoMode classifier block with well-shaped entries for allow/soft_deny/hard_deny sections. Prints only, never writes settings.
Ships in harness-config. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
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.
harness-config:audit-permission-state. Run it first. Drafting against rules you have not read
is how a block ends up contradicting itself.harness-config:audit-permission-grants.claude auto-mode critique, surfaced by
audit-permission-state --critique. It owns the semantic judgment; this skill owns composition./auto-mode-setup commandBoth 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): the person runs it; this skill never invokes it. What
it drafts, reads and saves is read from
auto mode config: generate environment entries
live.environment,
allow, soft_deny, hard_deny), each with stated exclusions and a transcript-visible
condition, and prints the block without writing anything.Native suggestions are on unless native_suggestions resolves off: the native_suggestions key of <home>/harness-config.local.yaml wins over the same key of <home>/harness-config.yaml (<home> is what bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-convention-home.sh" prints, else docs/conventions), which wins over the per-user value ${user_config.native_suggestions} (a literal unexpanded token means unset); with none set they are on. A value other than on or off is named and that layer dropped: a valid higher layer still wins, otherwise on, never a lower layer's value. When off, skip the offer below and write nothing in its place, not even a note that it was skipped or why.
Routing. At the start of the run, offer it to the person:
If /auto-mode-setup is available in your session (gate basis: its row of the commands reference;
records in reference/native-auto-mode-setup.md) and native
suggestions are on (native_suggestions, Configuration), you can
run it 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. It can also offer allow
rules drawn from your recent auto mode denials (version in the records). Those rules are input to
the allow section here: paste the ones you accepted, or the allow list claude auto-mode config
prints, and the interview asks for each one's exclusions and transcript-visible condition instead of
drafting it from recall. If they take it, run Phase 1 again after it saves so the draft builds on
what it wrote. When the caller passes
--unattended, omit the offer, write Withheld suggestion (unattended): /auto-mode-setup in the
output, and do not ask; without that flag it asks.
Mutation gate. We treat /auto-mode-setup as writing user settings once the person accepts its
draft. This skill writes nothing and never chains into /auto-mode-setup on the person's behalf.
Availability is never assumed. Offer the command when it resolves in this session, never assume it is present. Read what gates it from its row of commands: all commands live. The four-part records live in reference/native-auto-mode-setup.md.
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. --unattended, anywhere in the arguments, is not a section: it is the caller
declaring that nobody is present, which governs the /auto-mode-setup offer under "Routing". Take
it out first, then read the rest.
This skill reads no history itself: 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.
Denial history reaches the draft only through the allow rules /auto-mode-setup saved, which the
person brings to the interview (see "Routing").
Before asking anything, run the audit sibling and read its output:
bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-permission-state/scripts/automode-block-lint.sh"
Three things there change what you should ask:
"$defaults" drops the built-in rules by the docs' account (pointer in Phase 3),
though for soft_deny the behavior probes observed them kept, git and non-git rules alike
(/harness-ops:behavior-probes (if enabled) record 6). Say both, and add the token before adding to that
section: it is correct under either behavior.C2b-contradiction or C3-shadowed finding means the block already disagrees with itself.
Resolving that comes before adding an entry that would deepen it.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.Ask about one entry at a time. For each, you need four things, and the fourth is where drafts fail:
Which section. allow (auto-approve), soft_deny (block, overridable), hard_deny (never),
environment (facts the classifier needs: organization, repositories, trusted domains).
A hard_deny entry is a classifier judgment. When the answer is an action that must never
happen (it cannot be undone, exposes a secret, or sends data outside), say that a classifier
judgment alone is not enough for it, and keep the hard_deny entry as a second layer. Hand
/corrections:codify (if enabled) the choice of mechanism; it picks
the strongest rung of the enforcement ladder that can decide the rule and proves the check.
Name the call, /corrections:codify "<the rule>" (if enabled), for the user to run; never make it.
When the corrections plugin is not enabled, propose the strongest mechanism that can decide the
rule: a change that makes the mistake impossible first, then a check that blocks it, then a test,
and an instruction only when nothing a machine runs can decide it. Say that the corrections
plugin was not available, so the proposal is unproven. Before recommending a deny rule for a Bash action, read
what it matches in permission rule syntax.
A short label: the subject, two or three words. It is what a reader scans for.
What is covered, and what is explicitly not. Both. An entry with no stated exclusions is one the classifier will over-apply.
A condition visible in the transcript. An entry whose precondition the classifier cannot evaluate from the command text 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.
Feed the answers to the drafter, one record per line:
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
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
and
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).
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:
.claude/settings.json is
silently inert: send it to user settings, or to managed settings for a team-wide block. Pointer: for
the scopes the classifier reads, fetch
auto mode config: where the classifier reads configuration
live.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.--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.claude auto-mode critique is what
judges it. Say that rather than implying the draft is validated.claude auto-mode reset is never run. On a chezmoi-managed home what it removes is not
recoverable from the settings file alone. Read what it removes from
CLI reference: CLI commands live.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub melodic-software/claude-code-plugins --plugin harness-config10 skills in this plugin
/auditIf update-config resolves in this session, prefer it to change settings; this skill audits settings.json, settings.local.json, .mcp.json, hooks, plugins, permissions, env vars (correctness, security, drift vs official docs; --fix confirms auto-fix). Use when: 'audit settings', 'check config', 'check for config drift', after Claude Code update./audit-automation-gapsAudit automation gapsAudit a repo's Claude Code automation (hooks, MCP servers, skills, subagents, scheduled tasks) vs enforcement hierarchy with PASS/REJECT/CONDITIONAL verdicts (REJECT default); --implement applies, or filter hooks|mcp|skills|subagents|scheduled. Use when: 'audit automations', 'what automations should we add', 'should I add an MCP server for X'./audit-instructionsAudit instructionsIf claude-api resolves in this session, prefer it for app prompts; this skill audits Claude Code instructions (CLAUDE.md, AGENTS.md, rules, skills, agents, hooks) report-only for stale/conflicting text. Use when: 'audit instructions', 'too prescriptive', 'which instruction wins'. Not for missing text: /harness-config:audit-prompting-postures./audit-passAudit passRun one coordinated, resumable audit pass over a repo: three-scope inventory, each owning plugin's checks lane by lane, findings persisted per lane with one human gate (read-only unless --fix) for one reconciled findings report/release artifact. Use when: 'audit pass', 'audit this repo end to end', 'resume the audit', or sweep all three scopes./audit-permission-grantsAudit permission grantsReport-only permission grant audit: allowed-tools frontmatter, permissions.allow, portable auto-mode durability (dropped interpreter wildcards, machine paths, substitution tokens, inert plugin grants, guarded helper denied despite allow rule). Use when: 'why was my allowed-tools grant ignored', 'audit allow rules', 'is this permission portable'./audit-permission-stateAudit permission stateIf fewer-permission-prompts resolves in this session, prefer it for prompts; this skill merges every settings scope read-only into allow/ask/deny set in effect (source/precedence per rule), flagging auto-mode drops. Use when: 'what permissions are actually in effect', 'which of my rules survive auto mode', 'is my managed policy being read'.Other plugins' skills for the same job