cartography
Skill1 starsChanged 3 months agoMITView on GitHub
AST Codebase Skeleton Mapping, Selective Token Diet, and Project Exploration for Fast Onboarding
3 other projects use a version of this.
Adopted by
Most recently taken up by
- TerraLabAI/geoai-skillstheir own version, first seen Nov 1, 2026
- matthewharrilal/claude-skillstheir own version, first seen Oct 13, 2026
- open-science-pillars/coretheir own version, first seen Sep 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- matthewharrilal/claude-skills★ 0same name
- open-science-pillars/core★ 0same name
- TerraLabAI/geoai-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apex-coreSkill
- backend-dataSkill
- frontendSkill
- quality-verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
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 14
When onboarding to a new codebase or re-entering an existing project, generate a compact skeleton map of types, function signatures, and …
- Distinctive: line 15
Keep the initial structural overview within 500–800 tokens to preserve working memory without reading full implementation files.
- Distinctive: line 23
Use the available search / symbol / file-name tools (grep, symbol search, directory listing) to pinpoint exact symbols, functions, or file …
- Distinctive: line 24
Use bounded file reads with explicit line ranges (150–200 lines maximum).
- Very specific: line 32
Use the dedicated TypeScript Compiler AST engine located at skills/cartography/scripts/ast-extractor.js:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Cartography & Token Diet Skill (v7.0.0)
Fast codebase discovery using AST Skeleton Mapping and strict token diet controls to prevent context window bloat and hallucination.
1. AST Skeleton Mapping (Fast Discovery in 1s)
- When onboarding to a new codebase or re-entering an existing project, generate a compact skeleton map of types, function signatures, and endpoint routes.
- Keep the initial structural overview within 500–800 tokens to preserve working memory without reading full implementation files.
2. Selective Token Diet (Search First, Read Second)
- [FORBIDDEN] Never view entire 1,000+ line files or load unrequested adjacent modules into context.
- [STANDARD] Selective Retrieval Protocol (use the host agent's equivalent tools):
- Use the available search / symbol / file-name tools (grep, symbol search, directory listing) to pinpoint exact symbols, functions, or file targets first.
- Use bounded file reads with explicit line ranges (150–200 lines maximum).
- Exception for Schemas/Contracts: Allow viewing up to 600 lines for
schema.prisma, OpenAPI specs, and core shared type definitions to prevent broken inverse relations (@relation) or missing discriminated union variants. - Rely on Type Definitions and Schema Interfaces to plan changes instead of reading full implementation details.
3. High-Precision Compiler AST Extraction Tool
- Use the dedicated TypeScript Compiler AST engine located at
skills/cartography/scripts/ast-extractor.js:import { extractAstSkeleton } from './scripts/ast-extractor.js'; const skeleton = extractAstSkeleton('service.ts', fullCode); - Capabilities:
- TypeScript & JavaScript (
.ts,.tsx,.js,.jsx): Parses top-level declarations with the TypeScript compiler API and prunes implementation bodies. It is a compact contract view, not a complete semantic model; inspect source when control flow, imports, or inferred types matter. - Vue SFC (
.vue): Automatically extracts and parses<script lang="ts">/<script setup>contracts. - Prisma Schema (
.prisma): Uses a lightweight line-based contract extraction that retains common fields and attributes. Inspect the schema directly when parsing edge cases or relation syntax matters.
- TypeScript & JavaScript (
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.

