From harness-explore
Front-loaded codebase mapping. Parallel subagent fan-out (one per top-level dir), git-SHA-keyed cache at `.explore-cache/<sha>.json`, dependency graph for TS/Py/Rust/Go, and O(1) `/explore where <symbol>` + `/explore deps <file>` queries against the cache. Run `/explore` once per HEAD; subsequent queries hit the cache.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-explore:exploreThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Builds and caches a structural map of the current repository, then
lib/_render-shim.mjslib/cache-store.mjslib/dependency-extractor.mjslib/dir-subagent-prompt.mjslib/query-engine.mjslib/tree-walker.mjsphases/0-preflight.mdphases/1-fanout.mdphases/2-aggregate.mdphases/3-deps.mdphases/4-render.mdreferences/design-notes.mdtemplates/dir-summary-prompt.md.hbstemplates/explore.config.json.hbstemplates/map.md.hbstemplates/query-prompt.md.hbsBuilds and caches a structural map of the current repository, then
answers where / deps queries against the cache rather than
re-grepping the filesystem on every turn.
/explore # full scan (phases 0–4); cache-aware
/explore --force # invalidate this HEAD's cache and re-scan
/explore --yes # skip the large-repo confirmation prompt
/explore where <symbol> # cache lookup: which files define/export <symbol>
/explore deps <file> # cache lookup: what <file> imports + what imports it
--force — delete .explore-cache/<sha>.json for the current SHA and re-scan.--yes — skip the >25K-files interactive confirmation in Phase 0.--no-deps — skip Phase 3 (dep graph extraction).--concurrency=<N> — override .explore.json concurrency for fan-out.The skill runs 5 phases strictly in order. Each phase has its own file
under phases/; read it on demand.
| Phase | File | Purpose | Skippable on cache hit? |
|---|---|---|---|
| 0 | phases/0-preflight.md | git rev-parse + size check + cache lookup | No |
| 1 | phases/1-fanout.md | parallel dispatch — one subagent per top-level dir | Yes |
| 2 | phases/2-aggregate.md | merge per-dir JSON results into master map | Yes |
| 3 | phases/3-deps.md | regex import scan for TS/Py/Rust/Go → dep graph | Yes |
| 4 | phases/4-render.md | write cache + docs/explore/<sha>-map.md | Always |
On a cache hit in Phase 0, the orchestrator short-circuits to Phase 4 (which then becomes a no-op render — the artefact already exists — but still prints the one-line summary).
.explore-state.json at project root. Shape:
{ "phases": [{phase, completedAt}], "sha": "...", "sizeCategory": "...", "perDir": {...}, "map": {...} }.Skill with
superpowers:dispatching-parallel-agents before fan-out. One
subagent per top-level directory; each returns the structured JSON
summary defined in templates/dir-summary-prompt.md.hbs.lib/dir-subagent-prompt.mjs#render(dir, root, options). The
subagent's reply MUST conform to the JSON schema described in the
prompt; the orchestrator validates and marks malformed replies as
incomplete.git rev-parse HEAD. Detached HEAD or no commits
→ use WIP-<timestamp> and warn that cache will not persist across
HEAD moves.context-mode for non-trivial shell. Use
mcp__plugin_context-mode_context-mode__ctx_batch_execute for git
queries, wc -l, etc./explore where <symbol> and /explore deps <file> are O(1) cache
lookups against .explore-cache/<sha>.json via
lib/query-engine.mjs. They:
lib/cache-store.mjs#load)./explore, or
auto-run if .explore.json query.autoScan = true.templates/query-prompt.md.hbs.The where query has a 4-pass resolution: exports → symbols → fuzzy
(Levenshtein ≤ 2) → ripgrep fallback. The deps query is pure cache
lookup.
lib/tree-walker.mjs — top-level dir enumeration; .gitignore +
.explore-ignore honoured; bounded-depth walker.lib/dependency-extractor.mjs — regex-based import/export scanner
for TS, Python, Rust, Go. Document accuracy tradeoffs in
references/design-notes.md.lib/cache-store.mjs — atomic .explore-cache/<sha>.json read/write;
schema-version invalidation; list() for future GC.lib/query-engine.mjs — where(map, symbol) + deps(map, file)
summarize(map) (token-bounded structural summary).lib/dir-subagent-prompt.mjs — renders the per-dir scanning prompt
for the Phase 1 parallel dispatch.templates/dir-summary-prompt.md.hbs — what each fan-out subagent
receives.templates/map.md.hbs — final human-readable map.templates/query-prompt.md.hbs — wrapper around the where/deps
result rendering.git init suggestion.WIP-<timestamp> cache key, warn.--yes → require interactive confirm..explore-cache/<sha>.json schema-version mismatch → treat as miss.incomplete,
continue. If >25% incomplete → Phase 1 abort exit 2./explore where cache miss → prompt or auto-run per
.explore.json./explore deps <file> for file not in map → suggest --force
rescan.Print:
Map built: <N> files, <K> lines, <D> top-level dirs, dep graph: <G> typed-lang files.
Cache: .explore-cache/<sha>.json
Map: docs/explore/<sha>-map.md
Exit codes:
0 — clean scan; full coverage; all queries succeed.1 — fatal preflight failure (no git, malformed config).2 — partial completion (one or more dirs incomplete); map
written with incomplete: true markers.docs/superpowers/specs/2026-05-18-harness-explore-design.md — full
design; this skill tracks it section-by-section.references/design-notes.md — implementation-specific decisions
(regex-based scanner accuracy, subagent dispatch contract).Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub kim-song-jun/agent-skill --plugin harness-explore