cortex-view
Skill1 starsChanged 2 months agoMITView on GitHub
Render the repo as one offline HTML page — state overview, import graph, context tree, files, areas and gaps. Triggers — "show me the graph", "visualise this repo", "open the map", "cortex view".
In this repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- core/AGENTS.mdAGENTS.md
- index/AGENTS.mdAGENTS.md
- mcp/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-specSkill
- auditSkill
- captureSkill
- catch-me-upSkill
- connect-brainSkill
- cortex-auditSkill
- cortex-briefSkill
- cortex-enrichSkill
- cortex-impactSkill
- cortex-installSkill
- cortex-nextSkill
- cortex-profileSkill
- cortex-reviewSkill
- cortex-scaffoldSkill
- cortexSkill
- cortex-skillsSkill
- dailySkill
- diagnosing-bugsSkill
- domain-modelingSkill
- dreamSkill
- grillingSkill
- handoffSkill
- improve-codebase-architectureSkill
- install-projectSkill
- level-upSkill
- migrate-engineSkill
- onboardSkill
- optimize-contextSkill
- optimize-promptSkill
- plugin-syncSkill
- reindexSkill
- resolving-merge-conflictsSkill
- resumeSkill
- scan-projectsSkill
- setup-pluginsSkill
- shipSkill
- site-syncSkill
- skill-auditSkill
- skill-creatorSkill
- team-addSkill
- team-initSkill
- weekly-reviewSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
No server, no CDN, no runtime: the data is inlined, so the page works offline and copies anywhere.
- Very specific: line 34
Check the index: If .cortex/index/index.json is missing or older than the working tree, re-run node …
- Distinctive: line 67
An orphan is a question: Import resolution is regex-based (ADR 0004 rules out a parser), so a dynamically loaded or framework-discovered …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/cortex-view — see the repo instead of reading about it
The findings report is prose and the index is JSON. Neither answers "what shape is this codebase" in the two seconds a picture takes. This renders the index Cortex already built into one page.
node "${CLAUDE_PLUGIN_ROOT}/index/cortex-view.mjs" .This skill exists because that command does not work when a user types it themselves.
${CLAUDE_PLUGIN_ROOT} is set inside a skill and nowhere else, so a plugin user in their own
terminal has to know a version-pinned path into the plugin cache — one that changes on every
update. /cortex-view is the address they can actually remember.
No server, no CDN, no runtime: the data is inlined, so the page works offline and copies anywhere.
Before the first write
If .cortex/ does not exist, ask before running anything — the index comes first, and that is
the write ADR 0005 gates. Generated
and gitignored is not the same as invisible. The .gitignore entry is written for you at creation
time; the asking is not.
How to run it
- Check the index. If
.cortex/index/index.jsonis missing or older than the working tree, re-runnode "${CLAUDE_PLUGIN_ROOT}/index/cortex-index.mjs" .first — a picture of a stale index is worse than no picture, because it looks current. - Run the viewer. It writes
.cortex/view/repo.htmland opens it in the default browser. Pass--no-openwhen the user is on a headless machine or has said not to open windows. - Print the path. The browser may not surface on every setup, and the file is the deliverable.
- Say what the numbers mean, using the summary line the CLI prints — files, import edges, areas, orphans, files in cycles, modules with no test found. Do not re-count anything yourself.
What is on the page
| Tab | Holds |
| Overview | opens first: index freshness, profile, memory age and version; vitals (files, edges, test coverage, 30-day churn, findings by severity) and the top 3 findings; the import graph as a turning particle cloud; next-step commands to copy; a timeline of memory entries and commits |
| Map | every code file as a node, coloured by area, laid out by import depth so it reads top-down rather than as a hairball |
| Structure | the context layer as a tree — root AGENTS.md, the docs beside it, each code area with its scoped brief, busiest files and tests, and what Cortex generates. A dashed box is missing and names the command that writes it |
| Files | each file with who imports it and what it imports, both clickable |
| Areas | the top-level shape, and which areas already have a scoped brief |
| Gaps | orphans, files in import cycles, and the busiest code with no test found |
| Next steps | where this repo is in the Cortex sequence, each ✓ traced to a file on disk |
Any Overview fact that could not be read — no git, no memory yet, no findings pass — says not available and why. Report it that way; never read a missing value as zero. Churn and the timeline end at the indexed commit, not at today, so the page is the same on every machine.
A red outline on a node means no test was found. Click an area in the legend to hide it; / focuses
search; scroll zooms and drag pans. On the Overview, drag turns the cloud and a click opens the file.
The theme follows the OS; the button in the top bar overrides it and is remembered.
What you must not claim about the picture
A graph is persuasive in a way prose is not, so the hedges matter more here, not less.
- An orphan is a question. Import resolution is regex-based (ADR 0004 rules out a parser), so a dynamically loaded or framework-discovered file looks exactly like a dead one. Never present the Gaps tab as a delete list.
- "No test found" is a floor. Coverage uses three signals — a test named for the file, importing it, or naming it in a quoted string — so a file exercised only through a subprocess reads as untested. Wrong in the safe direction, and say so.
- Markdown and config are not drawn. They have no imports; on one repo 171 isolated nodes buried the 98 connected ones. They are still in the Files tab, and the legend says how many.
- Depth is a floor too. An unresolved import makes a file look shallower than it is, so the layer count is the smallest honest answer rather than a verdict on the architecture.
Related
/cortex-installbuilds the index this renders; run it first on a repo Cortex has never seen./cortex-enrichadds a summary to every file card — what the file does, not just how it is wired. Optional and costs tokens./cortex-nextanswers the same "where am I" question in text, and is what the Next steps tab shows.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

