# memory-schema

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 4357
- Author: basicmachines-co
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/basicmachines-co/basic-memory/tree/HEAD/skills/memory-schema/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/memory-schema

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add basicmachines-co/basic-memory --skill memory-schema -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/memory-schema/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/memory-schema/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add basicmachines-co/basic-memory --skill memory-schema -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/memory-schema/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add basicmachines-co/basic-memory --skill memory-schema -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/memory-schema/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install basicmachines-co/basic-memory memory-schema
```

2. **Manually: put the files in place**
- File: `.github/skills/memory-schema/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add basicmachines-co/basic-memory --skill memory-schema -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/basicmachines-co/basic-memory --path skills/memory-schema
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/memory-schema/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add basicmachines-co/basic-memory --skill memory-schema -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/basicmachines-co/basic-memory/tree/HEAD/skills/memory-schema/SKILL.md

## When to use it
- 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
- 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

## Similar
- [para-memory-files](https://affpapa.org/en/nevibecode/skills/para-memory-files.md) — skill · 1800 installs
- [memory-lifecycle](https://affpapa.org/en/nevibecode/skills/basicmachines-co-memory-lifecycle.md) — skill · 546 installs
- [memory-ingest](https://affpapa.org/en/nevibecode/skills/basicmachines-co-memory-ingest.md) — skill · 541 installs
- [memory-systems](https://affpapa.org/en/nevibecode/skills/memory-systems.md) — skill · 393 installs
- [llm-wiki](https://affpapa.org/en/nevibecode/skills/ar9av-llm-wiki.md) — skill · 4100 installs
- [second-brain-ingest](https://affpapa.org/en/nevibecode/skills/second-brain-ingest.md) — skill · 2500 installs

From the same set: [basicmachines-co/basic-memory](https://affpapa.org/en/nevibecode/by/basicmachines-co/basic-memory.md) — 14 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
