/discovery:setup [check|apply] [<key>=<value> ...]from discovery
Checks discovery prerequisites, prints gate allow rules, and applies docs/conventions/discovery.yaml after confirmation. Supports check (read-only) and apply (write) actions.
Ships in discovery. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Report whether this session can run the discovery plugin's dispatch design, and print the permission
rules that stop the acceptance-gate scripts prompting on every run. Artifact placement needs no
configuration: the plugin's artifact protocol
(${CLAUDE_PLUGIN_ROOT}/reference/artifact-protocol.md)
fixes where EXPLORE.md, RESEARCH.md and INTENT.md land, in the memory slice
<memory_dir>/<slug>/, never committed.
The plugin owns one tracked consumer file, docs/conventions/discovery.yaml, the repository layer
of its settings (keys, values and layers:
${CLAUDE_PLUGIN_ROOT}/reference/config.md; schema:
${CLAUDE_PLUGIN_ROOT}/schemas/discovery.schema.json). check reports it; apply writes it,
plus, on the operator's yes to the convention-home offer, the instruction-file region and the
.gitignore line (apply step 4). The harness rows and the operator's ~/.claude/settings.json are reported only, never
written. Action routing: no argument or check runs the check; apply runs the check, then
writes. Re-running either reads the current state again.
check (read-only)Report a PASS/INFO/WARN table. Do not write anything. No row is ever a FAIL or a blocker.
Dispatch capability. /discovery:explore and /discovery:research dispatch a subagent by
default, and that posture degrades rather than breaks on a session that cannot support all of it.
Report these as PASS/INFO rows:
claude --version). Below it, several behaviors
the dispatch design relies on are false rather than merely absent: background became the default
subagent execution mode in 2.1.198, and below 2.1.218 a context: fork skill always
blocked the invoking turn and the narrow background tool set did not apply to it. As of
2026-07-25; recheck when the section below changes when background became the default or how a
fork skill runs. For current behavior, see
subagents: run subagents in foreground or background;
the record for background as the default is
${CLAUDE_PLUGIN_ROOT}/reference/parent-contract.md,
"Harness facts the dispatch design rests on". Report the
observed version and, when it is under the floor, name which of those the session does not have.
The skills still run, inline is always available, so this is INFO, not FAIL.CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH. Report the value, present or absent, and say what
the running harness does with it rather than assuming. Read absent against the observed
version, in four windows: below 2.1.172 nesting does not exist and the variable buys
nothing; 2.1.172 to 2.1.216 absent means available at a fixed five; 2.1.217 to
2.1.218 absent means off, and setting the variable is the only way to turn nesting on;
2.1.219 and later absent means available at a configurable default of three, and the
variable lowers the ceiling ("1" disables nesting) as readily as it raises one. For the
current default and the variable's version history, see
Let subagents spawn their own subagents
and the variable's row in env vars. As of
2026-10-02; recheck when the default or the version history changes.
Report absent as INFO in every window: nesting buys
throughput, not coverage, without it a dispatched agent fans out sequentially, slower for
the same result. The variable is still only one of two conditions: it cannot add a tool an
agent definition left out. The shipped discovery:explorer / discovery:researcher definitions
list Agent for exactly this reason; a third-party agent that does not is unaffected by setting
it. It is not a correctness prerequisite here, because the one control that needs a context
which has not seen the work is the outcome-gate verifier, and the parent dispatches that as a
sibling rather than the agent as a child. Note that a shell env var is read at session start,
so a value exported now takes effect next session. Whether a settings-file env value reaches
a running session is
env vars: set variables in settings files's
to state.CLAUDE_CODE_FORK_SUBAGENT
when set; when unset, read the default for the observed version and session kind (interactive,
claude -p, the SDK) from the pointer below and report that, never one remembered here. A
default is not a runtime guarantee, so the only authoritative probe is still a live
inheritance check (see discipline:sweep-all's preflight); never claim forks are
unconditionally available on every build. Name the command that starts a fork by hand as the
pointer's fork section gives it.
Gate allow rules. The acceptance-gate scripts prompt on every run unless the operator's
~/.claude/settings.json allows them. Read its permissions.allow (a missing file or key reads
as no rules; read only, never write) and compare it with these twelve rules for this install root:
Bash("${CLAUDE_PLUGIN_ROOT}/scripts/check-dispatch-artifact.sh" *)
Bash("${CLAUDE_PLUGIN_ROOT}/scripts/check-coverage-complete.sh" *)
Bash("${CLAUDE_PLUGIN_ROOT}/scripts/check-source-applicability.py" *)
Bash("${CLAUDE_PLUGIN_ROOT}/scripts/check-restatement-labels.py" *)
Bash("${CLAUDE_PLUGIN_ROOT}/scripts/check-author-kind.py" *)
Bash(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/check-claim-eligibility.py" *)
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/check-dispatch-artifact.sh *)
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/check-coverage-complete.sh *)
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/check-source-applicability.py *)
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/check-restatement-labels.py *)
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/check-author-kind.py *)
Bash(python3 ${CLAUDE_PLUGIN_ROOT}/scripts/check-claim-eligibility.py *)
Report one row, never FAIL: PASS when all twelve are present for this install root; INFO "stale"
when gate rules name a different …/scripts/check-* root (an earlier version's cache directory,
which stops matching after an update), naming that root; INFO "absent" otherwise. On stale or
absent, print the twelve rules resolved to this install root and ready to paste, each as a JSON
string for permissions.allow (the quoted forms escape their inner "). Applying them is the
operator's job: this skill never writes user settings. The rules pin this version's cache
directory on purpose, so a plugin update invalidates them and check reports them "stale" again;
why a version wildcard is unsafe is in
${CLAUDE_PLUGIN_ROOT}/reference/parent-contract.md
("Operator setup").
Repository settings. Run
"${CLAUDE_SKILL_DIR}/scripts/setup-apply.mjs" --check from the project root and report each
line it prints with its own INFO, PASS or WARN prefix. INFO when
docs/conventions/discovery.yaml is absent (every key comes from userConfig or its default);
PASS with each key's value when the file validates; WARN when it does not (a value outside the
key's list, a key set twice, an empty value or empty string, or a map or list where one string
belongs), quoting the file, key and value. An invalid value never stops a discovery skill: the
skill names it and drops that layer, so the row is a WARN. apply fixes a value outside the list
or an empty value; the other shapes are fixed by hand, and apply refuses the file until then.
apply (writes docs/conventions/discovery.yaml, and the step 4 region and ignore line on a yes)Run check and show its table.
Resolve the values. With complete <key>=<value> arguments, use them. Otherwise ask one key
at a time, recommendation first, from the Keys table in ${CLAUDE_PLUGIN_ROOT}/reference/config.md
(explore_output: auto, the default, unless the team wants every run pinned to change-prep
or explain). Never invent a key the schema does not list.
Write. One call with every value:
"${CLAUDE_SKILL_DIR}/scripts/setup-apply.mjs" explore_output=explain
Pass --default <key> as ${CLAUDE_PLUGIN_ROOT}/reference/setup-apply.md "Defaults" says.
The script checks each value against the schema and validates the whole resulting document
before it writes; an invalid value or key, or an existing file with a key set twice, an empty
string, a map or a list, exits 1 with one line and writes nothing. It writes the file only at
<git toplevel>/docs/conventions/discovery.yaml. It resolves a symlinked root first, then
refuses a root that is $HOME or an ancestor of it, a symlinked docs, docs/conventions or
target, a hard-linked target, or a docs/conventions that resolves outside the repository,
checked again right before the
write, so the file never lands outside docs/conventions/. A missing file is created. A value already in place prints
already configured and writes nothing.
Diff, convention-home offer and verify. Follow ${CLAUDE_PLUGIN_ROOT}/reference/setup-apply.md from "A file that would
change" through "Verify", with <file> = docs/conventions/discovery.yaml and <apply-script> =
"${CLAUDE_SKILL_DIR}/scripts/setup-apply.mjs".
check: the table and, when the gate allow rules are stale or absent, the twelve resolved rules as
JSON strings ready to paste. apply: the table before and after, the diff when one was shown, the
written path, and whether the file is tracked.
/discovery:explore
env applies now is
env vars: set variables in settings files's
to state.check prints; check
reports them "stale".apply leaves it uncommitted on
purpose, and the tracked-file pair says so./discovery:explore, /discovery:research, /discovery:trace-intent).${CLAUDE_PLUGIN_DATA}, for caches and generated state only) stay untouched.pluginConfigs. check reads ~/.claude/settings.json and
prints the gate allow rules; the operator applies them.docs/conventions/discovery.yaml, except the apply step 4 region and
ignore line on the operator's explicit yes.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub melodic-software/claude-code-plugins --plugin discovery7 skills in this plugin
/blindspotSurface the user's unknown-unknowns before unfamiliar work in a new area or domain and coach a sharper prompt (read-only; writes no EXPLORE.md). Use when: 'what am I missing', 'find my blindspots', 'sharpen this prompt'. Not for codebase handoffs: /discovery:explore. Not for external research: /discovery:research./exploreExplore local codebase, trace dependencies, and check tests before a code change; persists EXPLORE.md via fresh-context subagent (change-prep/explain, read-only). Use when: 'what exists for X', 'how does this work', 'what tests cover this'. Not for bare locates (Explore agent), rationale: /discovery:trace-intent, or non-repo: /discovery:research./read-docsRead docsRead an upstream vendor docs page via shared lookup/cache, marking silences and separating inference (raw-byte verify; when claude-code-docs resolves in this session, prefer it for Claude Code Q&A). Use when: 'read the docs page for X', 'what does the official page say', or WebFetch truncated a page. Not for multi-source: /discovery:research./reportReturn contractThe return contract every agent a plugin skill dispatches reports in: problems first, one fenced block, every claim graded off disk by the parent, preloaded into the agent definition and dispatched only./researchMulti-source external research (or non-repo dirs, machine state): source tiers, recency, coverage ledger; breadth=low narrows, deep or multi-topic asks take the deep tier. Use when: 'research this', 'compare X vs Y', 'verify a claim', 'deep research', 'research these N topics'. Not for one page: /discovery:read-docs; local code: /discovery:explore./trace-intentTrace intentReconstruct why a decision was built this way from evidence outside code (design rationale, archaeology), reporting unknowns; persists INTENT.md. Use when: 'why did we pick X over Y', 'what were they thinking', 'what problem was this solving'. Not for code: /discovery:explore, facts: /discovery:research, or rules: /discipline:reason-dont-recite.Other plugins' skills for the same job