Skip to main content
rule CX Codex

codemap-inject.en — Claude Code rule: what it does, how to install

codemap-inject.en is a Claude Code rule that injects codebase maps into subagent prompts matching map keywords. The subagent reads the map first and lists new symbols to append upon completion.

Apache-2.0 ★ 262 updated 2026-11-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/codemap-inject.en.md
Open on GitHub

What codemap-inject.en does

The rule scans the {{CODEMAPS}} directory and adds a prompt instruction whenever a subagent task matches map keywords. The agent reads the referenced map before touching the code.

Upon finishing its task, the subagent outputs an update section where each found item follows the - symbol file:line format. These lines append directly to the target map. The exact structure of map files is defined in the directory's README.md.

What it helps with

  • inject relevant code maps into subagent prompts using keyword matching
  • collect discovered symbols with file paths and line numbers
  • append new code references to maps in {{CODEMAPS}} automatically

Example prompts for the agent

  • Run a subagent to refactor auth logic and follow the matched map in {{CODEMAPS}}
  • Inspect the task against code maps and append new symbols to the report

How to install codemap-inject.en

Manually: put the files in place

.claude/rules/codemap-inject.en.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about codemap-inject.en

How to install codemap-inject.en in Claude Code?

Save the rule content to .claude/rules/codemap-inject.en.md in your project repository.

What does codemap-inject.en do?

It matches subagent tasks against code maps in {{CODEMAPS}} and directs the agent to read the matching map before starting.

How does the subagent report missing map entries?

The subagent ends its summary with lines formatted as - symbol file:line, which are appended to the map once the task stops.

Source text

codemap-inject.en.md · Apache-2.0
- Code maps (codemap-inject, codemap-fill): when a subagent's task matches the keywords of a map in `{{CODEMAPS}}`, its prompt gets a note to read that map first; the subagent ends its report with a section "## 地图要补的条目(<map path>)" (that exact heading), one line "- symbol file:line" each, which is appended to the map when it stops. The map format is in that directory's README.md.

© zuiho-kai · Apache-2.0 · zuiho-kai/bothouse

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set14

The whole set →
websearch.en websearch.en is a Claude Code rule directing the agent to search the web using a local websearch.py script. It triggers on queries about versions, news, dates, and prices. CX Codex +1 ★ 262repo stars peek.en peek.en is a Claude Code rule that tracks teammates' progress. Running peek.py inspects bot activity and recent actions without searching through session logs. CX Codex +1 ★ 262repo stars watchvid.en watchvid.en is a Claude Code rule that processes video links through a script and an index of materials to read. It activates when the agent receives a video link. CX Codex +1 ★ 262repo stars dsh-cc-compat.en dsh-cc-compat.en is a Claude Code rule that keeps DSH role switches, tool names, and Stop conversion aligned across sessions. CX Codex +1 ★ 262repo stars choice-ask-guard.en choice-ask-guard.en is a Claude Code rule that checks agent questions against decisions already made and leaves open choices to the user. CX Codex +1 ★ 262repo stars param-source-guard.en The param-source-guard.en rule for Claude Code requires every new numeric parameter in code to include a source comment. It tracks limits, thresholds, and windows to ensure they trace back to user input, specs, or measurements. CX Codex +1 ★ 262repo stars wiki-context.en wiki-context.en is a Claude Code rule that reads relevant wiki hints and lesson entries during a terminal session. CX Codex +1 ★ 262repo stars _head.en _head.en is a Claude Code rule that controls tool call validation through external hooks. It blocks unauthorized bypasses and lets users toggle safety checks on demand. CX Codex +1 ★ 262repo stars

Project sponsors

Companies that keep this analytics open