Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Agent Code Map

ASecurity

Usar cuando un agente necesita conocer la arquitectura del proyecto sin leer ficheros completos.

50 stars
0 votes
0 copies
0 views
Added 9/27/2026
ai-agentsgobashsqlvuegitapi

Works with

cliapimcp

Security Analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned 10/5/2026

$npx -y skills add gonzalezpazmonica/savia --skill agent-code-map --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Code Map?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent Code Map
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gonzalezpazmonica-agent-code-map/badge)](https://www.skillsdirectory.com/skills/gonzalezpazmonica-agent-code-map)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
layer: peripheral
name: agent-code-map
description: Usar cuando un agente necesita conocer la arquitectura del proyecto sin leer ficheros completos.
allowed-tools: [Bash, Read, Glob, Grep, Write, Edit]
metadata:
  # --- metadata.savia.* (SE-333) ---
  savia.agent: architect
  savia.maturity: beta
  savia.category: sdd-framework
  savia.context: project
  savia.priority: high
  savia.summary: "Formato .acm que el agente redacta y carga por capas. refresh-agent-maps.sh refresca cabeceras por repo y emite JSON; hash y generacion son manuales."
  savia.tags: "acm, agent-maps, codemap, context, sdd, architecture"
  savia.user-invocable: True
---
# Agent Code Map — Mapas Estructurales Persistentes

Genera ficheros `.acm` (Agent Code Map) pre-calculados que los agentes cargan
al inicio de cada sesión. Elimina la exploración ciega de arquitectura.

## Cuándo usar

Inicio de pipeline SDD (leer `INDEX.acm` y cargar solo las capas necesarias),
post-sprint o tras `/project-update` (refrescar cabeceras), proyecto nuevo
(redactar los `.acm` iniciales) y verificación (repos sin checkout o sin `.acm`).

## Qué es ejecutable hoy

No existen comandos `/codemap:*`: la generación, la carga y la verificación de
frescura por hash son procedimiento del agente (leer código, escribir el `.acm`
con el formato de abajo). Lo único ejecutable es el refresco de cabeceras:

```bash
bash scripts/refresh-agent-maps.sh <slug>          # todos los repos de projects/<slug>_main/<slug>/repos/
bash scripts/refresh-agent-maps.sh <slug> <repo>   # un solo repo
```

- Lee `projects/<slug>_main/<slug>/repos/*` y `.agent-maps/repos/*.acm`; casa repo y `.acm`
  ignorando mayúsculas, `-` y `_` (`Api_Core` → `api-core.acm`).
- Reescribe solo la **primera línea `> `** (cabecera): `refreshed: AAAA-MM-DD`; repo con solo
  `.git` → `status: stale-no-checkout`. El cuerpo no se toca. Escritura atómica (segura en concurrencia).
- Actualiza `refreshed:` en `INDEX.acm` (también atómico). **No** calcula hash ni crea `.acm`: sin `.acm` → `missing-acm`.
- stdout: JSON válido `{"slug","ts","repos":[{"repo","status","acm","counts":{cs,vue,sql,tf,csproj,controllers},"last_commit"}]}`.
  `status` ∈ `refreshed | missing-acm | stale-no-checkout | missing-repo | error`.
- Exit: `0` ok · `1` falta `repos/` o `.agent-maps/repos/`, algún repo en `missing-repo` o `error` (.acm no escribible;
  no toca `INDEX.acm` ni imprime `OK`) · `2` slug o repo inválido (solo `[A-Za-z0-9._-]`, sin `..`).

Tests: `tests/test-agent-code-map.bats`.

## Formato .acm

Cada fichero `.acm` es Markdown con estructura fija:

```markdown
# [Capa] — [Descripción] (.acm)
> hash: sha256:[HASH_CODIGO_FUENTE] | generated: YYYY-MM-DD | lines: N

## [Entidad/Módulo]
- **Tipo**: Clase | Interface | Servicio | Repositorio | Controller
- **Fichero**: `src/ruta/al/fichero.ext:LINEA`
- **Propósito**: [descripción 1 línea]
- **Dependencias**: [lista de dependencias clave]
- **API pública**: [métodos/endpoints expuestos]

@include domain/entities.acm   ← carga bajo demanda
```

## INDEX.acm — Punto de entrada

```markdown
# INDEX — Agent Code Map (.acm)
> hash: [HASH] | generated: YYYY-MM-DD | project: [nombre]

## Navegación por capa

| Capa | Fichero | Elementos | Prioridad |
|------|---------|-----------|-----------|
| Domain Entities | domain/entities.acm | N entidades | 🔴 Alta |
| Domain Services | domain/services.acm | N servicios | 🔴 Alta |
| Infrastructure | infrastructure/repositories.acm | N repos | 🟡 Media |
| API | api/controllers.acm | N controllers | 🟡 Media |
```

## Estructura en disco

```
.agent-maps/
├── INDEX.acm              ← Siempre cargar primero
├── domain/
│   ├── entities.acm       ← Entidades de dominio
│   └── services.acm       ← Servicios de negocio
├── infrastructure/
│   └── repositories.acm   ← Repositorios y acceso a datos
└── api/
    └── controllers.acm    ← Controllers y endpoints
```

## Modelo de frescura

| Estado | Condición | Acción del agente |
|--------|-----------|------------------|
| `fresco` | Hash .acm coincide con código fuente | Usar directamente |
| `obsoleto` | Cambios internos, estructura intacta | Usar con aviso |
| `roto` | Ficheros eliminados o firmas públicas cambiadas | Regenerar antes de usar |

Cálculo de hash (manual, lo hace el agente al redactar el `.acm`): `sha256` del contenido
de todos los ficheros fuente del scope. `refresh-agent-maps.sh` no lo recalcula; solo
marca `refreshed:` y `stale-no-checkout`.

## Sistema @include

Carga bajo demanda (`@include domain/entities.acm`): el agente lo resuelve leyendo
el fichero. Máximo 150 líneas por .acm; si crece, dividir en subdirectorios
(`domain/entities/user.acm`, `domain/entities/order.acm`, etc.).

## Integración en pipeline SDD

```
[0] CARGAR  — leer INDEX.acm y las capas del scope
[1] Análisis — business-analyst lee spec + mapas
[2] Arquitectura — architect planifica con contexto real
[3] Spec    — sdd-spec-writer genera spec ejecutable
[4] Impl    — {lang}-developer implementa con mapas cargados
[5] QA      — test-engineer valida cobertura
[post-SDD]  ACTUALIZAR — bash scripts/refresh-agent-maps.sh <slug> + revisar .acm afectados
```

## Gemelo humano: .hcm

Cada `.acm` tiene un gemelo narrativo `.hcm` en `.human-maps/` (skill
`human-code-map`). `.acm` responde *qué existe y dónde* para agentes;
`.hcm` responde *por qué existe y cómo pensarlo* para humanos. Si el
hash del `.acm` cambia, el `.hcm` debe marcarse stale (a mano: no hay automatismo).

## Motor opcional: CodeGraph MCP

Si el MCP `codegraph` está activo (ver `.claude/skills/codegraph/SKILL.md`),
el agente puede usar su índice para redactar los `.acm` por capa y
`codegraph status --json` para juzgar frescura. No hay proyección automática
índice → `.acm`: es trabajo del agente. Sin CodeGraph, grep + lectura dirigida.
Confidencialidad: `.codegraph/` debe estar gitignored. Prohibido en N4b
(ver `docs/rules/domain/codegraph-confidentiality.md`).

## Anti-patterns

- **NUNCA** generar .acm con datos de proyectos privados de cliente (→ N4)
- **NUNCA** commitear .acm con información sensible al repo público
- **NUNCA** crear .acm de más de 150 líneas — dividir siempre
- **NUNCA** usar .acm `roto` sin regenerar primero

Attribution

gonzalezpazmonicagonzalezpazmonica
View sourceSee grades on GitHubMore from gonzalezpazmonica →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →