From ai-tools
Generates an AI-optimized YAML code map (.codemap.yaml) capturing project structure, API surface, services, models, and conventions. Use on repo onboarding or after major structural changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-tools:code-mapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Output**: `.codemap.yaml` at repository root
Output: .codemap.yaml at repository root
Format: YAML — optimized for AI token efficiency
Version: 1.0
� Philosophy: Produce a compact, accurate, machine-readable map of the entire codebase that lets an AI agent skip exploratory scanning and jump straight to productive work.
✅ Initial onboarding — no .codemap.yaml exists yet
✅ After major structural changes — new projects, controllers, services added/removed
✅ Periodic refresh — the extension flagged the map as stale
❌ Minor code changes within existing files (the map is structural, not line-level)
Follow these steps in order. Do not skip steps. Do not guess — verify by reading actual files.
*.slnx or *.sln) at the repo rootProgram.cs) for each non-test projectFor every project directory (not test projects), scan the top-level subdirectories and assign a one-line purpose. Focus on directories containing source code:
Controllers/ — what kind of controllers?Services/ — business logic for what domain?Repositories/ — data access for what entities?Models/, DTOs/, Requests/, Responses/ — what data shapes?Views/ — what UI areas?wwwroot/js/, wwwroot/css/ — frontend assetsAlso map significant nested directories (e.g., Views/NewContracts/_ProductPartials/).
For each API controller (files in Controllers/ with [ApiController] attribute):
[Route("...")])"GET /route → description"For each MVC controller (controllers returning views, not API):
For each service class (in Services/ directories):
For important models only (not every DTO — focus on core domain objects):
UserSessionData, WizardState, BundleSelections)ContractModel, AccountInfoDto, OrderSummaryDto)Record: name, path, type (entity/dto/viewmodel/session/config), key properties.
Identify the most important relationships by reading DI registrations (Program.cs) and constructor dependencies:
Use the format: from → to (type: manages|calls|depends|implements) + note
Scan Program.cs and middleware configuration to identify:
Review 3–5 files of each type (controllers, services, repositories) and note patterns:
Combine all collected data into the YAML schema below and write to .codemap.yaml at the repository root. If the file already exists, overwrite it completely.
# .codemap.yaml — AI-optimized codebase intelligence map
# Generated by the code-map skill. Do not edit manually.
# Regenerate by invoking the code-map skill.
version: 1
generated: "YYYY-MM-DDTHH:MM:SSZ"
overview:
name: "repository-name"
purpose: "one-line description of what this codebase does"
tech:
- "framework/language"
architecture: "one-line data flow description"
projects:
ProjectName:
path: "relative/path/"
type: web-mvc | web-api | test | library
framework: "net10.0"
purpose: "what this project does"
entry: "Program.cs"
directories:
"relative/path/to/dir/": "one-line purpose"
endpoints:
- controller: ClassName
path: "relative/file/path.cs"
base: "/api/route"
methods:
- "VERB /route → brief description"
mvc_controllers:
- controller: ClassName
path: "relative/file/path.cs"
actions:
- "ActionName → description (view: _ViewName.cshtml)"
services:
- name: ClassName
path: "relative/file/path.cs"
purpose: "what this service does"
depends: ["IDependency1", "IDependency2"]
models:
- name: ClassName
path: "relative/file/path.cs"
type: entity | dto | viewmodel | session | config
key_props: ["Property1", "Property2"]
relationships:
- from: "SourceClass"
to: "TargetClass"
type: manages | calls | depends | implements
note: "brief explanation"
cross_cutting:
auth: "description of auth strategy"
cache: "description of caching strategy"
session: "description of session management"
error: "description of error handling"
logging: "description of logging approach"
background: "description of background tasks"
conventions:
- "convention description"
Before writing the file, verify:
projects:Aim for 5,000–10,000 tokens in the output file. To stay within budget:
"GET / → description")directories: and services: sectionsnode_modules/, wwwroot/lib/)END OF SKILL
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub sean-m-cooper/ai_tools --plugin ai-tools