/agents-skills:spelunking-specsfrom agents-skills
Deep-dives unknown codebases to produce living spec documents with auto-discovered domains, inferred conventions, and drift detection. Activates on 'deep-dive', 'recon the codebase', 'figure out the conventions', 'spec out the app'.
Ships in agents-skills. 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.
A codebase nobody has fully mapped is a liability — every new agent re-derives the same conventions, repeats the same wrong assumptions, and misses the invariants that aren't written down anywhere. Codebase recon is the deep-dive that fixes that: agents ingest the code, infer how it actually works and the standards it follows, verify each claim against real file:line evidence, and write it down as a set of living specs that live in the repo beside the code. Those specs are then refined forward — each pass and each new feature sharpens them, so the team's shared understanding compounds instead of evaporating.
These specs document discovered reality (what the code does, with evidence) and the standard it implies (the convention a new contributor should follow), and they flag drift — where the code violates its own pattern — as open questions rather than silently normalising it. Domains are auto-discovered from the codebase, not seeded from a fixed list.
Every spec has a numeric dotted reference — domain.subdomain.instance, each segment a number:
1 — a top-level domain (e.g. whatever discovery names #1).1.2 — a subdomain within it.1.2.3 — a specific instance/spec (the leaf).The reference is an address, not a version — git is the version history, so specs carry no version number and are never duplicated per-revision. Each leaf reference is one Markdown file:
<specs-dir>/
_index.md # the registry — number ⇄ domain/title/file/confidence
1.1.1-session-refresh.spec.md
1.1.2-session-expiry.spec.md
1.2.1-oauth-google.spec.md
2.1.1-user-schema.spec.md
3.1.1-structured-logging.spec.md
The number is canonical; the -slug is a human convenience (a slug rename is cosmetic, done with git mv). <specs-dir> defaults to specs/ at the repo root (a project may bind it elsewhere).
Numbers are assigned once and never renumbered. A reference is a citation target — issues, PRs, other specs, and agents point at 1.2.3 — so renumbering breaks every pointer the way renaming a public API does. New domains/subdomains/instances take the next free number and append; deprecated specs are marked deprecated in frontmatter, not deleted or renumbered.
_index.md — the registryNumbers are opaque without a key, so _index.md is the entry point: a table mapping every reference to its domain, title, file, and confidence, plus a short statement of the repo-wide conventions that span domains. Every recon pass keeps it in sync.
| Ref | Domain | Title | File | Confidence |
|-----|--------|-------|------|------------|
| 1 | auth | Authentication (domain overview) | 1-auth.spec.md | verified |
| 1.1 | auth | Sessions | 1.1-sessions.spec.md | verified |
| 1.1.1 | auth | Session refresh | 1.1.1-session-refresh.spec.md | draft |
Frontmatter, then the body:
---
ref: 1.1.1
domain: auth
title: Session refresh
confidence: draft | verified | stable
last_reviewed: <commit SHA or ISO date>
sources: # file:line, an introspection command, or a runtime observation — all reproducible
- src/auth/session.ts:88-140
- "cli: <framework debug command> → resolved service/route binding"
- "runtime: /login render → template suggestion → handler (debug output)"
status: current | drift-flagged | deprecated
related: [1.1.2, 1.2.1]
---
Body sections:
file:line.Confidence is honest: draft = inferred, not fully verified; verified = claims checked against the code this pass; stable = verified and unchanged across passes.
Recon parallelises — spawn agents if the runtime allows it; otherwise do the phases inline.
_index.md. Discovery names the domains from the code's own vocabulary (a payments/ module → a payments domain), not from a generic checklist.file:line evidence, each spec marked draft. Give each agent the taxonomy so cross-domain references resolve.file:line for the load-bearing claims; confirmed specs flip draft → verified, unconfirmed claims drop to a Drift/open-question line. Do not publish verified on an unchecked claim._index.md, then report the domain map, the confidence spread, and the top drift/open-questions for the operator.Some stacks don't reveal themselves to static reading. Many frameworks and platforms wire behaviour by naming convention, hook/event systems, dependency-injection containers, and configuration that lives in a database or config store — not by call sites you can grep. The relationships are string machine-names, not function references: a handler fires because it is named to match a convention, a service binds by its id in a config file, a field or component attaches to an entity by a machine-name stored in the database. Grepping for callers finds almost nothing — so people map these apps by hand: hit a page, scatter logs, guess the custom (often non-conforming) machine-names, follow each relationship to the next, and repeat until they know enough. That is spelunking, and it is automatable — it's a recon loop that was missing the right tools.
Three moves, run as a loop, replace the manual spelunk:
The loop (automated spelunk): seed from a page/route/entity → introspect to enumerate its machine-names → resolve each name to its definition and its references → for every still-unknown name, introspect or observe again → stop when the domain's name-graph closes (a pass surfaces no new unknowns). Each leaf spec records that name-graph in Discovered behaviour and cites both the file:line and the introspection command / runtime observation that proved it (see Sources) — so the next agent reproduces the finding instead of re-spelunking.
No running instance or CLI/DB access? Recon degrades gracefully: read the source plus any exported/committed configuration files statically, mark the runtime-only claims draft, and list in Drift & open questions the exact introspection commands a human (or a later run with access) should run. Say so — a static-only map of a dynamically-wired app is honestly low-confidence, and pretending otherwise is the worst outcome.
Recon is meant to run again — on a schedule, after big merges, or targeted at a changed area. On a re-run (see the /spelunking-refresh-spec command):
_index.md.verified/stable; can't re-confirm ⇒ back to draft with a note. Stale last_reviewed is a signal a spec needs a pass.status: deprecated, pointer to the successor ref).Recon writes specs (under <specs-dir>) and reads code; it does not modify application code, file issues automatically (it recommends them in Drift sections for the operator to file via the issue-filing skill), or assert issue-level LoE (that is the technical-recon skill). This skill maps the codebase; it is not the issue pipeline. It composes with that pipeline only by being a context source a human or a later recon can read — wiring spec-reads into other skills is deliberately out of scope here.
file:line is a guess; publish it as draft in Drift, not as verified.1-auth.spec.md defeats the addressing.-v2, no semver in the name.draft and say what you couldn't reach.Recon spawns many agents over a large codebase — operate in caveman mode (load the caveman skill) for working output (survey notes, the batch coordination, status, the report), keeping machine-precise content byte-exact (references, file:line, frontmatter keys, the _index.md table, code blocks).
But the specs are durable documents the whole team and every future agent will read — their prose (purpose, conventions, assumptions, drift narrative) is the product. Draft it naturally and run each spec through the humanizer skill before writing, so the spec set reads human-authored, not machine-dumped. Leave file:line evidence, references, and frontmatter exactly as captured.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub skyfox675/agents-skills --plugin agents-skills32 skills in this plugin
/browser-diagnosisReproduce and root-cause a front-end bug in a real browser using whichever browser MCP is connected — Chrome (claude-in-chrome), Playwright, Cypress, or Chrome DevTools — not just one. Drive the page as the signed-in user, watch the network and console, capture the failing request/response, shim/mock to isolate the fault, and record a repro, then hand the evidence to the issue being filed. Use whenever a symptom needs live-browser evidence (the toast says failed but it saved, a column shows zero, a click 404s) and from the /…-use-browser command family (and the engine-pinned /…-use-chrome, /…-use-playwright, /…-use-cypress variants), the /…-use-aws-browser commands, and the diagnostician agent. Picks the available MCP automatically and degrades gracefully when none is connected./cavemanUltra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested./ci-flake-huntingThe authoritative method for hunting, root-causing, and fixing CI flakes so the merge queue stops ejecting correct PRs and churn drops. A flake is a test that fails then passes on retry with NO code change explaining it — every red speculative merge-queue build ejects a correct PR and disarms its auto-merge, so a live flake taxes every PR behind it. Encodes the loop — MINE CI history for real flakes → REPRODUCE harsher-than-CI → ROOT-CAUSE the real mechanism (hydration/render race, settle race, mock-order, loading-state race, click-through fragility) → FIX FORWARD (test or component, never mask) → VERIFY by re-running many times → UNSTICK the PRs the flake stranded → REPEAT. And how to tell a true code flake from transient INFRA (CDN/mirror outage, expired token mid-suite, rate-limit/WAF, external-service cap, cloud state-lock, CI-provider billing/outage, upstream bump) which must NOT be code-fixed. Use whenever chasing CI instability, "deflake this spec", "CI keeps ejecting my PR", "is this a flake or real", a shard that intermittently reds the queue, or running the ci-flake-hunter lane. Distinct from ci-speed-hunting (which owns slow-but-green jobs — flake never touches timing/sharding).Other plugins' skills for the same job