basic-memory-pi-setup
Set up Basic Memory for a Pi workspace. Use when Basic Memory is not configured, /bm-status shows no project, recall returns…
Analyze a complete literary work into a structured Basic Memory knowledge graph: schema design, entity seeding, chapter-by-chapter processing, cross-referencing, and validation.
Claude Code
$ npx -y skills add basicmachines-co/basic-memory --skill memory-literary-analysis --agent claude-code
Codex
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a codex -y
Cursor
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a cursor -y
Gemini CLI
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a gemini-cli -y
GitHub Copilot
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a github-copilot -y
OpenCode
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a opencode -y
Windsurf
$ npx skills add basicmachines-co/basic-memory --skill memory-literary-analysis -a windsurf -y
name: memory-literary-analysis description: "Analyze a complete literary work into a structured Basic Memory knowledge graph: schema design, entity seeding, chapter-by-chapter processing, cross-referencing, and validation."
Transform a complete literary work into a structured knowledge graph. Characters, themes, chapters, locations, symbols, and literary devices become interconnected notes — searchable, validatable, and traversable.
If the project is unknown, discover it with `bm_project_list()`. Pass a nonempty `project` on every note, folder, context and schema call, even with one project or a qualified `memory://` URL. Use the chosen project's name, `workspace/project`, or external ID; `<work-name>` below is a placeholder for it. Recent activity also requires `project`. Search accepts `project` for one project, `projects` for selected projects, or `all_projects=True` explicitly. Discovery and bundled manuals need no project. Keep the same scope when following returned paths, paginating, or recovering from a refusal.
Phase 0: Setup → project, schemas, directory structure Phase 1: Seed → stub notes for known major entities Phase 2: Process → chapter-by-chapter notes in batches Phase 3: Cross-ref → enrich arcs, add parallels, write analysis Phase 4: Validate → schema checks, drift detection, consistency Phase 5: Explore → traverse the graph, write synthesis notes
Writing goes through `bm_write` and `bm_edit`. MCP reads use `bm_read`, `bm_find`, `bm_search`, and `bm_list`. The CLI keeps its POSIX verbs; the table and shell examples below are CLI commands (prefix each verb with `bm`):
| Need | Use | Instead of | |------|-----|-----------| | A section of a long note | `cat <note> --section Observations` | reading the whole note | | A line range of the source text | `cat <source>.txt --lines 4200-4890` | pulling the whole book into context | | Notes matching frontmatter | `find --meta status=active` | reading notes to check fields | | Fields across many notes | `find --meta ... --fields pov,setting` | one read per note | | Where something lives | `ls`, `tree`, `find --name '*.md'` | listing everything |
The two rules that matter across a 100+ chapter run:
projection are for — one call answers what a read-per-note loop would cost.
slice the *output*: the full note is still fetched, then cut down before it is returned. What they save is context, not I/O — a long chapter or a full source text costs you the tokens of the relevant part, not of the whole file.
Two sharp edges to know before you write a query. The first fails *quietly* — a short answer, exit 0, no warning — so learn it here rather than from a graph you thought you had audited:
needs `--page-size 100` (the maximum) and paging — see [Coverage Checks](#coverage-checks).
`--meta` query with the positional path instead: `find /characters --meta 'note_type=character'`. That path is matched on a directory boundary against the *file path* a note is indexed under — where the note actually lives, not its permalink, which stops mirroring the file path once a note pins `permalink:` in frontmatter or is moved. So `/characters` reaches everything filed under `characters/` (including `characters/major/`), and never `characters-cut/`.
For MCP, use `bm_read(identifier="<note>", section="Observations", project="<work-name>")` or `start_line`/`end_line` for slices. Use `bm_find(filters={"type": "chapter"}, fields=["chapter_number", "pov"], project="<work-name>")` for metadata and `bm_search(query="doubloon", lines=2, project="<work-name>")` for matching lines. `bm_list` lists one folder level; `bm_find` recurses. MCP list/find/search pages cap at 100; follow `has_more` through every page. CLI page sizes and flags below are separate from the MCP shapes.
bm_project_create(name="<work-name>", path="~/basic-memory/<work-name>")
Use a kebab-case slug of the work's title (e.g., `great-gatsby`, `hamlet`, `beloved`).
Write 6 schema notes to `schema/`. Each schema defines the entity type's fields, observation categories, and relation types. Adapt fields to fit the work — the schemas below are starting points, not rigid templates.
bm_write(
title="Character",
directory="schema",
note_type="schema",
metadata={
"entity": "Character",
"version": 1,
"schema": {
"role(enum)": "[protagonist, antagonist, supporting, minor], character's narrative role",
"description": "string, brief character description",
"first_appearance?": "string, chapter or scene of first appearance",
"status?(enum)": "[alive, dead, unknown, transformed], character status at end of work"
},
"settings": {"validation": "warn"}
},
content="""# Character
Schema for character entity notes.
## Observations
- [convention] Major characters in characters/major/, minor in characters/minor/
- [convention] Observation categories: trait, motivation, arc, quote, appearance, relationship, symbolism, fate
- [convention] Relations: appears_in, contrasts_with, allied_with, commands, symbolizes, associated_with""",AI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqN
Set up Basic Memory for a Pi workspace. Use when Basic Memory is not configured, /bm-status shows no project, recall returns…
Use Basic Memory from Pi for durable continuity. Capture checkpoints with bm_capture, recall prior Pi checkpoints with bm_recall,…
Guide Basic Memory setup in Tau. Use when a user wants to install or configure the Tau memory extension, choose a memory…
Save a deliberate work checkpoint to Basic Memory with the story, changed files, verification, decisions, blockers, and the next…
Capture a durable engineering decision in Basic Memory with rationale, alternatives, consequences, and affected work. Use when…
Orient Claude from Basic Memory before substantial repo work by reading active tasks, open decisions, recent checkpoints, and…
Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…
Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…