Devx explain
Understand an existing codebase without changing it. Two modes: (1) ASK — read-only Q&A over the repo + the dev-knowledge vault ("what does X do?", "where is Y handled?", "how does auth flow?"); (2) DOCUMENT — analyze the codebase and generate per-component docs (docs/components/*.md) by fanning out one docs agent per component. Read-only to source; only writes under docs/ and .devx/.From its SKILL.md
npx -y skills add RikunjSindhwad/DevX --skill devx-explainAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.3 KB, as published. Nobody here has run it
/devx:devx-explain — understand the codebase
allowed-tools is a one-turn preapproval list, not a restriction boundary.
ASK mode remains source-read-only by this skill contract; host permissions and
hooks still govern every call. Durable explain state lives under .devx/.
Read-only comprehension. You never modify source. You orient via the repo map and answer precisely, or
you produce durable component documentation. Cite file:line for every claim (verify-before-claim).
On startup: devx log STAGE orchestrator "explain session in $(pwd)". Search project memory and the
vault freely: devx kb_search "<q>" --scope all.
Before answering or dispatching docs/scout agents, establish the same target contract used by /devx:devx:
TARGET_REPO, CURRENT_CWD, and GIT_ROOT. If the operator's question names another repo than the live
cwd/git root, stop and ask which repo to inspect. When using codebase-memory-mcp, verify the project
matches that target and has useful indexed content before treating it as evidence; otherwise say the graph
is unavailable and use live Grep/Glob/rg.
Explain Session State
/devx:devx-explain is not the delivery pipeline, but any sub-agent you dispatch still needs a durable place
to log handoffs. Before dispatching scout or docs, create an explain workstream:
.devx/workstreams/explain-{YYYYMMDD-HHMM}/
brief.md
state.md
handoffs/
reviews/
research/
Use the slug explain-{YYYYMMDD-HHMM} unless the operator supplied a better topic slug. Write:
brief.md: the question or documentation scope, plus "mode: explain".state.md: a single NEXT ACTION (answer question,map components, orcomplete).
Pass workstream={slug} and return_as={unique handoff filename} in every Agent dispatch brief. This keeps
explain-mode agent calls compatible with the shared handoff contract without pretending this is a normal
delivery workstream. Confirm each exact handoff path is absent before dispatch and validate that exact path
with devx handoff_check after return.
If .devx/project.md is missing or stale, create the explain workstream first, then dispatch
devx:recon:scout (haiku) with that workstream to refresh the repo map before answering.
Mode A — ASK (default)
The operator asks a question about the codebase.
- Locate the relevant code with
Grep/Glob(andugrepfor long-line files). Read enough to be correct, not everything. Usecodebase-memory-mcpfirst only when its project has passed the target and health check above. - Consult the vault for the concept if useful (
devx kb_search). - Answer concisely with
file:linecitations and, where helpful, a small flow ("request →router.py:42→auth.verify():auth.py:88→ …"). State unknowns plainly; never guess. - Offer to go deeper or to generate component docs (Mode B) for the area discussed.
Mode B — DOCUMENT (on request)
Generate per-component documentation for the codebase (or a subtree).
- Enumerate components from the repo map: modules/packages/services with a coherent responsibility
(e.g. each top-level package, each service, each significant module). Present the list + the target
(
docs/components/) and confirm scope viaAskUserQuestionfor a large repo. - Ensure an explain workstream exists, then fan out — dispatch
devx:docs:docsin map mode, one per component, in parallel (multipleAgentcalls in one message). Each dispatch getsworkstream={explain slug},mode=map,component, the component's file paths, and a uniquereturn_as={NN}-docs-map-{component}.md. Each writesdocs/components/<name>.md: purpose, public API/exports, key types, dependencies (in/out), invariants/gotchas, and entry points — every claim cited. After the fan-out returns, validate every.devx/workstreams/{slug}/handoffs/{return_as}path; assemble only when all component handoffs pass. - Assemble
docs/components/README.mdas an index (component → one-line purpose → link), and note any cross-cutting findings. - Optionally refresh
.devx/architecture.mdif the component pass revealed the structure drifted from the doc. Re-rundevx index --scope projectif you wrote anything under.devx/.
Gates
- ASK mode: none — it's read-only.
- DOCUMENT mode for a large repo: confirm the component list + scope before fanning out (cost control).
Rules
- Read-only to source. Never edit code from this skill; only
docs/and.devx/. - Cite or say "unknown." Every claim is
file:line-backed; no inference presented as fact. - Fan out, don't serialize. Component docs are independent — dispatch them concurrently, one agent per component, each in a clean context, but only after each has a unique component name and shared explain workstream for handoffs. Fan-in is all-or-nothing over the pre-allocated exact handoff paths.
- Reuse, don't duplicate. If
docs/already documents a component, update it rather than re-create.