Agent Skills › yc-software/qm › memory

memory

GitHub

提供长时记忆的搜索、写入和整理功能,支持跨笔记本检索、事实持久化及错误清理。

skills-seed/memory/SKILL.md yc-software/qm

Trigger Scenarios

用户询问特定人物或项目信息 需要立即保存重要事实以供后续使用 发现记忆条目过时或错误需清理

Install

npx skills add yc-software/qm --skill memory -g -y
More Options

Non-standard path

npx skills add https://github.com/yc-software/qm/tree/main/skills-seed/memory -g -y

Use without installing

npx skills use yc-software/qm@memory

指定 Agent (Claude Code)

npx skills add yc-software/qm --skill memory -a claude-code -g -y

安装 repo 全部 skill

npx skills add yc-software/qm --all -g -y

预览 repo 内 skill

npx skills add yc-software/qm --list

SKILL.md

Frontmatter
{
    "name": "memory",
    "description": "Deliberately search, add to, or curate your long-term memory with the `memory` tool — beyond the automatic recall\/capture every turn already does. Use when asked who someone is or what they're working on, when you learn a durable fact worth keeping now, or when your notebook holds stale or wrong entries you should clean up."
}

memory — search, write, and curate what you remember

Everything here goes through the typed memory tool. Memory is NOT a file: writing memory/MEMORY.md with files action write or shell commands lands on your computer's disk and is silently lost — the tool is the one real path.

Every turn already auto-recalls a bounded selection from your notebooks into "## What you remember" and auto-extracts facts after you reply. This skill is for what the automatic path misses:

  • Search (action: "search") — what you remember is bigger than what auto-recall injects. Search spans every notebook this conversation may read (personal, channel, org); when more than one is in reach, each hit is tagged with the notebook it came from. Matching is substring-based (all terms must match), so prefer distinctive terms (a name, a project) over sentences. An empty result means those terms found no match, not that nothing is recorded. Try fewer terms or alternate wording before concluding a fact is absent.
  • Read another notebook (action: "read", scope: "channel:…") — use the exact scope ID from a search result to load that authorized notebook. search accepts scope too, to narrow a query. Omit it to search all authorized notebooks or read the current notebook. Access comes from this turn's sharing policy; naming a scope never grants access. Other notebooks are read-only.
  • Write now (action: "add", facts: [{text}, …]) — when the user corrects you or tells you something they'll expect you to know later, persist it immediately instead of hoping post-turn extraction catches it. Write self-contained facts (who/what, with enough context to be useful cold). Duplicates are dropped; added in the reply is the count actually new.
  • Curate (action: "edit" with facts: [{id, text}, …], action: "delete" with ids) — search or read to get each fact's #id, then fix facts that changed and delete stale, duplicate, or wrong ones. A call naming any id that isn't in this conversation's notebook changes nothing and lists the bad ids. Curation is for quality — merging duplicates, deleting disproven facts — not for deleting things the user asked you to remember.

The notebook you write is this conversation's own (your personal one in a DM, the channel's in a channel). Other authorized notebooks can be searched/read, not rewritten here.

The org-admin write path uses the self-API instead, called with $AGENT_API_URL and $AGENT_API_TOKEN (both already in your environment on every turn — if they are unset, this instance has no self-API; say so rather than pretending).

Org-wide notebook (admins)

When the chatting user is an org admin, the self-API additionally accepts the org-wide notebook as a target:

curl -fsS -X POST "$AGENT_API_URL/v1/memory/facts" \
  -H "x-agent-capability: $AGENT_API_TOKEN" \
  -H "content-type: application/json" \
  -d '{"scope":"org","facts":["..."]}'

(?scope=org on GET /v1/memory/self; "scope":"org" in the body of PATCH /v1/memory/facts with {"facts":[{"id","text"}]} or DELETE /v1/memory/facts with {"ids":[…]} to curate.) Those writes land in the notebook every conversation in the org recalls, so confirm the wording with the admin before writing and keep personal facts out of it. A 403 org memory writes require an org admin means the user isn't one — say so rather than retrying (GET $AGENT_API_URL/v1/admin/whoami answers it definitively).

Failure modes

  • "memory isn't available in this conversation" — this conversation's memory policy forbids it; don't retry, just say memory is off here.
  • On a read-only wake (a heartbeat glance), memory can be searched and read but not written — save the fact on a normal turn instead.
  • 401 unauthorized from the self-API — your token expired mid-turn; this resolves on the next turn.

Version History

  • 6803edb Current 2026-10-18 18:21

    重构为基于事实行的存储结构,引入语义回忆与向量嵌入,移除重写操作。

  • b6abeaf 2026-09-27 12:30

    对齐技能与资源工具目录,保留Memorable CLI边界语义,使用显式分支映射CLI操作。

  • 7f2c916 2026-08-02 21:47

Same Skill Collection

.claude/skills/dev-instance/SKILL.md
.claude/skills/update-qm/SKILL.md
.claude/skills/upstream-pr/SKILL.md
.codex/skills/deploy-qm/SKILL.md
.codex/skills/dev-instance/SKILL.md
.codex/skills/update-qm/SKILL.md
.codex/skills/upstream-pr/SKILL.md
cli/templates/deployment/SKILL.md
plugins/onboarding/skills/onboarding/SKILL.md
skills-seed/admin/SKILL.md
skills-seed/browse/SKILL.md
skills-seed/cloud-cli/SKILL.md
skills-seed/composio/SKILL.md
skills-seed/connect-apps/SKILL.md
skills-seed/define-loop/SKILL.md
skills-seed/dropbox/SKILL.md
skills-seed/email-draft-in-voice/SKILL.md
skills-seed/email-voice-profile/SKILL.md
skills-seed/github-gitlab/SKILL.md
skills-seed/google-drive-sheets/SKILL.md
skills-seed/google-workspace/SKILL.md
skills-seed/hand-off/SKILL.md
skills-seed/interactive-login/SKILL.md
skills-seed/linear/SKILL.md
skills-seed/miniapp/SKILL.md
skills-seed/morning-digest/SKILL.md
skills-seed/popular-web-designs/SKILL.md
skills-seed/publish/SKILL.md
skills-seed/request-access/SKILL.md
skills-seed/send/SKILL.md
skills-seed/slack-drafts/SKILL.md
skills-seed/taste-skill/SKILL.md
skills-seed/ui-canvas/SKILL.md
skills-seed/ui-state/SKILL.md
skills-seed/use-shared-credential/SKILL.md

Metadata

Files
0
Version
6803edb
Hash
d2bc5197
Indexed
2026-08-02 21:47

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-21 01:22
浙ICP备14020137号-1