Invoke this skill when: modifying any CLAUDE.md file, adding a new skill or agent to a plugin, user says 'update the skill map', 'add this to the map', 'register this agent', 'skills keep getting forgotten', 'I keep forgetting which skill to use', 'agents keep getting forgotten', 'add skill map', 'update agent map', 'sync skills to CLAUDE.md', or when setting up a new project. This skill injects compressed SKILL-MAP and AGENT-MAP directive blocks into CLAUDE.md so skill names and agent IDs persist across the session without fading from context. Skipping this means agents will forget skill names mid-session, fail to invoke the right skill, and guess at agent IDs — causing silent capability loss that is hard to diagnose.
From bopen-toolsnpx claudepluginhub b-open-io/claude-plugins --plugin bopen-toolsThis skill uses the workspace's default tool permissions.
references/common-mappings.mdreferences/vercel-research.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Inject compressed skill-mapping and agent-mapping directives into a project's CLAUDE.md file so skill names, agent IDs, and invocation triggers persist across the entire session without being lost to context drift.
LLMs lose track of skill names, agent IDs, and invocation details as conversation context grows. Skills and agents load at session start but fade from working memory mid-session, causing the agent to guess names, skip invocations, or fail to delegate to the right specialist.
Vercel's research found that passive context embedded in project files outperforms active skill retrieval — 100% vs 79% pass rate in agent evals. Embed a compressed skill map directly in CLAUDE.md using the same directive pattern.
Reference: https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals
For detailed research findings, consult references/vercel-research.md.
| Tool | File |
|---|---|
| Claude Code | CLAUDE.md |
| Cursor | AGENTS.md |
| Other agents | AGENTS.md |
For Claude Code projects, inject into CLAUDE.md. For multi-tool projects, consider both files.
Two separate single-line blocks — one for skills, one for agents. Both use the same pipe-delimited format wrapped in HTML comments.
<!-- SKILL-MAP-START -->STOP. You WILL forget skill names mid-session. Check this map before ANY task.|task-trigger→Skill(exact-skill-name)|another-trigger→Skill(another-skill)<!-- SKILL-MAP-END -->
<!-- AGENT-MAP-START -->STOP. You WILL forget agent IDs mid-session. Check this map before delegating any complex task.|task-trigger→Agent(plugin:agent-id)|another-trigger→Agent(plugin:agent-id)<!-- AGENT-MAP-END -->
Agent IDs use plugin:agent-name format matching the subagent_type parameter of the Agent tool (e.g., bopen-tools:code-auditor, bopen-tools:designer, gemskills:content).
| separates each entry→ maps trigger to invocationSkill(namespace:*) for skill families (e.g., bsv-skills:*)Delegate the inventory gathering to a subagent to keep the main context window clean:
Agent(prompt: "Gather skill and agent inventories from all available sources.
SKILLS — check two sources:
1. The system-reminder skill list (from the Skill tool's available skills in system-reminder messages)
2. ls ~/.claude/skills/ for user-installed skills
AGENTS — check two sources:
1. The system-reminder agent list (Agent tool's available subagent types)
2. ls ~/.claude/plugins/cache/*/agents/ for plugin agents
Cross-reference both sources for each category.
Return two lists:
- SKILLS: name, plugin (if any), one-line description
- AGENTS: plugin:agent-id, one-line description",
subagent_type: "general-purpose")
Delegate project analysis to a subagent:
Agent(prompt: "Analyze this project and identify which skills and agents are relevant.
1. Read CLAUDE.md — identify tech stack, frameworks, tools
2. Check package.json / go.mod / Cargo.toml — map dependencies to skills
3. Scan recent git history (git log --oneline -20) — identify recurring work patterns
4. Check for past Skill() and Agent() invocations if conversation history is available
Consult references/common-mappings.md for the trigger-to-skill and trigger-to-agent mapping table.
Return two structured lists:
- RELEVANT SKILLS: trigger phrase → Skill(exact-name)
- RELEVANT AGENTS: trigger phrase → Agent(plugin:agent-id)",
subagent_type: "general-purpose")
If the project uses Next.js, run the official codemod for framework docs:
npx @next/codemod@canary agents-md --version <version-from-package.json> --output AGENTS.md
This creates a separate compressed Next.js docs index in AGENTS.md. The skill map is independent and goes in CLAUDE.md.
If the project does not use Next.js, skip this step entirely.
Construct the compressed skill directive. Only include skills relevant to the project's stack. Refer to references/common-mappings.md for the full trigger-to-skill reference table.
Construct the compressed agent directive. Only include agents relevant to the types of tasks that commonly arise in this project. Use the plugin:agent-name format exactly. Refer to references/common-mappings.md for the trigger-to-agent table.
Place both maps near the top of CLAUDE.md, one after the other. If the file has YAML frontmatter (--- delimiters), place both blocks after the closing --- but before the first heading or content.
---
description: Project description
globs: "*.ts"
---
<!-- SKILL-MAP-START -->STOP. You WILL forget skill names mid-session. Check this map before ANY task.|trigger→Skill(name)|...<!-- SKILL-MAP-END -->
<!-- AGENT-MAP-START -->STOP. You WILL forget agent IDs mid-session. Check this map before delegating any complex task.|trigger→Agent(plugin:agent-id)|...<!-- AGENT-MAP-END -->
## Project Overview
...
Or without frontmatter:
# CLAUDE.md
<!-- SKILL-MAP-START -->STOP. You WILL forget skill names mid-session. Check this map before ANY task.|trigger→Skill(name)|...<!-- SKILL-MAP-END -->
<!-- AGENT-MAP-START -->STOP. You WILL forget agent IDs mid-session. Check this map before delegating any complex task.|trigger→Agent(plugin:agent-id)|...<!-- AGENT-MAP-END -->
## Project Overview
...
If the user only wants one block (e.g., only agents, not skills), inject only the relevant block.
plugin:agent-name format (match the Agent tool's available subagent types)--- delimiters<!-- SKILL-MAP-START -->...<!-- SKILL-MAP-END --> and/or <!-- AGENT-MAP-START -->...<!-- AGENT-MAP-END --> blocksreferences/vercel-research.md — Detailed summary of Vercel's AGENTS.md research: methodology, eval results, three factors for passive context superiority, and compression technique detailsreferences/common-mappings.md — Comprehensive trigger-to-skill mapping table organized by category (workflow, quality, frontend, video, marketing, auth, infrastructure, desktop)