Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/jzl-maker/ea-skill/mapgit clone --depth 1 https://github.com/jzl-maker/EA-SKILLWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01253 |
| Opus 5 | $0.00000 | $0.00626 |
| Sonnet 5 | $0.00000 | $0.00251 |
| Haiku 4.5 | $0.00000 | $0.00125 |
Grade A, and why
map scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
命令: /ea map (Map 文件解析)
功能
解析 Keil 编译生成的 .map 文件,输出 对象内存排行 / 内存分段分布 / 符号地址映射 / 栈堆详情,用于定位内存大户、核对链接布局、查符号地址。
| 能力 | 参数 | 数据来源 |
|---|---|---|
| 对象内存排行 | --objects [N] |
Image component sizes(逐 .o 的 Code/RO/RW/ZI) |
| 内存分段分布 | --regions |
Execution Region(exec/load base、size、max、使用率) |
| 符号排行/查询 | --symbols [FILTER] |
Global Symbols + Image Symbol Table |
| 栈/堆详情 | --stack |
STACK/HEAP Section + __initial_sp/__heap_base 地址 |
适用:Keil MDK 工程(armcc v5 / armclang v6 的 .map 格式)。GCC/其他工具链暂不支持。
调用方式
py ~/.claude/skills/ea-skill/tools/resource/scripts/map_tool.py --project <工程目录>
# 自动扫描工程下最新 .map → 默认对象排行
# 显式指定 .map
py .../map_tool.py --map build/xxx.map --objects # 对象排行(默认)
py .../map_tool.py --map build/xxx.map --objects --top 5 # 只看前 5
# 内存分段分布
py .../map_tool.py --map build/xxx.map --regions
# 符号排行(size>0 按字节降序)
py .../map_tool.py --map build/xxx.map --symbols
# 精确查符号地址映射(名字子串 或 0x 地址)
py .../map_tool.py --map build/xxx.map --symbols __initial_sp
# 栈/堆详情
py .../map_tool.py --map build/xxx.map --stack
参数表
| 参数 | 必须 | 说明 |
|---|---|---|
--map <file> |
是(动作) | 显式指定 .map 文件 |
--project <dir> |
是(动作) | 工程目录,扫描最新 .map |
--objects |
是(动作,默认) | 对象内存排行 |
--regions |
是(动作) | 内存分段分布 |
--symbols [FILTER] |
是(动作) | 符号排行;带名字/地址过滤则精确查询 |
--stack |
是(动作) | 栈/堆详情 |
--top N |
否 | 排行条数(默认 20) |
--json |
否 | 结构化 JSON 输出(整个解析结果) |
--dry-run |
否 | 只打印流程不解析 |
工作流程(AI 执行闭环)
1. 定位 .map --project 扫描,或 --map 显式指定
2. 按需取数:
--objects 哪个 .o 占内存最多(字库/协议栈/业务模块)
--regions 代码/数据落在哪些区,各区使用率(核对链接脚本)
--symbols 找内存大户变量/函数,或查某符号的地址(配合 /ea debug 断点)
--stack 栈/堆分配量 + 初始 SP 地址
3. 分析 内存占比是否合理 → 定位优化对象或异常区
示例闭环:/ea map --objects --top 10 → ehfont_init.o(.constdata 字库 25KB)占大头 → 判断字库是否该挪外部 Flash。
注意事项
- 排行口径:对象按
Code+RO+RW+ZI总量降序;符号只列size>0的(Section/Data/Code 类型),Number调试符号已过滤。 --symbols FILTER是子串匹配,0x开头按地址精确匹配;空过滤(--symbols不带值)则排行。- 栈/堆是分配量:STACK/HEAP 是 startup 定义值;运行期峰值用
/ea debug读 SP 测量。 - GBK 编码兼容:工程路径含中文时 .map 可能是 GBK 编码,解析器自动回退。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 86 lines · 0 tokens per session scan A 973210516559
map is a command published in the GitHub repository jzl-maker/EA-SKILL (4 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,253 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
icpg-bootstrap
Infer ReasonNodes from existing git commit history. One-time setup for existing codebases.
version
Display current guide and Claude Code versions.
go-review
Go code review for idiomatic patterns.
review-branch
Review the current branch's diff against base by dispatching atomic-reviewer. No orchestration loop, no spec required — pre-flight before /commit pr or /commit merge.
execute
Executa o plano aprovado em .first-plan/07-state/plans/. Segue o plano à risca, para se algo invalidar premissa, gera relatório ao final.
dispatcher
Pick the next-best repo to work on across the portfolio — rank free repos, recommend one, claim its lease atomically, and route to the entry command.