AgentSkillsCN

memory-save

以适当的去重机制与知识图谱结构,将对话、决策与洞见保存至Basic Memory。当用户说“保存这个”“记住这个”“写入记忆”“记录这次对话”“记录这项决策”,或当一次对话中包含了值得留存的重要决策、新发现或行动事项时,可使用此功能。此外,在高效对话结束时,还可主动提供关键收获的保存建议。

SKILL.md
--- frontmatter
name: memory-save
description: "Save conversations, decisions, and insights to Basic Memory with proper deduplication and knowledge graph structure. Use when the user says 'save this', 'remember this', 'write to memory', 'document this conversation', 'capture this decision', or when a conversation contains important decisions, discoveries, or action items worth preserving. Also use at the end of productive sessions to offer saving key takeaways."

Save to Basic Memory

Record conversations and insights as structured knowledge graph entries, avoiding duplicates and building rich connections.

Workflow

Step 1: Identify what to save

Determine the note type from the conversation:

TypeWhenFolder
DecisionA choice was made with rationaledecisions/
DiscoveryA problem was diagnosed or insight founddiscoveries/
ConversationGeneral discussion worth preservingconversations/
PlanAction items or roadmap discussedplanning/
LearningNew technique or knowledge gainedlearnings/

Step 2: Search for existing notes (MANDATORY)

Before creating anything, search for existing content:

code
search_notes(query="<topic keywords>", project="<project>")
search_notes(query="<alternate terms>", search_type="title", project="<project>")

If existing note found on this topic: use edit_note(operation="append") to add new observations and relations. Do NOT create a duplicate.

If no existing note: proceed to Step 3.

Step 3: Structure the note

Use the templates in references/note-templates.md for the appropriate note type.

Required elements:

  • Title: descriptive, prefixed with type (e.g., "Decision: Use PostgreSQL")
  • 3+ observations with [category] prefixes
  • 2+ relations with [[exact entity titles]] from search results
  • Relevant #tags on observations

Category reference: [decision], [fact], [technique], [requirement], [insight], [problem], [solution], [action]

Relation type reference: implements, requires, part_of, extends, contrasts_with, caused_by, leads_to, follows, affects

Step 4: Search for relation targets

Before writing, search for entities to reference in relations:

code
search_notes(query="<related topic>", project="<project>")

Use exact titles from results in [[wikilinks]]. Forward references (to entities that don't exist yet) are OK — they auto-resolve when the target is created later.

Step 5: Save and confirm

code
write_note(title="...", content="...", folder="...", tags=[...], project="<project>")

After saving, confirm to the user:

  • What was saved (title)
  • Where it was saved (folder)
  • How many observations and relations were captured
  • Any forward references that will resolve later