skills/deprecated/agent-exploration/SKILL.md
Dispatches scoped-write explorer agents in parallel — native harness subagents by default, official harness CLIs (claude, codex, cursor-agent) only when the operator requests an external harness or model — for multi-area research that must produce written artifacts — one seven-section analysis file per slice plus a parent-authored summary. Use when a research question spans several distinct areas and chat output is not enough. Do not use for single-file lookups (use Explore) or edits to existing code.
npx skillsauth add pedronauck/skills agent-explorationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generic parallel-research workflow. Use when a question requires deep reads across multiple distinct areas and the operator needs written artifacts (not chat output). The skill dispatches scoped-write explorer agents in parallel; each invocation writes one analysis file. The parent then synthesizes a final summary.
Native subagents are the default dispatch route. Each slice runs as a subagent of the current harness (in Claude Code: one Agent tool call per slice), inheriting the session's model and reasoning effort unless the operator pins a model. External CLIs are the exception, not the norm: only when the operator requests a harness or a model the native subagent cannot serve does a slice run through an official harness CLI — claude (Claude models), codex (gpt-*), cursor-agent (Grok). There is no agent registry and nothing to install: the explorer's role, contract, and schema travel inside each slice prompt, identical on both routes.
Match your step to the row. Read the listed files in full before producing output. They are not appendices — they are load-bearing. Inline content in this SKILL.md is a pointer, not a substitute.
| Step | MUST read |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Step 4 — composing every slice prompt | references/dispatch-rules.md + assets/explorer-prompt.md + assets/analysis-template.md |
| Step 5 — verifying outputs | references/checklist.md + assets/analysis-template.md |
| Step 6 — synthesizing summary.md | every <path>/analysis/NN_analysis_<slug>.md from this round |
| Any contract violation, fabricated evidence, or retry | references/dispatch-rules.md (re-read; do not paraphrase from memory) |
references/dispatch-rules.md — the scoped-write contract: what the dispatched agent may write, may read, may run; tool allow/forbid lists; parent responsibilities per dispatch route; parallelism cap; failure handling. Must be embedded verbatim in every slice prompt.references/checklist.md — seven-section output validation checklist (runtime, inputs, scout, dispatch, files, schema, summary). Run before authoring summary.md.assets/analysis-template.md — the canonical seven-section schema every dispatched agent fills (Overview, Mechanisms/Patterns, Relevant Sources, Transferable Patterns, Risks/Mismatches, Open Questions, Evidence) plus a Scope header.assets/explorer-prompt.md — the explorer role prompt (the scoped-write contract and workflow from the dispatched agent's perspective). Embedded verbatim at the top of every slice prompt — native subagent or CLI, same text.scripts/dispatch-slices.sh — CLI-route parallel dispatch runner. Takes --cli/--model/--reasoning plus 1-8 prompt files, backgrounds one headless CLI process per file, waits via wait $pid, captures per-slice stdout/stderr/exit, and reports a summary. Zero external dependencies (native bash + the chosen CLI binary). Not used on the native route.Resolve every bundled helper relative to the directory that holds this SKILL.md. When a command appears below as scripts/<name>, treat the actual invocation as <agent-exploration-dir>/scripts/<name> — expand <agent-exploration-dir> to the absolute skill directory before running.
--path <dir> (required): Output directory. Analysis files are written under <path>/analysis/. Any project-relative or absolute directory works (for example docs/research/<topic>/, tasks/<slug>/, or a path outside the repo). The skill is not tied to any specific project layout.--agents <num> (optional, default 3, hard cap 8): Number of explorer invocations to dispatch in parallel.--prompt <text> (required): The research question. Quoted multi-line strings are supported. If omitted, the parent asks the operator before continuing.--model <name> (optional; default: inherit the parent session's model on the native route): The model to run each slice on — and the routing signal. See Dispatch Routing for how a model name selects native subagents vs. an external CLI.--harness <claude|codex|cursor-agent> (optional): Force the external-CLI route on that binary regardless of model. Omit for native subagents.--reasoning <effort> (optional): low, medium, high, xhigh. Native route: not forwardable — subagents inherit the session's effort; the flag applies to CLI dispatches (claude --effort, codex -c model_reasoning_effort=…; cursor-agent ignores it — effort is baked into the Grok model id). Default xhigh on CLI routes.If --path or --prompt is missing, the parent asks the operator a single clarification before continuing. Never invent defaults for either. Apply the documented defaults for --model, --harness, --reasoning silently when omitted; reject an invalid --harness rather than falling back.
Native unless the operator explicitly requests otherwise. A model or harness request routes to the one runtime that can serve it — never silently substitute a different harness or model than requested.
| Request | Route |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| No --model / --harness (default) | Native subagents; each slice inherits the session's model and effort. |
| --model sonnet\|opus\|haiku\|fable and the parent harness exposes it natively (Claude Code does) | Native subagents with a per-call model override. |
| --model names a Claude model the parent harness cannot serve natively | claude CLI. |
| --model gpt-* | codex CLI. |
| --model names a Grok variant (grok, cursor-grok-*) | cursor-agent CLI. |
| --harness <cli> | That CLI, regardless of model. |
CLI model notes:
fable, opus, sonnet) or full names (claude-fable-5); effort via --effort low|medium|high|xhigh|max.-m to use the operator's ~/.codex/config.toml default; effort via -c model_reasoning_effort=low|medium|high|xhigh.cursor-agent models. Grok ids embed effort and fast mode: cursor-grok-4.5-{low,medium,high}[-fast]. Default Grok profile: cursor-grok-4.5-high-fast (breadth research, cost-sensitive runs, high slice counts).<path>/analysis/
├── 01_analysis_<slug-a>.md
├── 02_analysis_<slug-b>.md
├── 03_analysis_<slug-c>.md
└── summary.md
01, 02, …, 08).summary.md is parent-authored synthesis, not a dispatched output.Step 1: Resolve the dispatch route
--model/--harness inputs and announce the resolved route in one line (e.g. route: native (session model) or route: codex CLI (gpt-5.3-codex, xhigh)).claude binary and tell the operator.PATH (command -v claude|codex|cursor-agent). If missing, abort with a one-line message telling the operator to install that harness's official CLI. Never silently reroute an explicitly requested harness or model to a different one.Step 2: Resolve inputs
--path, --agents, --prompt, --model, --harness, --reasoning from the invocation. If --path or --prompt is missing, ask the operator and stop.--agents to 3 when omitted. Reject values below 1 or above 8 — ask the operator to choose a value in range.--harness against the accepted list (claude, codex, cursor-agent) and --reasoning against low, medium, high, xhigh; reject invalid values with a clear message instead of silent fallback. Do not validate --model ahead of time — let the harness or CLI surface incompatibilities; when one does, re-dispatch that slice with a compatible model.--path to an absolute path. If the directory does not exist, ask the operator whether to create it before continuing; if creation fails, stop and report the filesystem error.<path>/analysis/ if absent. The dispatched agents refuse to write into a missing directory.Step 3: Parent-led initial scout (MANDATORY — do not skip)
The scout is the load-bearing step that prevents wasted parallel dispatch. The parent must do this work itself before any slice is launched.
Glob, Grep, and targeted Read calls. The scout's job is to learn enough about the territory to divide it well — not to produce analysis content. Cap the scout at 8–15 tool calls; deep reading belongs to the dispatched agents.--agents distinct slices that are:
--prompt — every slice serves the original research question.01..08).state-machine, event-bus, auth-boundaries).NN – slug – focus) before dispatching. Do not ask for approval unless the slices look thin or overlap; just announce and proceed.If the scout reveals that fewer than --agents non-overlapping slices exist, reduce the dispatch count and tell the operator. Do not pad slices to hit the requested count.
Step 4: Dispatch explorer agents in parallel
Gist tripwires — the contract items the parent must enforce in every dispatched prompt:
git/make/package managers, no writes outside <path>/analysis/.STOP. Read references/dispatch-rules.md in full before composing any slice prompt. That file contains the complete scoped-write contract, tool allow/forbid lists, parent responsibilities per route, and failure handling. The bullets above are tripwires, not the contract — the contract must be embedded verbatim in every slice prompt.
STOP. Read assets/explorer-prompt.md in full before composing any slice prompt. That file is the explorer's role prompt — it must open every slice prompt verbatim so the dispatched agent knows its contract regardless of route.
STOP. Read assets/analysis-template.md in full before composing any slice prompt. That file is the canonical seven-section schema every dispatched agent fills. The schema must be embedded in the prompt; do not paraphrase it.
Compose one slice prompt per slice. Every prompt MUST include, in this order:
assets/explorer-prompt.md content embedded verbatim (the explorer's role and contract).--prompt verbatim, prefixed by a short orientation line.<path>/analysis/NN_analysis_<slug>.md (absolute path).references/dispatch-rules.md content embedded verbatim (copy-paste, do not paraphrase).assets/analysis-template.md.Write each composed prompt to its own file at <path>/.dispatch/prompts/NN_<slug>.txt. The CLI route consumes these files directly; on the native route they keep the round auditable and re-dispatchable. The file basename (without extension) is the slice id used for per-slice log naming.
Native route (default). Issue one subagent call per slice — all in a single parallel batch, using whatever async/background facility your harness exposes. In Claude Code: one Agent tool call per slice with the general-purpose agent type (the explorer needs Read/Grep/Glob plus one Write), prompt = the slice prompt file content verbatim, and a model override only when the operator pinned one. Wait for every subagent to complete before Step 5. A subagent that errors, or returns without its written-path confirmation, is a failed slice — re-dispatch it.
CLI route (exception): scripts/dispatch-slices.sh. The bundled script backgrounds one headless CLI process per prompt file, waits for every PID, captures per-slice stdout/stderr/exit under <logs-dir>, and exits non-zero if any slice failed.
<agent-exploration-dir>/scripts/dispatch-slices.sh \
--cli <claude|codex|cursor-agent> --model <model> --reasoning <reasoning> \
--add-dir <path> \
--logs <path>/.dispatch/logs \
-- <path>/.dispatch/prompts/01_<slug-a>.txt \
<path>/.dispatch/prompts/02_<slug-b>.txt \
<path>/.dispatch/prompts/03_<slug-c>.txt
dispatched: <slug> pid=<N> per launch and exited: <slug> rc=<N> per completion, ending with a summary: total=Xs ok=N/M failed=K/M line.references/dispatch-rules.md.Manual alternative (if you cannot run a bash script): invoke each slice with the exact command shape for the resolved CLI. Use whatever async/background facility your harness exposes; wait for every invocation to exit before continuing.
# claude — Claude models (aliases fable|opus|sonnet, or full names)
claude -p --model <model> --effort <reasoning> \
--permission-mode dontAsk \
--allowedTools "Read Glob Grep WebFetch WebSearch Write Bash(rg *) Bash(ls *) Bash(cat *) Bash(head *) Bash(wc *) Bash(file *) Bash(find *)" \
--add-dir <path> < <prompt-file>
# codex — gpt-* models (omit -m to use the ~/.codex/config.toml default)
codex exec -m <model> -c model_reasoning_effort=<reasoning> \
-s workspace-write -c sandbox_workspace_write.network_access=true \
--skip-git-repo-check --add-dir <path> \
-o <path>/.dispatch/logs/<slug>.last.md - < <prompt-file>
# cursor-agent — Grok (effort/fast baked into the model id)
cursor-agent -p --output-format text --force \
--model cursor-grok-4.5-high-fast \
--add-dir <path> "$(cat <prompt-file>)" < /dev/null
Notes that apply to both paths:
--add-dir <path> (supported by all three CLIs) is required whenever <path> lies outside the working tree the CLI is launched in; harmless otherwise.claude allowlist mirrors the contract's read-only helpers plus one Write; --permission-mode dontAsk auto-denies everything else — harness-level enforcement of the scoped-write contract.codex workspace-write disables network by default; the sandbox_workspace_write.network_access=true override keeps web-scoped slices working. Drop it for purely local slices if you want the tighter sandbox.Step 5: Verify outputs
Gist tripwires — the floor items that catch most failures:
N files at the expected NN_analysis_<slug>.md paths under <path>/analysis/.Read for local paths, well-formedness for URLs).STOP. Read references/checklist.md in full before declaring outputs verified. That file is the seven-section output validation checklist (runtime, inputs, scout, dispatch, files, schema, summary). Every item must pass; failing items trigger a re-dispatch of the offending slice. The bullets above are tripwires, not the contract.
If a section is empty, a file is missing, a cited path is fake, or the schema is incomplete, re-dispatch the offending slice on the same route with the schema embedded and a request to fill the gap. The parent never authors the missing analysis content — the dispatched agent owns the write.
Step 6: Synthesize summary.md
<path>/analysis/NN_analysis_<slug>.md in full.<path>/analysis/summary.md with these sections:
--prompt, verbatim.NN – slug to its slice question and one-line finding.<path>/analysis/NN_analysis_<slug>.md paths so a future reader can drill in.summary.md is parent-authored. Do not dispatch a slice for this step.Explore or direct Grep/Read. This skill is overkill.Input, routing, and scout failures are handled inline where they occur — each item in Steps 1–3 names its own recovery. Contract violations, fabricated evidence, schema-incomplete analyses, and retries route through the Required Reading Router: STOP, re-read references/dispatch-rules.md in full, then re-dispatch the offending slice — the dispatched agent owns the write. Two round-level rules live only here:
PATH: abort the round with a one-line install message. Never silently reroute to a different harness or model than the operator requested.testing
Assess DDD fit; discover domains with EventStorming, define language and bounded contexts, and design aggregates, value objects, events, and repositories. Excludes architecture-only audits, product specs, and CQRS/Event Sourcing catalogs.
development
Build terminal UIs with ratatui following 2026 Rust best practices. Use when: (1) Creating new TUI apps, (2) Adding widgets/layouts, (3) Keyboard navigation/state management, (4) Image integration via ratatui-image, (5) Async event handling, (6) Release optimization. Covers v0.30.0+ API, Elm Architecture, StatefulWidget, color-eyre.
development
Find 10x product opportunities and high-leverage improvements. Use when user wants strategic product thinking, mentions '10x', wants to find high-impact features, or says 'what would make this 10x better', 'product strategy', or 'what should we build next'.
development
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.