Workflow·Databases

Memory Schema

Schema lifecycle management for Basic Memory: discover unschemaed notes, infer schemas, create and edit schema definitions, validate…

You say
Install this skill Read the source first Free Written by basicmachines-co · unverified publisher
Context cost
2k tokensestimated from the bundle, loaded when it triggers
Bundle
1 file · 7.9 kBtext throughout, nothing executable
Licence
GPL-3.0free to use
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

Schema lifecycle management for Basic Memory: discover unschemaed notes, infer schemas, create and edit schema definitions, validate notes, and detect drift. Use when working with structured note types (Task, Person, Meeting, etc.) to maintain consistency across the knowledge graph.

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Workflow

Runs a procedure end to end.

database
Filed under

Databases

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md7.9 kB · 240 lines
--- name: memory-schema description: "Schema lifecycle management for Basic Memory: discover unschemaed notes, infer schemas, create and edit schema definitions, validate notes, and detect drift. Use when working with structured note types (Task, Person, Meeting, etc.) to maintain consistency across the knowledge graph." ---
6# Memory Schema
7
8Manage structured note types using Basic Memory's Picoschema system. Schemas define what fields a note type should have, making notes uniform, queryable, and validatable.
9
10## When to Use
11
12- **New note type emerging** — you notice several notes share the same structure (meetings, people, decisions)
13- **Validation check** — confirm existing notes conform to their schema
14- **Schema drift** — detect fields that notes use but the schema doesn't define (or vice versa)
15- **Schema evolution** — add/remove/change fields as requirements evolve
16- **On demand** — user asks to create, check, or manage schemas
17
18## Picoschema Syntax Reference
19
20Schemas are defined in YAML frontmatter using Picoschema — a compact notation for describing note structure.
21
22### Basic Types
23
24```yaml
25schema:
26 name: string, person's full name
27 age: integer, age in years
28 score: number, floating-point rating
29 active: boolean, whether currently active
30```
31
32Supported types: string, integer, number, boolean.
33
34### Optional Fields
35
36Append ? to the field name:
37
38```yaml
39schema:
40 title: string, required field
41 subtitle?: string, optional field
42```
43
44### Enums
45
46Use (enum) with a list of allowed values:
47
48```yaml
49schema:
50 status(enum, current state): [active, blocked, done, abandoned]
51```
52
53Optional enum:
54
55```yaml
56schema:
57 priority?(enum, task priority): [low, medium, high, critical]
58```
59
60### Arrays
61
62Use (array) for list fields:
63
64```yaml
65schema:
66 tags(array): string, categorization labels
67 steps?(array): string, ordered steps to complete
68```
69
70### Relations
71
72Reference other entity types directly:
73
74```yaml
75schema:
76 parent_task?: Task, parent task if this is a subtask
77 attendees?(array): Person, people who attended
78```
79
80Relations create edges in the knowledge graph, linking notes together.
81
82### Validation Settings
83
84```yaml
85settings:
86 validation: warn # warn (log issues) or strict (errors)
87```
88
89Use strict as the canonical enforcing mode. error is accepted only as a compatibility alias.
90
91### Complete Example
92
93```yaml
94---
95title: Meeting
96type: schema
97entity: Meeting
98version: 1
99schema:
100 topic: string, what was discussed
101 date: string, when it happened (YYYY-MM-DD)
102 attendees?(array): Person, who attended
103 decisions?(array): string, decisions made
104 action_items?(array): string, follow-up tasks
105 status?(enum, meeting state): [scheduled, completed, cancelled]
106settings:
107 validation: warn
108---
109```
110
111## Discovering Unschemaed Notes
112
113Look for clusters of notes that share structure but have no schema:
114
1151. **Search by type**: search_notes(query="type:Meeting") — if many notes share a type but no schema/Meeting.md exists, it's a candidate.
116
1172. **Infer a schema**: Use schema_infer to analyze existing notes and generate a suggested schema:
118 ```python
119 schema_infer(noteType="Meeting")
120 schema_infer(noteType="Meeting", threshold=0.5) # fields in 50%+ of notes
121 ```
122 The threshold (0.0–1.0) controls how common a field must be to be included. Default is usually fine; lower it to catch rarer fields.
123
1243. **Review the suggestion** — the inferred schema shows field names, types, and frequency. Decide which fields to keep, make optional, or drop.
125
126## Creating a Schema
127
128Write the schema note to schema/<EntityName>:
129
130```python
131write_note(
132 title="Meeting",
133 directory="schema",
134 note_type="schema",
135 metadata={
136 "entity": "Meeting",
137 "version": 1,
138 "schema": {
139 "topic": "string, what was discussed",
140 "date": "string, when it happened",
141 "attendees?(array)": "Person, who attended",
142 "decisions?(array)": "string, decisions made"
143 },
144 "settings": {"validation": "warn"}
145 },
146 content="""# Meeting
147
148Schema for meeting notes.
149
150## Observations
151- [convention] Meeting notes live in memory/meetings/ or as daily entries
152- [convention] Always include date and topic
153- [convention] Action items should become tasks when complex"""
154)
155```
156
157### Key Principles
158
159- **Schema notes live in schema/** — one note per entity type
160- **note_type="schema"** marks it as a schema definition
161- **entity: Meeting** in metadata names the type it applies to
162- **version: 1** in metadata — increment when making breaking changes
163- **settings.validation: warn** is recommended to start — it logs issues without blocking writes
164
165## Validating Notes
166
167Check how well existing notes conform to their schema:
168
169```python
170# Validate all notes of a type
171schema_validate(noteType="Meeting")
172
173# Validate a single note
174schema_validate(identifier="meetings/2026-02-10-standup")
175```
176
177**Important:** schema_validate checks for schema fields as **observation categories** in the note body — e.g., a status field expects - [status] active as an observation. Fields stored only in frontmatter metadata won't satisfy validation. To pass cleanly, include schema fields as both frontmatter values (for metadata search) and observations (for schema validation).
178
179Validation reports:
180- **Missing required fields** — the note lacks a field the schema requires (as an observation category)
181- **Unknown fields** — the note has fields the schema doesn't define
182- **Type mismatches** — a field value doesn't match the expected type
183- **Invalid enum values** — a value isn't in the allowed set
184
185### Handling Validation Results
186
187- **warn mode**: Review warnings periodically. Fix notes that are clearly wrong; add optional fields to the schema for legitimate new patterns.
188- **strict mode**: Use where conformance matters (e.g., automated pipelines consuming notes).
189
190## Detecting Drift
191
192Over time, notes evolve and schemas lag behind. Use schema_diff to find divergence:
193
194```python
195schema_diff(noteType="Meeting")
196```
197
198Diff reports:
199- **Fields in notes but not in schema** — candidates for adding to the schema (as optional)
200- **Schema fields rarely used** — consider making optional or removing
201- **Type inconsistencies** — fields used as different types across notes
202
203## Schema Evolution
204
205When note structure changes:
206
2071. **Run diff** to see current state: schema_diff(noteType="Meeting")
2082. **Update the schema note** via edit_note:
209 ```python
210 edit_note(
211 identifier="schema/Meeting",
212 operation="find_replace",
213 find_text="version: 1",
214 content="version: 2",
215 expected_replacements=1
216 )
217 ```
2183. **Add/remove/modify fields** in the schema: block
2194. **Re-validate** to confirm existing notes still pass: schema_validate(noteType="Meeting")
2205. **Fix outliers** — update notes that don't conform to the new schema
221
222### Evolution Guidelines
223
224- **Additive changes** (new optional fields) are safe — no version bump needed
225- **Breaking changes** (new required fields, removed fields, type changes) should bump version
226- **Prefer optional over required** — most fields should be optional to start
227- **Don't over-constrain** — schemas should describe common structure, not enforce rigid templates
228- **Schema as documentation** — even if validation is set to warn, the schema serves as living documentation for what notes of that type should contain
229
230## Workflow Summary
231
232```
2331. Notice repeated note structure → infer schema (schema_infer)
2342. Review + create schema note → write to schema/ (write_note)
2353. Validate existing notes → check conformance (schema_validate)
2364. Fix outliers → edit non-conforming notes (edit_note)
2375. Periodically check drift → detect divergence (schema_diff)
2386. Evolve schema as needed → update schema note (edit_note)
239```
240
In the file
SKILL.md1,059 words
Files1
LicenceGPL-3.0
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈80
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
1,895
on trigger
The instruction body, read only when the skill fires.
0.99%
of a 200k window
Ten skills this size would take about 10% of the window before you open a file.
050k100k150k200k context window

2k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Middling. Fine to keep on in a project where you use it weekly, worth unloading in one where you never do.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

1 file, 7.9 kB on disk. A bundle is text throughout: the instructions the model reads, plus the templates it fills in.

  • SKILL.md7.9 kB
What is not in it

No dependencies and nothing executable: a skill is text the agent reads, so the bundle is 1 file you can review in full before installing. The GPL-3.0 licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

# Memory Schema · 2k tokens when loaded npx mcprush@latest skill add basicmachines-co/memory-schema

Writes to .claude/skills/memory-schema/ in the current project. Add --global to put it in your home directory instead, for every project.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
PriceFree
Referencebasicmachines-co/memory-schema

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Who wrote it

BA
basicmachines-co

Publishes on mcprush.

0 servers listed1 skill listednot claimed
Profile
Publisher
Servers0
Claim this skill