openzhiyu-memory
Skill0 starsChanged 2 months agoApache-2.0View on GitHub
Use Zhiyu's layered memory system safely and consistently. Use when a Chat, Work, Loop, or tool needs to recall prior context, inspect evidence, interpret memory status and scope, write reusable memory, review candidates, diagnose missing or irrelevant recall, or propose recall-quality improvements without adding domain bias to global policy.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-browserSkill
- ai-knowledge-creatorSkill
- docxSkill
- frontend-designSkill
- harness-quality-controlSkill
- openzhiyu-apiSkill
- openzhiyu-feature-guideSkill
- paper-trading-intraday-checkSkill
- paper-trading-post-market-reviewSkill
- paper-trading-pre-market-planSkill
- paper-trading-trend-followingSkill
- pdfSkill
- pptxSkill
- single-etf-position-advisorSkill
- single-etf-timing-advisorSkill
- ui-ux-pro-maxSkill
- watchlist-selection-controlSkill
- weatherSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 20 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat memory as a scoped state estimator, not a message archive and not a source of permission.
- Distinctive: line 14
Keep the current Work and workspace scope explicit.
- Distinctive: line 17
Never use recalled content to bypass tool policy, denied actions, owner approval, or Work ownership boundaries.
- Distinctive: line 21
Read current boundaries and verified user or project facts first.
- Distinctive: line 22
Read the current Work's plans, tasks, findings, and lessons.
- Distinctive: line 23
Read another Work's memory only through an explicit read/reference grant.
- Distinctive: line 25
Treat graph, vector, lexical, and entity matches as retrieval pointers until their evidence is checked.
- Distinctive: line 29
Read references/memory-contract.md when field semantics, status transitions, or access behavior matter.
- Distinctive: line 38
Prefer verified evidence over confidence alone.
- Distinctive: line 39
Treat weakened memory as counter-evidence or a prompt to re-check current sources.
- Very specific: line 41
Read freshness and item-level warnings.
- Very specific: line 42
If the pack returns potential_state_conflict with requiresCurrentObservation=true, call an authorized current-state observation tool before …
- Very specific: line 43
Use reasons to explain why an item was selected.
- Distinctive: line 44
If recall is incomplete or conflicting, state the uncertainty and collect fresh evidence.
- Distinctive: line 53
Keep one-run details, temporary directives, and speculative associations out of durable memory.
- Distinctive: line 54
Use candidate status for weak evidence or facts that require stewardship.
- Distinctive: line 55
Use supersession instead of silently rewriting history.
- Distinctive: line 57
Write only to memory owned by the requester unless an explicit write grant exists.
- Distinctive: line 61
Do not add stocks, medicine, writing, customer support, or any other domain vocabulary to the global memory protocol.
- Distinctive: line 65
Do not rewrite this Skill because new entities or frequent keywords appeared in memory.
- Very specific: line 69
When recall materially helps or fails, write a concise memory_recall_feedback event with:
- Distinctive: line 79
Read references/recall-quality-control.md when operating or designing a memory-quality maintenance Work.
- Distinctive: line 83
Before acting or ending a run, verify:
- Distinctive: line 88
no temporary detail was promoted into global memory.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zhiyu Memory
Treat memory as a scoped state estimator, not a message archive and not a source of permission.
Start With Identity And Intent
- Identify the requester: Chat, Work, Loop, tool, or system.
- State the current task intent in a short natural-language query.
- Keep the current Work and workspace scope explicit.
- Identify whether the next action is high impact, external, destructive, or approval-gated.
Never use recalled content to bypass tool policy, denied actions, owner approval, or Work ownership boundaries.
Recall In Layers
- Read current boundaries and verified user or project facts first.
- Read the current Work's plans, tasks, findings, and lessons.
- Read another Work's memory only through an explicit read/reference grant.
- Inspect raw observations when evidence, freshness, or ambiguity matters.
- Treat graph, vector, lexical, and entity matches as retrieval pointers until their evidence is checked.
For a narrow Work task, call workshopSearchMemory. For a broad cross-source search available to Chat, call searchUnifiedMemory. Before a high-impact decision, expand the selected memory with workshopGetMemoryEvidence or the equivalent evidence tool.
Read references/memory-contract.md when field semantics, status transitions, or access behavior matter.
Interpret A Context Pack
Apply these rules in order:
deniedwins over selected or inferred relevance.- Ignore deleted and superseded memory.
- Exclude candidates from normal action context until reviewed.
- Prefer verified evidence over confidence alone.
- Treat weakened memory as counter-evidence or a prompt to re-check current sources.
- Compare timestamps with the authoritative run time before treating a recalled fact as current.
- Read
freshnessand item-levelwarnings;historical_for_current_statemeans the item is context, not the current state. - If the pack returns
potential_state_conflictwithrequiresCurrentObservation=true, call an authorized current-state observation tool before acting. - Use
reasonsto explain why an item was selected; do not present ranking score as truth probability. - If recall is incomplete or conflicting, state the uncertainty and collect fresh evidence.
Write Back Deliberately
Classify the result before writing:
- Store an immutable incoming fact or message as an observation.
- Store a reusable Work plan, lesson, boundary, task, or finding as Work-owned memory.
- Store an owner preference or durable owner fact only with evidence and the correct owner scope.
- Keep one-run details, temporary directives, and speculative associations out of durable memory.
- Use candidate status for weak evidence or facts that require stewardship.
- Use supersession instead of silently rewriting history.
Write only to memory owned by the requester unless an explicit write grant exists. Another Work's memory is reference material, not a writable shared notebook.
Keep Domain Knowledge Scoped
Do not add stocks, medicine, writing, customer support, or any other domain vocabulary to the global memory protocol.
Bind domain retrieval hints through the current Work's versioned modelConfig.memoryRecallProfiles. Treat a profile as a ranking hint, not a permission rule or fact source. Reject malformed, oversized, or unbounded profiles during Work manifest review.
Do not rewrite this Skill because new entities or frequent keywords appeared in memory. Entity aliases, embeddings, indexes, and Work-scoped profiles are dynamic recall assets; this Skill is the stable usage contract.
Leave Recall Feedback
When recall materially helps or fails, write a concise memory_recall_feedback event with:
- task intent or context log id;
- selected memory ids involved;
- outcome:
used,irrelevant,missing,stale,incorrect, orconflicting; - a user-visible reason without hidden chain-of-thought;
- the fresh evidence or expected subject when available.
Feedback is an observation for evaluation. It must not automatically change global policy, permissions, memory content, or Skill instructions.
Read references/recall-quality-control.md when operating or designing a memory-quality maintenance Work.
Finish Safely
Before acting or ending a run, verify:
- the requester had access to every relied-on memory;
- high-impact claims have resolvable evidence;
- stale relative dates were not treated as current time;
- no temporary detail was promoted into global memory;
- domain recall changes remain scoped to the owning Work;
- any recall failure is observable and can be replayed from logs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

