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 skills add anymouschina/TapCanvas --skill cognitive-memorygit clone --depth 1 https://github.com/anymouschina/TapCanvasWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/anymouschina/tapcanvas/cognitive-memory)<a href="https://agentmods.dev/skills/anymouschina/tapcanvas/cognitive-memory"><img src="https://agentmods.dev/badge/skills/anymouschina/tapcanvas/cognitive-memory.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.00999 |
| Opus 5 | $0.00026 | $0.00500 |
| Sonnet 5 | $0.00010 | $0.00200 |
| Haiku 4.5 | $0.00005 | $0.00100 |
Grade A, and why
cognitive-memory 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 8d 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.
What it actually says
cognitive-memory
目标:让 agents-cli 在任务中具备“可管理、可检索、可归档、可续跑”的长期记忆能力,而不是仅依赖会话上下文。
适用场景
在以下场景优先加载本技能:
- 用户明确要求“记住/别忘了/以后按这个做”。
- 任务跨多轮、跨会话,且需要稳定复用历史结论。
- 多代理协作,需要共享读、受控写。
- 需要把阶段结果写入本地记忆索引并支持“继续”。
工具契约(agents-cli)
本技能默认使用这些工具:
memory_save({ content, tags?, store?, source?, importance? })memory_search({ query, limit?, store?, includeArchived? })memory_forget({ id? | query? })memory_reflect({ query?, limit?, minDecayScore?, requestedTokens?, extraTokens?, penaltyTokens?, extraReason?, penaltyReason? })memory_reflect_commit({ reflectionId, decision, approvedTokens, reason })- 必要时配合
read_file/write_file写入结构化索引文件。
记忆分层规则
core: 始终高优先级的长期约束与偏好。episodic: 本次执行过程中的阶段事实、异常、修复记录。semantic: 实体/关系/业务知识(例如角色关系、术语、领域映射)。procedural: 可复用流程、模板、操作策略。vault: 用户明确指定“永久保留、不要自动淡化”的关键记忆。
写入规范
每次写入 memory_save 时必须满足:
content为可复用事实,不写空话。tags至少包含任务域和对象(例如book-metadata,novel:xxx)。source记录来源技能或流程(例如agents-team-book-metadata)。importance按 0~1 给出,核心约束建议 >= 0.8。
检索规范
- 回答前先
memory_search(至少 1 次)验证历史记忆。 - 查询词必须包含主体 + 任务域(如
my-book metadata characterGraph)。 - 命中冲突时,先返回冲突点,再请求用户确认,不允许私自覆盖。
遗忘规范
仅在以下条件允许 memory_forget:
- 用户明确要求遗忘。
- 记忆被证实错误且已保留替代版本。
遗忘是归档,不是物理删除;必须在回复中说明归档对象。
反思审批流程(工具化)
- 调用
memory_reflect生成待审批反思草案(会写入meta/pending-reflection.json|md)。 - 将
reflectionId与 token 申请摘要展示给用户,等待明确批准/减少/拒绝。 - 用户决策后调用
memory_reflect_commit:
approved/reduced: 写入meta/reflections/*、meta/reflection-log.md、meta/rewards/*、meta/reward-log.md。rejected: 仅记录奖励决策到 rewards/reward-log,不生成正式 reflection。
- 未经用户审批,禁止直接落盘正式反思结果。
多代理治理
- 所有子代理可以读记忆。
- 只有主代理可以执行最终写入;子代理只产出候选内容。
- 主代理在写入前必须做去重、冲突检查和来源标注。
与本地文件索引协同
对长流程任务,除 memory_* 外,还应写入 .agents/memory/.../index.json:
progress:当前阶段与下一个动作。artifacts:关键产物路径。updatedAt:最后更新时间。
当用户说“继续”时:
- 先读
index.json和progress。 - 再做
memory_search交叉校验。 - 状态一致才继续执行;不一致直接报错并说明差异。
What ships with it
26 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- _meta.json 818 B
- assets/templates/agents-memory-block.md 7.2 KB
- assets/templates/decay-scores.json 539 B
- assets/templates/entity-template.md 348 B
- assets/templates/episode-template.md 279 B
- assets/templates/evolution.md 761 B
- assets/templates/graph-index.md 317 B
- assets/templates/IDENTITY.md 1.9 KB
- assets/templates/MEMORY.md 850 B
- assets/templates/pending-memories.md 511 B
- assets/templates/pending-reflection.md 1.7 KB
- assets/templates/procedure-template.md 321 B
- assets/templates/reflection-log.md 579 B
- assets/templates/relations.md 508 B
- assets/templates/reward-log.md 256 B
- assets/templates/reward-template.md 1.0 KB
- assets/templates/SOUL.md 3.2 KB
- references/architecture.md 55 KB
- references/reflection-process.md 41 KB
- references/routing-prompt.md 1.7 KB
- scripts/init_memory.sh 5.1 KB runs code
- scripts/upgrade_to_1.0.6.sh 9.1 KB runs code
- scripts/upgrade_to_1.0.7.sh 7.7 KB runs code
- upgrade_to_1.0.7.sh 7.7 KB runs code
- UPGRADE-1.0.7.md 6.8 KB
- UPGRADE.md 6.8 KB
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.
- 8d ago First seen · 90 lines · 51 tokens per session scan A edc585187050
cognitive-memory is a skill published in the GitHub repository anymouschina/TapCanvas (600 stars, last pushed 2d ago), licensed MIT. It adds 51 tokens to every session and 999 once invoked, about $0.0003 per session on Opus 5. 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-30.
Other skills, from other repositories
capabilities
Your capability catalog — read this at boot. Lists the temporal date-range skills and the external integrations (reached via the loopback broker) available to you as a spawned worker, and exactly how to call each. Read-only. Consult it whenever you're unsure what tools/integrations you have or how to invoke them.
temporal
Resolve ANY named time window — today, yesterday, thisWeek, lastWeek, last7Days, last30Days, last90Days, thisMonth, lastMonth, thisQuarter, lastQuarter, thisYear, lastYear, last12Months — or an arbitrary range (lastNdays / lastNweeks / lastNmonths) to a concrete ISO date range relative to your run time. Read-only: no…
md-audit
Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…
last30Days
Resolve "last30Days" to a concrete ISO date range relative to your run time — a rolling 30-day window ending today. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a "last 30 days" / trailing-month task…
thisQuarter
Resolve "thisQuarter" to a concrete ISO date range relative to your run time — this quarter so far (quarter start → today). Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a quarter-to-date task (QTD…
thisWeek
Resolve "thisWeek" to a concrete ISO date range relative to your run time — this week so far (Monday → today). Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a week-to-date task (this week's activity…