用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dwsy/agent --skill memory-retro命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | memory-retro |
| description | Save insights from completed tasks to role memory. |
| whenToUse | After completing any task involving code changes, architectural decisions, debugging, or non-trivial problem solving. Distill what you learned into reusable memories so future sessions can benefit. Invoke proactively at task end — do not wait for the user to ask. |
You have access to a role-based persistent memory system. After completing this task, reflect on what you learned and save valuable insights.
| Tool | Purpose |
|---|---|
memory({ action: "add_learning", content: "..." }) | Save a durable insight. LLM auto-extracts tags. Auto-deduplicates. |
memory({ action: "add_preference", content: "...", category: "..." }) | Save a user preference. Goes directly to consolidated. |
memory({ action: "search", query: "..." }) | Check if similar memory already exists |
memory({ action: "reinforce", content: "..." }) | Increment [Nx] usage count for existing learning |
add_learning auto-deduplicates. Just call it — if similar text exists, it returns "Already stored". Then use reinforce instead.
memory({ action: "add_learning", content: "MyBatis-Plus getOne needs .last('LIMIT 1') to avoid TooManyResultsException" })
LLM auto-extracts tags (e.g., mybatis, gotcha). No manual tagging.
memory({ action: "add_preference", content: "用户偏好中文沟通,技术术语可保留英文", category: "Communication" })
memory({ action: "reinforce", content: "安全删除原则" })
→ "Reinforced [abc123] -> 6x"
Two paths to memory:
Auto-extract (agent_end, compaction)
→ pending.md [○] → search score ≥0.5 → auto-promote → consolidated [0x]
Manual (this tool)
→ consolidated [0x] directly
The pending layer filters noise. Only memories proven useful by actual usage survive. Manual entries skip pending because you're explicitly deciding they're worth keeping.
| Action | Effect | When |
|---|---|---|
reinforce | used+1 in consolidated | You used an existing memory |
| Search score ≥0.5 | auto-reinforce (used+1) | Found via search |
| Pending auto-promote | pending → consolidated | Pending entry is relevant |
consolidate | dedup + canonical rewrite | Routine maintenance |
| Category | When |
|---|---|
Communication | Language, style, tone |
Code | Style, conventions, abstraction |
Tools | CLI, editors, workflows |
Workflow | Process, review, deployment |
General | Everything else |
✅ Good:
memory({ action: "add_learning", content: "MyBatis-Plus getOne needs .last('LIMIT 1')" })
✅ Good (reinforce):
memory({ action: "reinforce", content: "安全删除原则" })
❌ Bad: "The user asked me to fix a bug" — too generic
❌ Bad: "Error at /src/index.ts:42" — copy-paste, no insight
add_learning auto-deduplicates — if similar exists, use reinforce instead.Operate Glimpse-APPs with progressive context — app list in system, domain detail via tools on demand.
Load prior knowledge from role memory before starting any task.
Use when user asks to design, choose, explain, or implement UI transitions, motion patterns, easing/timing choices, state-change animations, shared-element effects, drill-down navigation, tab/filter/list/detail switching, or vague requests like "make this feel smoother", "more iOS", "more natural", or "animate this UI" that need concrete motion taxonomy and implementation guidance.