/grimoire:cartographyfrom grimoire
Traces code flows (authentication, data pipelines, permission checks) and creates cartography files for quick context rebuilding. Activates on flow exploration requests.
Ships in grimoire. 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; scripts run unread.
Explore a code flow, document which parts of the codebase are relevant, and create a cartography file so context can be rebuilt quickly on future visits.
Context is expensive to build and cheap to store. Security researchers repeatedly need to understand the same flows — authentication, data pipelines, permission checks. Building this context from scratch each time wastes tokens and time. Cartography files are lightweight pointers that document where to look, not what the code does. They enable any agent to rebuild flow context in seconds instead of minutes.
When this skill is activated, create a todo list from the following steps. Mark each task in_progress before starting it and completed when done.
- [ ] 1. Verify infrastructure — confirm grimoire/cartography/ exists
- [ ] 2. Check index for existing flows — run index script, present matches
- [ ] 3. Explore the flow — discover entry points, components, sequence, security notes
- [ ] 4. Document the flow — create cartography file following format spec
- [ ] 5. Update index — re-run index script, verify new flow appears
- [ ] 6. Present to user — summary and suggest follow-up skills
Check that the grimoire/ directory and grimoire/cartography/ subdirectory exist.
grimoire/cartography/ exists, proceed.grimoire/ exists but cartography/ does not, create grimoire/cartography/.grimoire/ does not exist, warn the user that Grimoire has not been summoned on this
codebase. Suggest running [[summon]] first to set up the workspace. If the user wants to
proceed anyway, create both grimoire/ and grimoire/cartography/.Run the indexing script to see what flows already exist:
bash skills/cartography/scripts/index-cartography.sh grimoire/cartography/
If the index returns results:
If the index is empty or the user's flow is new, proceed to exploration.
There are two exploration modes depending on what the user provides:
Seeded exploration — the user provides starting files or hints (e.g., "trace how
authentication works starting from gateway/src/middleware/auth.ts"). Use these as entry points
and trace the flow by following the callgraph:
Use path/to/file:symbol notation to track each hop. This directly becomes the Flow Sequence
and Key Components in the cartography file.
Unseeded exploration — the user describes a flow but doesn't point to specific files (e.g., "map how secrets are retrieved"). Deploy a swarm of subagents to explore the codebase:
The swarm casts a wide net; the callgraph pass refines it into a coherent flow. Don't skip step 5 — a bag of search results is not a flow map.
In both modes, gather:
Use subagents to parallelize exploration. Keep the main context focused on assembling the map rather than reading every file in detail.
Consult references/cartography-format.md for the exact format specification and the examples:
examples/cartography-example.md — single-service flow, one conditional sectionexamples/cross-service-auth-example.md — cross-service flow, multiple conditionalsCreate a cartography file at grimoire/cartography/<slug>.md where <slug> is a URL-friendly
version of the flow name (lowercase, hyphens, no spaces).
The file must follow the format defined in references/cartography-format.md:
name, description, created, updated, tags, relatedpath/to/file:symbol notation<!-- condition: ... --> comment as a
concrete, matchable topic description — an agent reads this comment and decides whether to
load the section based on the user's current question. Load when the user's question
directly matches the condition topic. Skip when the user is focused on the main flow and
the conditional topic hasn't been mentioned.Key constraint: the file documents where to look, not what the code does. If you find yourself writing detailed code explanations, stop. Add the file path and a one-line role description instead.
Set created and updated to today's date.
Re-run the indexing script:
bash skills/cartography/scripts/index-cartography.sh grimoire/cartography/
Verify the new flow appears in the output. If it doesn't, check that the frontmatter has
valid name and description fields on single lines.
Show the user:
Suggest follow-up actions:
Cartography files exist so that agents don't repeat expensive exploration. When an agent needs to understand a flow that has already been mapped, it should rebuild context from the cartography file rather than re-exploring from scratch:
<!-- condition: ... --> comment. If the
user's current question matches the condition topic, load that section. If not, skip it.
When in doubt, skip — loading unnecessary conditionals wastes context.updated date is old or the referenced files have changed
significantly since the cartography file was written, the map may be stale. Consider running
[[review-cartography]] to update it before relying on it.An agent that follows this process gets to a working understanding of the flow in seconds, using tokens only on reading source files rather than searching for them.
related field and
[[cartography/...]] links to connect them.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub joranhonig/grimoire --plugin grimoire24 skills in this plugin
/annotationThis skill should be used when the user says "find annotations", "list audit tags", "show @audit comments", "compile annotations", "/annotation", "find todos", "find audit comments", "what did I annotate", "annotation summary", "list audit findings", "what's annotated", or wants to discover, list, or filter @audit-* comment annotations scattered throughout a codebase. This skill is for annotation discovery only — how annotations are used downstream (spawning subagents, cross-referencing findings, etc.) is out of scope./checksThis skill should be used when the user says "create a check", "write a check", "add a check", "apply checks", "run checks", "/checks", "vulnerability pattern", "detection check", "check for common bugs", "scan with checks", or wants to create, apply, or manage simple vulnerability pattern files that agents use to find flaws. Checks are the simplest unit of agentic vulnerability detection — markdown files describing what to look for and how to assess matches. This skill is NOT for general code review or ad-hoc vulnerability analysis./delveThis skill should be used when the user says "delve", "/delve", "review the research", "what was interesting", "surface odd behavior", "what did the agents find odd", "show me the leads", or wants to see what autonomous security research turned up that deserves a human look. Delve is a report for the operator. It surfaces substantiated oddities, near-misses, unresolved mechanisms, and suspicious patterns so the operator can decide what to explore. It does not pick research directions, and it is not for agents to choose their next task./dig-modeThis skill should be used when the user says "dig mode", "/dig-mode", "dig", "let's dig into", "I'm going to ask you a series of short questions", "help me build context", "walk me through this one step at a time", or wants a question-and-answer session to quickly understand a system, a code path, or the research done so far. Dig mode is a conversational mode: short questions, short answers, low cognitive load, Simplified Technical English./divineThis skill should be used when the user says "divine", "/divine", "why", "/why", "why does this exist", "why does this work this way", "why was this chosen", "what motivated this code", "explain the rationale", "trace this decision", "reason about intent", or wants to understand the forces that shaped a security-relevant design choice, defensive check, threshold, invariant, trust boundary, or regression. Produces a confidence-calibrated, source-backed read on rationale, tradeoffs, gaps, and follow-up hypotheses./findingThis skill should be used when the user asks about findings, finding structure, finding format, finding best practices, "how should a finding look", "what goes in a finding", "/finding", or wants to understand how security findings are structured and written. Teaches the format, best practices, and conventions for security findings. For specific workflows use /finding-draft, /finding-review, or /finding-dedup.Other plugins' skills for the same job