Skip to main content
skill CX Codex

memory-schema — Claude Code skill: what it does, how to install

Manages note schemas in Basic Memory by finding untyped entries, generating schema definitions, checking field consistency, and catching structural drift.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add basicmachines-co/basic-memory --skill memory-schema -a claude-code
Open on GitHub

What memory-schema does

This skill structures knowledge graphs in Basic Memory using Picoschema notation. When unstructured notes like meetings or tasks accumulate, it groups similar records and infers a baseline schema. Each definition lives inside the schema/ directory.

The workflow relies on bm_schema and bm_write calls. You can adjust the detection threshold between 0.0 and 1.0 to catch rare attributes. Keep in mind that validation inspects observation lines inside note bodies, so values stored only in frontmatter metadata fail the check. The diff mode flags missing fields and cardinality mismatches without blocking daily writes.

What it helps with

  • find untyped note clusters across the knowledge graph
  • infer a Picoschema definition from existing notes
  • validate entries against required fields and enum values
  • detect schema drift when notes introduce new properties

Example prompts for the agent

  • Validate all meeting notes against the Meeting schema
  • Find untyped notes and suggest a schema for Person
  • Run a diff on the Task schema to spot new fields

How to install memory-schema

1Skills CLI (Vercel)

npx skills add basicmachines-co/basic-memory --skill memory-schema -a claude-code

2Manually: put the files in place

~/.claude/skills/memory-schema/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/memory-schema/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about memory-schema

How do I install memory-schema in Claude Code?

Run npx skills add basicmachines-co/basic-memory --skill memory-schema -a claude-code. This command registers the skill directly in Claude Code.

What does memory-schema do?

It enforces note consistency in Basic Memory using Picoschema declarations. The skill infers field layouts from existing entries, validates data rules, and detects unmapped attributes.

Why does validation fail if frontmatter metadata is already filled?

The bm_schema(command="validate") tool checks for field values formatted as observations in the note body, such as - [field] value. If properties exist only in frontmatter metadata, validation marks them as missing.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set14

memory-literary-analysis Turns a complete literary work into a Basic Memory knowledge graph with schemas, chapter notes, linked entities, and validation. CX Codex +1 1,200installs memory-lifecycle Automates note status transitions in Basic Memory. It archives completed work into appropriate folders and updates frontmatter without deleting records. CX Codex +1 1,200installs memory-defrag This skill tidies a Basic Memory project by splitting bloated notes, consolidating facts, and flagging contradictions for review. CX Codex +1 1,200installs memory-tasks Keeps work-in-progress as notes in the Basic Memory knowledge graph, so you can find active tasks and resume them after compaction or a restart. CX Codex +1 1,200installs memory-metadata-search Search Basic Memory notes by YAML frontmatter fields, from status and tags to nested values. Useful when a text query alone cannot narrow the results. CX Codex +1 1,200installs memory-reflect The skill reviews what changed in Basic Memory and carries the durable parts into the notes where they belong. Run it daily or after a burst of work. CX Codex +1 1,200installs memory-onboarding Guides you through designing a Basic Memory knowledge base and wiring it into your assistant so project context persists across sessions. CX Codex +1 960installs basic-memory A local MCP server that keeps your knowledge in Markdown files on disk and lets the AI read, write and search them. Useful when you are tired of re-explaining project context. CX Codex +1 ★ 4,357repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor