Agent skill

Memory Notes

by basicmachines-co in basicmachines-co/basic-memory

How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph.

AGPL-3.0Auto-check passedKnowledge Management

Install Memory Notes

skills CLI
$ npx skills add basicmachines-co/basic-memory --skill memory-notes -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install basicmachines-co/basic-memory memory-notes --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/basicmachines-co/basic-memory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/memory-notes .claude/skills/memory-notes && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-notes
GitHub stars
4.1k
Used in
1 other repo
Token cost
~3.5k tokens
SKILL.md length
1,144 words
Files
1
Skills in repo
49
Repo updated
First seen
Licence
AGPL-3.0

At a glance

How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph.

  • Works in 6 steps: Start with context. Before listing… → Favor completeness. Write rich,… → Build incrementally. Add to existing… → …
  • Improving notes
  • SKILL.md covers Note Anatomy, Observations, Relations and Memory URLs, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Notes is an agent skill from basicmachines-co/basic-memory. How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph. Use when creating or improving notes.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering Knowledge graphs. The repository describes itself as: AI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqN. The licence is AGPL-3.0.

When your agent uses it

  • Improving notes
  • Tasks that involve Knowledge graphs

Example prompts

  • “/memory-notes”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Start with context. Before listing observations, explain why this note exists. Future-you (or your AI collaborator) will thank you.
  2. Favor completeness. Write rich, substantive notes. Basic Memory's search pulls relevant chunks from note bodies, so longer notes with more…
  3. Build incrementally. Add to existing notes rather than creating duplicates. Use edit_note to append new observations or relations as you…
  4. Use consistent titles. Note titles are identifiers in the knowledge graph. API Design Decisions and Api Design decisions are different…
  5. Link related concepts. The value of a knowledge graph compounds with connections. A note with zero relations is an island — useful, but…
  6. Let the graph grow naturally. Don't try to design a perfect taxonomy upfront. Write notes as you work, add relations as connections…

What it can do on your machine

Read from SKILL.md and the folder at commit 6982cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, markdown and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Notes loads about 3.5k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 1,144 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from basicmachines-co/basic-memory at commit 6982cfc, republished under its AGPL-3.0 licence (© basicmachines-co). 1,144 words, ~3,529 tokens.

