hermes

Explain a codebase

Explains an unfamiliar codebase. Maps its structure, traces one real request end to end and names the concepts and gotchas a newcomer needs. Use when joining a project or reading an unknown repo.

context

A newcomer does not need a summary of every file. They need a mental model: what the system is for, where each responsibility lives, how one real piece of work travels through the code, and which surprises will cost them a day. Explanations of code are only useful if they are true, so every statement must point at the file that proves it.

task

Explain the codebase in the working directory at depth. Only if [FOCUS] is given: Centre the explanation on: Only if [BACKGROUND] is given: The reader already knows: . Do not explain that.

  1. Orient: read the README, contributing docs, manifests and lockfiles (languages, frameworks, key dependencies), build and CI config, and the top two levels of the directory tree. Skip vendored, generated and build output folders.
  2. Find the entry points: main functions, server bootstrap, CLI definitions, route tables, job schedulers, exported library index.
  3. Trace one real flow from entry to exit (the focus, if given, or the most central user action): each hop with path:line, what it does and what data it passes on.
  4. Identify the key concepts: domain terms, core types or tables, and the architectural pattern actually used (layers, modules, events), described from the code, not from labels.
  5. For deep: also cover the data model, error handling, configuration and environment variables, and how the tests are organised and run.
  6. Note gotchas: code generation, magic or convention-based wiring, global state, surprising side effects, environment-dependent behaviour, dead or legacy areas.
constraints
  • Cite a file path (and line where useful) for every claim about the code. Mark anything inferred from names or structure rather than read as "(inferred)".
  • Do not describe files you have not opened as if you had. If the repo is too large to read fully, say which parts you sampled.
  • Do not suggest refactors or fixes unless the reader asks; this is an explanation.
  • Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
  • If the information you need is not available, say what is missing and how to get it instead of inventing it.
output format

What it is

Two or three sentences: purpose, users, main technologies.

Map

A table: directory or module | responsibility | files to read first.

How a request flows

Numbered hops with path:line. Add a Mermaid sequence or flowchart if there are more than five hops.

Key concepts

A short glossary of domain terms and core types, each with where it is defined.

Where to start

Three files to read first, and one small, safe change that would teach the reader the workflow (for example adding a test for an existing function).

Gotchas

Bullets, each with the file that shows it.

Open questions

What the code alone could not answer, and who or what might (docs, history, owners).

Every required value is filled in. Copy gives the finished prompt.

details

kind
Prompt: a task you run by name to get one finished thing back
domain
Software engineering
category
Learning to code
level
Beginner
made for
Software engineer
needs
repo-read
risk
read-only
version
v1.0.0 · experimental
reviewed
2026-10-02
works in
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md

Edit on GitHubReport a problem

use in

Hodios CLI
npx @hermes-hq/hodios install explain-codebase --target claude-code
Agent Skills
npx skills add hermes-hq/hodios-dist --skill explain-codebase -a claude-code
Add the Hodios marketplace (once)
claude plugin marketplace add hermes-hq/hodios-dist
Install the software-engineering plugin
claude plugin install hodios-software-engineering@hodios

The plugin brings every entry in this domain at once.

PersonaTutoring

Socratic tutor

Tutors by asking guiding questions and giving graded hints instead of answers, so the learner reaches the solution and can explain it. Use for studying, homework help and learning to code.

socratic-tutor
PromptLearning to code

Explain a concept with code

Explains a programming concept through the problem it solves, a minimal runnable example, a common mistake and a quick self-check, pitched at the learner's level. Use to learn or teach a concept.

explain-concept-with-code
PromptLearning to code

Explain a SQL query

Explains a complex SQL query clause by clause in logical execution order, shows intermediate results on a tiny example, and points out bugs and performance traps. Use when inheriting a query.

explain-sql-query
PromptLearning to code

Plan a learning path for a technology

Builds a week-by-week plan to get productive in a new language, framework or tool, built around hands-on milestones and skipping what the learner already knows. Use when picking up a new stack.

plan-learning-path
PersonaLearning to code

Coding mentor

Acts as a senior developer mentoring a junior, asking what they tried, explaining the why behind fixes and reviewing code to teach. Use for early-career developers who want to grow.

coding-mentor
PromptLearning to code

Create graded coding exercises

Generates a graded set of coding exercises for one concept, each with starter code, automated tests, staged hints and a reference solution. Use for teaching, practice sessions or self-study.

create-coding-exercises