AGENT SKILL

memory

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.

License 许可
MIT
所属仓库
yc-software/qm
最近更新
2026-11-15
Stars
★ 1.6w
Forks
2.0k

01 前言 Front Matter

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.

03 SKILL.md 正文

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 -sS --fail-with-body -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).

A member's own memory brain

A member who runs their own gbrain can make it their personal memory, on a turn they sent (triggered turns are refused). Call the self-API as them:

  1. GET $AGENT_API_URL/v1/memory/brain returns what they have connected and principalId, the id their gbrain must link to their gbrain member. On their gbrain they also need a confidential client-credentials client that may attest an actor.
  2. PUT $AGENT_API_URL/v1/memory/brain with {"url":"https://…/mcp","clientId":"…"} (optionally label). The URL must be public https://. Never ask for or send the client secret: clientSecret is refused here.
  3. Mint the secret link for the returned brain.id (see the secret-drop skill). The form shows them where their memory goes before they submit.
  4. disabled in the reply says why it isn't serving: secret_missing until they use the link, member_brains_off when an org admin has turned members' brains off.

Once it serves, recall and explicit writes for their personal memory also go to that brain, attested as them, and their notebook keeps working. DELETE disconnects it.

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.
  • 502 with an application/problem+json body from /v1/memory/facts or /v1/memory/search — a memory provider failed. added (or results) is what still worked, and each entry in problems names the provider, what happened and a fix. Don't send the same facts again; tell the user which provider failed and its fix.

04 同仓库更多 Skills

yc-software
yc-software/qm

zoom

Find, create, reschedule, and cancel the user's Zoom meetings through their own Zoom connection.

★ 1.6w
yc-software
yc-software/qm

use-shared-credential

When you need to call a service the org has a SHARED credential for (a SERP/search key, a paid-API key, a data-vendor feed, a Git remote) — and the platform has told you that credential is available to this conversation — make the call BY PROXY through the credential broker. You never see the secret; the core stamps it onto the outbound request for you.

★ 1.6w
yc-software
yc-software/qm

ui-state

See what the person is looking at in the QM web UI right now — the whole page (sidebar, every multiview pane, open dialogs) as raw HTML, the app's state as JSON, optionally the CSS and a screenshot. Use when they ask about something on their screen, want help with the UI, or you need to check what a canvas you wrote actually rendered.

★ 1.6w
yc-software
yc-software/qm

ui-canvas

Draw your own HTML/CSS/JS as a full-window overlay on top of the QM web UI — a dashboard, a form, a visualization, controls that message you back. Write, update, replace, pin or dismiss it. Use when an interactive or visual result beats a chat reply.

★ 1.6w
yc-software
yc-software/qm

taste-skill

Design taste and process for anything a person will look at in a browser — landing page, dashboard, prototype, deck. The default design driver for a browsable artifact, with an anti-slop playbook for the visual language.

★ 1.6w
yc-software
yc-software/qm

slack-drafts

Create Slack message drafts in the user's own composer, as the user, through their per-user Slack OAuth. Drafting only — the user reviews and sends from Slack.

★ 1.6w