rec

A project-recovery command that reads a small set of status files and shows the current work and next action.

In plain words
What is it for?
Use it when returning to an embedded-software project and needing a quick view of its status, focus, warnings, and next step.
Why use it?
It restores the important project context without loading every history and specification file into the session.

Command

Install

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.

agentmods
npx agentmods add commands/jzl-maker/ea-skill/rec
Clone the repo
git clone --depth 1 https://github.com/jzl-maker/EA-SKILL
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00496
Opus 5 $0.00000 $0.00248
Sonnet 5 $0.00000 $0.00099
Haiku 4.5 $0.00000 $0.00050

Measured 2d ago against content hash 7a5ded5d4acd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rec 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 2d ago.

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.

commands/rec.md · 45 lines

What it actually says

命令: /ea rec (恢复项目)

功能

最小代价加载项目当前状态。只读 state.md(≤50 行)+ context.md 摘要,按需查询详情。

触发

/ea rec [项目名称|路径]

加载策略(瘦身设计)

加载层 文件 何时读
L0 默认 <STATE_DIR>/state.md 总是(≤50 行)
L1 类型 <STATE_DIR>/project.json 总是(< 20 行)
L2 上下文 <STATE_DIR>/context.md 总是(摘要:芯片/模块/保护区)
L3 详情 project-spec.md / problem-log.md / sessions/<id>.md 按需(用户问到才读)

执行流程

  1. 【状态目录】 get_state_dir().ea/ 优先,回退 .em/(老项目兼容)
  2. 【最小加载】state.md + project.json + context.md 摘要
  3. 【上下文摘要】 从 context.md 输出一行关键信息(芯片/当前焦点/保护区警告)
  4. 【输出摘要 + 下一步】

摘要输出格式

📂 项目恢复完成 — <项目名>  (embedded)
芯片: GD32F407VET6 | 焦点: 显示模块
当前步骤: S3 — 验证中
下一步:   <state.md 第 1 条 next-action>
详情命令: /ea stat -v

设计原则

  • ❌ 不再一次性灌入 memory-log/project-spec/problem-log 全文
  • ✅ rec 只回答「我现在该做什么」+ 工程上下文要点,详情按需查

相关文件

  • templates/state.md — state 模板
  • templates/context.md — 工程上下文模板
  • commands/stat.md — 详细状态查询(-v 全景)
Changes

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.

  1. 2d ago First seen · 45 lines · 0 tokens per session scan A 7a5ded5d4acd

Subscribe to this mod's changes

rec is a command published in the GitHub repository jzl-maker/EA-SKILL (6 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 496 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.