Download SKILL.mdSave it as .claude/skills/memory-notes/SKILL.md (or your agent's skills folder).
name
memory-notes
description
How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph. Use when creating or improving notes.

Memory Notes

Write well-structured notes that Basic Memory can parse into a searchable knowledge graph. Every note is a markdown file with three key sections: frontmatter, observations, and relations.

Note Anatomy

markdown
---
title: API Design Decisions
tags: [api, architecture, decisions]
---

# API Design Decisions

The API team evaluated multiple approaches for the public API during Q1. After
prototyping both REST and GraphQL, the team chose REST due to broader ecosystem
support and simpler caching semantics. This note captures the key decisions and
their rationale, along with open questions still to resolve.

## Observations
- [decision] Use REST over GraphQL for simplicity #api
- [requirement] Must support versioning from day one
- [risk] Rate limiting needed for public endpoints

## Relations
- implements [[API Specification]]
- depends_on [[Authentication System]]
- relates_to [[Performance Requirements]]
Frontmatter

Every note starts with YAML frontmatter:

yaml
---
title: Note Title          # required — becomes the entity name in the knowledge graph
tags: [tag1, tag2]         # optional — for organization and filtering
type: note                 # optional — defaults to "note", use custom types with schemas
permalink: custom-path     # optional — auto-generated from title if omitted
---
  • The title must match the # Heading in the body
  • Tags are searchable and help with discovery
  • Custom type values (Task, Meeting, Person, etc.) work with the schema system. See the memory-schema skill for defining schemas, validating notes against them, and detecting drift.
  • The permalink is auto-generated from the title and directory. For example, title "API Design Decisions" in directory "specs" produces permalink specs/api-design-decisions and memory URL memory://specs/api-design-decisions. If no directory is specified, the permalink is just the kebab-cased title. By default permalinks stay stable across file moves (unless the project enables update_permalinks_on_move). You rarely need to set one manually.

Note: When using write_note, you don't write frontmatter yourself. The title, tags, note_type, and metadata are separate parameters — Basic Memory generates the frontmatter automatically. Your content parameter is just the markdown body starting with # Heading.

Body / Context

Free-form markdown between the heading and the Observations section. This is the heart of the note — write generously here:

  • Background, motivation, and history
  • Detailed explanation of what happened and why it matters
  • Analysis, reasoning, and trade-offs considered
  • Context that someone (or an AI) needs to understand this note later

Write complete, substantive prose. Basic Memory's search retrieves relevant chunks from note bodies, so longer, richer context makes notes more discoverable and more useful when found. Don't reduce everything to bullet points — tell the story.

Observations

Observations are categorized facts — the atomic units of knowledge. Each one becomes a searchable entity in the knowledge graph.

Syntax
- [category] Content of the observation #optional-tag
  • Square brackets define the semantic category
  • Content is the fact, decision, insight, or note
  • Hash tags (optional) add extra metadata for filtering
Categories Are Arbitrary

The category in brackets is free-form — use whatever label makes sense for the observation. There is no fixed list. The only rule is the [category] content syntax. Consistency within a project helps searchability, but invent categories freely.

A few examples to illustrate the range:

- [decision] Use PostgreSQL for primary data store
- [risk] Third-party API has no SLA guarantee
- [technique] Exponential backoff for retry logic #resilience
- [question] Should we support multi-tenancy at the DB level?
- [preference] Use Bun over Node for new projects
- [lesson] Always validate webhook signatures server-side
- [status] active
- [flavor] Ethiopian beans work best with lighter roasts
Observation Tips
  • One fact per observation. Don't pack multiple ideas into one line.
  • Be specific. [decision] Use JWT is less useful than [decision] Use JWT with 15-minute expiry for API auth.
  • Use tags for cross-cutting concerns. [risk] Rate limiting needed #api #security makes this findable under both topics.
  • Categories are queryable. search_notes(entity_types=["observation"], categories=["decision"]) returns every decision observation across your knowledge base.

Relations

Relations create edges in the knowledge graph, linking notes to each other. They're how you build structure beyond individual notes.

Syntax
- relation_type [[Target Note Title]]
  • relation_type is a descriptive verb or phrase (snake_case by convention)
  • Double brackets [[...]] identify the target note by title or permalink
  • Relations are directional: this note → target note
Relation Types
TypePurposeExample
implementsOne thing implements another- implements [[Auth Spec]]
requiresDependencies- requires [[Database Setup]]
relates_toGeneral connection- relates_to [[Performance Notes]]
part_ofHierarchy/composition- part_of [[Backend Architecture]]
extendsEnhancement or elaboration- extends [[Base Config]]
pairs_withThings that work together- pairs_with [[Frontend Client]]
inspired_bySource material- inspired_by [[CRDT Research Paper]]
replacesSupersedes another note- replaces [[Old Auth Design]]
depends_onRuntime/build dependency- depends_on [[MCP SDK]]
contrasts_withAlternative approaches- contrasts_with [[GraphQL Approach]]
Inline Relations

Wiki-links anywhere in the note body — not just the Relations section — also create graph edges:

markdown
We evaluated [[GraphQL Approach]] but decided against it because
the team has more experience with REST. See [[API Specification]]
for the full contract.

These create references relations automatically. Use the Relations section for explicit, typed relationships; use inline links for natural prose references.

Relation Tips
  • Link liberally. Relations are what turn isolated notes into a knowledge graph. When in doubt, add the link.
  • Create target notes if they don't exist yet. [[Future Topic]] is valid — BM will resolve it when that note is created.
  • Use build_context to traverse. build_context(url="memory://note-title") follows relations to gather connected knowledge.
  • Custom relation types are fine. taught_by, blocks, tested_in — use whatever is descriptive.

Memory URLs

Every note is addressable via a memory:// URL, built from its permalink. These URLs are how you navigate the knowledge graph programmatically.

URL Patterns
memory://api-design-decisions          # by permalink (title → kebab-case)
memory://docs/authentication           # by file path
memory://docs/authentication.md        # with extension (also works)
memory://auth*                         # wildcard prefix
memory://docs/*                        # wildcard suffix
memory://project/*/requirements        # path wildcards
Project-Scoped URLs

In multi-project setups, prefix with the project name:

memory://main/specs/api-design         # "main" project, "specs/api-design" path
memory://research/papers/crdt          # "research" project

The first path segment is matched against known project names. If it matches, it's used as the project scope. Otherwise the URL resolves in the default project.

Show full SKILL.md (451 more words)Show less
Using Memory URLs

Memory URLs work with build_context to assemble related knowledge by traversing relations:

python
# Get a note and its connected context
build_context(url="memory://api-design-decisions")

# Wildcard — gather all docs
build_context(url="memory://docs/*")

# Direct read by permalink
read_note(identifier="memory://api-design-decisions")

Before Creating a Note

Always search Basic Memory before creating a new note. Duplicates fragment your knowledge graph — updating an existing note is almost always better than creating a second one.

Search with Multiple Variations

A single search often misses. Try the full name, abbreviations, acronyms, and keywords:

python
# Searching for an entity that might already exist
search_notes(query="Kubernetes Migration")
search_notes(query="k8s migration")
search_notes(query="container migration")

For people, try full name and last name. For organizations, try the full name and common abbreviations.

Decision Tree
  • Entity exists → Update it with edit_note (append observations, add relations, find-and-replace outdated info)
  • Entity doesn't exist → Create it with write_note
  • Unsure if it's the same entity → Read the existing note first, then decide
Granular Updates with edit_note

When a note already exists, make targeted edits instead of rewriting the whole file:

python
# Add a new observation under the existing Observations heading
edit_note(
  identifier="API Design Decisions",
  operation="insert_after_section",
  section="Observations",
  content="- [decision] Switched to OpenAPI 3.1 for spec generation #api"
)

# Fix outdated information
edit_note(
  identifier="API Design Decisions",
  operation="find_replace",
  find_text="- [status] draft",
  content="- [status] approved"
)

# Add a new relation
edit_note(
  identifier="API Design Decisions",
  operation="insert_after_section",
  section="Relations",
  content="- depends_on [[Rate Limiter]]"
)

This preserves existing content and keeps the edit history clean.

Writing Notes with Tools

Creating a Note
python
write_note(
  title="API Design Decisions",
  directory="architecture",
  tags=["api", "architecture"],
  content="""# API Design Decisions

The API team evaluated REST and GraphQL during Q1 planning. After prototyping
both approaches, we chose REST for the public API — broader ecosystem support,
simpler caching with HTTP semantics, and a lower learning curve for external
consumers. GraphQL remains an option for internal services where query
flexibility matters more.

## Observations
- [decision] Use REST for public API #api
- [requirement] Support API versioning from v1

## Relations
- implements [[API Specification]]
- relates_to [[Backend Architecture]]"""
)

Basic Memory auto-generates frontmatter (including the permalink and memory URL) from the parameters. This note would get permalink architecture/api-design-decisions and be addressable at memory://architecture/api-design-decisions.

Editing an Existing Note

Use edit_note to update a note in place — six operations: append, prepend, find_replace, replace_section, insert_before_section, insert_after_section.

python
# insert_after_section / insert_before_section — add lines at an existing heading
edit_note(
  identifier="API Design Decisions",
  operation="insert_after_section",
  section="Observations",
  content="- [decision] Use OpenAPI 3.1 for spec generation #api"
)

# append / prepend — add to the end of the note or the start of the body
# (use for time-ordered logs; neither one targets a section)
edit_note(
  identifier="API Design Decisions",
  operation="prepend",
  content="> Updated 2026-05-28: auth approach finalized.\n"
)

# replace_section — rewrite a named section (use for living content that stays current)
edit_note(
  identifier="API Design Decisions",
  operation="replace_section",
  section="Summary",
  content="Concise, current summary of the decision and its rationale."
)

# find_replace — swap specific text
edit_note(
  identifier="API Design Decisions",
  operation="find_replace",
  find_text="OpenAPI 3.0",
  content="OpenAPI 3.1"
)

When an edit is destructive (replace_section, find_replace), it's good practice to read the note first and confirm the change before applying it.

Moving a Note

Use move_note to reorganize notes into different directories:

python
move_note(
  identifier="API Design Decisions",
  destination_path="archive/api-design-decisions.md"
)

By default the permalink stays the same after a move, so links keep resolving. Projects with update_permalinks_on_move enabled rewrite it from the new path.

Best Practices

  1. Start with context. Before listing observations, explain why this note exists. Future-you (or your AI collaborator) will thank you.

  2. Favor completeness. Write rich, substantive notes. Basic Memory's search pulls relevant chunks from note bodies, so longer notes with more context are more discoverable, not less. Use prose in the body to tell the full story — the background, the reasoning, the nuance. Then distill key facts into [category] content observations for structured queries. Both matter: prose gives meaning, observations give precision.

  3. Build incrementally. Add to existing notes rather than creating duplicates. Use edit_note to append new observations or relations as you learn more.

  4. Use consistent titles. Note titles are identifiers in the knowledge graph. API Design Decisions and Api Design decisions are different entities. Pick a convention and stick with it.

  5. Link related concepts. The value of a knowledge graph compounds with connections. A note with zero relations is an island — useful, but not as powerful as a connected one.

  6. Let the graph grow naturally. Don't try to design a perfect taxonomy upfront. Write notes as you work, add relations as connections emerge, and periodically use the memory-reflect or memory-defrag skills to consolidate.

© basicmachines-co, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/memory-notes of basicmachines-co/basic-memory.

Open the folder on GitHubat commit 6982cfc

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in basicmachines-co/basic-memory, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Memory Notes next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Notes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Notes this skillbasicmachines-co/basic-memory4.1k1 repos~3.5kAutomated safety check: PassAGPL-3.0
LLM Wiki Knowledge GraphEgonex-AI/Understand-Anything85k1 repos~1.5kAutomated safety check: PassMIT
Obsidian Canvas BoardsAgriciDaniel/claude-obsidian15k—~1.4kAutomated safety check: PassMIT
Ontology1mancompany/OneManCompany4382 repos~1.5kAutomated safety check: PassApache-2.0
Graphagenticnotetaking/arscontexta3.5k1 repos~4.9kAutomated safety check: NotesMIT
Knowledge Graphgnomeria/usbtree688—~1.5kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki Knowledge Graph

    Egonex-AI/Understand-Anything

    Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.

    85k GitHub starsUsed in 1 repo~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian Canvas Boards

    AgriciDaniel/claude-obsidian

    Creates, inspects and updates Obsidian JSON Canvas boards in a vault, with text, file, link, group and edge nodes, using safe recoverable edits.

    15k GitHub stars~1.4k tokensUpdated 26 days ago
    Knowledge ManagementAuto-check passed
  • Ontology

    1mancompany/OneManCompany

    Typed knowledge graph for structured agent memory and composable skills.

    438 GitHub starsUsed in 2 repos~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Graph

    agenticnotetaking/arscontexta

    Interactive knowledge graph analysis. An agent skill from agenticnotetaking/arscontexta.

    3.5k GitHub starsUsed in 1 repo~4.9k tokens
    Knowledge ManagementAuto-check: notes
  • Knowledge Graph

    gnomeria/usbtree

    Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…

    688 GitHub stars~1.5k tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed
  • Knowledge Graph

    nimbalyst/nimbalyst

    Write a project's knowledge pages in Nimbalyst Pages -- record what people said and decided in the page it affects, keep typed pages for the things the team tracks (its own types, such as modules…

    1.8k GitHub stars~3.5k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed

More from basicmachines-co/basic-memory

All 49 skills in this repo
  • cmux Settings Editor

    basicmachines-co/basic-memory

    Views, sets, unsets and validates cmux settings in ~/.config/cmux/cmux.json with a helper script that checks keys against the schema.

    4.1k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • cmux Window and Pane Control

    basicmachines-co/basic-memory

    End-user control of cmux topology and routing (windows, workspaces, panes/surfaces, focus, moves, reorder, identify, trigger flash). Use when automation needs…

    4.1k GitHub starsUsed in 2 repos~842 tokens
    Auto-check passed
  • Cmux Markdown Viewer Panel

    basicmachines-co/basic-memory

    Opens markdown files in a formatted cmux panel beside the terminal that re-renders on every change, handy for plans and task lists.

    4.1k GitHub starsUsed in 2 repos~527 tokens
    Auto-check passed
  • cmux Workspace Scoping

    basicmachines-co/basic-memory

    Keeps agent actions scoped to the cmux workspace and terminal that invoked it, and lays out pane and surface commands that avoid disrupting the user's own focus.

    4.1k GitHub starsUsed in 2 repos~1.7k tokens
    Auto-check passed
  • Basic Memory Repo Images

    basicmachines-co/basic-memory

    Produces PR, changelog and two-week retro images for the Basic Memory repository from evidence in PR bodies, saved to fixed paths under docs/assets/infographics.

    4.1k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Logfire Instrumentation

    basicmachines-co/basic-memory

    Adds Pydantic Logfire tracing, logging and metrics to Python, JavaScript or TypeScript and Rust projects, with the correct setup order and library extras.

    4.1k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Questions about Memory Notes

What does Memory Notes do?

How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph. Memory Notes is an agent skill from basicmachines-co/basic-memory. How to write well-structured Basic Memory notes: frontmatter, observations with semantic categories, relations with wiki-links, and best practices for building a rich knowledge graph.

When should I use Memory Notes?

Memory Notes fits situations like: improving notes; tasks that involve Knowledge graphs.

How do I install Memory Notes in Claude Code?

Run `npx skills add basicmachines-co/basic-memory --skill memory-notes -a claude-code`. Or copy the skill folder (skills/memory-notes in basicmachines-co/basic-memory) into .claude/skills/memory-notes in your project. Claude Code loads it when a task matches its description.

How do I install Memory Notes in Codex?

Run `npx skills add basicmachines-co/basic-memory --skill memory-notes -a codex`. Or copy the skill folder (skills/memory-notes in basicmachines-co/basic-memory) into .agents/skills/memory-notes in your project. Codex loads it when a task matches its description.

Can I use Memory Notes in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add basicmachines-co/basic-memory --skill memory-notes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-notes, .gemini/skills/memory-notes, .github/skills/memory-notes and .opencode/skills/memory-notes in your project.

What does Memory Notes need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Notes is instructions for the agent only. Our summary lists: Python 3.

Does Memory Notes access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Notes safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Notes use?

Memory Notes is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Notes use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Notes?

Skills that share tags, products or a category with Memory Notes: LLM Wiki Knowledge Graph (Egonex-AI/Understand-Anything, 85k stars), Obsidian Canvas Boards (AgriciDaniel/claude-obsidian, 15k stars), Ontology (1mancompany/OneManCompany, 438 stars) and Graph (agenticnotetaking/arscontexta, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Notes?

basicmachines-co (a GitHub organization) maintains it in basicmachines-co/basic-memory, which has 4,107 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: basicmachines-co/basic-memory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.