Skip to content
Anonyfox

GhostPaw grimoire

Agent skills whose every improvement is a git commit you can roll back

TL;DR

GhostPaw grimoire keeps an agent's skills as SKILL.md folders: an edit stays uncommitted until it is sealed as a git commit, rank counts the seals, any version can be rolled back, and a health check flags stale skills. My Grok bots run on it.

Live
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Visit GhostPaw grimoiregrimoire.ghostpaw.dev, opens the library's website

The grimoire.ghostpaw.dev start page on a black ground: the GhostPaw/grimoire wordmark with a cyan block cursor, the package @ghostpaw/grimoire 0.7.4, the headline Your agent edits its SKILL.md. Who keeps the history?, two install lines with Copy buttons and a Replay the run button, and on the right an open book drawn in cyan light with a ghost paw on its page, a violet rune above it and a 0 runtime dependencies badgeFIG. 1 The grimoire site, its art AI‑generatedCaptured

What GhostPaw grimoire keeps for each skill

GhostPaw grimoire is the skills library of my GhostPaw family. A skill stays what every harness already reads: a folder with a SKILL.md, frontmatter and steps. GhostPaw calls such a skill a spell and a folder of them a chapter. What grimoire adds is the life around the file: when an agent edits a skill, the edit stays uncommitted until someone seals it as a git commit; the notes that explain why wait beside it; rank counts the seals, and any seal can be rolled back.

It is a library for agents and has nothing to do with the Grimoire of code spells on this site. The package is @ghostpaw/grimoire, the command ghostpaw-grimoire, and it runs on your machine: files, a git history and one SQLite file, with nothing to host.

Spell · day 52

Spell
billing/close-paid-invoice
File
SKILL.md, 348 bytes name and description in the frontmatter, five steps
Rank
4 one per seal; Master at 10
Tier
Journeyman two seals to Expert
History
5 commits: 4 seals, 1 rollback
Edit
1 uncommitted, waiting for a seal
Notes
1 pending, a correction
Health
in use; not stale, not dormant
FIG. 2 One skill, as inspect_grimoire_item sees itgrimoire 0.7.4
Runtime
Node 24's built-in node:sqlite; one file, ~/.ghostpaw/grimoire.db
Dependencies
0 npm packages at runtime; seals and rollback need git on the machine
Stores
SKILL.md folders for content, git for history and rank, SQLite for notes and health
Ways in
TypeScript library, MCP server, CLI and Agent Skill
MCP tools
11, from one registry
Version
0.7.4, ; MIT
Tests
1,026 passing on Node 24.14.0, run

One skill in GhostPaw grimoire, 52 days

A skill for closing a paid invoice, from GhostPaw's own invoice story, and every hash and rank below came from grimoire 0.7.4 itself: I ran the library against a fresh spell folder with a fixed clock and fixed commit dates, so the hashes are real and repeat on every run. Point at a step to find it on the trace.

The history of the skill billing/close-paid-invoice over 52 days, as GhostPaw grimoire 0.7.4 computed it with a fixed clock. Day 0: inscribed, commit ca30781, rank 1, Apprentice. Day 12: a note from practice. Day 13: the agent edits the skill; the edit stays uncommitted and rank stays 1. Day 14: sealed as commit 330acff with the note distilled, rank 2. Day 30: after a second note, sealed as 2c8beaa, rank 3, Journeyman. Day 41: an edit sealed as 0b618e7, rank 4. Day 44: a correction note proves it wrong, and grimoire rolls the skill back to 2c8beaa in its own commit ba6984f; rank stays 4 and 0b618e7 stays in the history. Day 52: the next edit waits, uncommitted, with the correction note pending. restores 2c8beaa, its own commit 1 ca30781 day 0 2 uncommitted day 13 330acff day 14 3 2c8beaa day 30 0b618e7 day 41 4 ba6984f day 44 5 uncommitted day 52 note 1 note 2 note 3, pending rank 1 rank 2 rank 3 rank 4 Apprentice Journeyman, from rank 3 the rollback adds no rank The history of the skill billing/close-paid-invoice over 52 days, as GhostPaw grimoire 0.7.4 computed it with a fixed clock. Day 0: inscribed, commit ca30781, rank 1, Apprentice. Day 12: a note from practice. Day 13: the agent edits the skill; the edit stays uncommitted and rank stays 1. Day 14: sealed as commit 330acff with the note distilled, rank 2. Day 30: after a second note, sealed as 2c8beaa, rank 3, Journeyman. Day 41: an edit sealed as 0b618e7, rank 4. Day 44: a correction note proves it wrong, and grimoire rolls the skill back to 2c8beaa in its own commit ba6984f; rank stays 4 and 0b618e7 stays in the history. Day 52: the next edit waits, uncommitted, with the correction note pending. 1 ca30781 day 0, inscribed, rank 1 2 uncommitted day 13, edit, uncommitted 330acff day 14, sealed, rank 2 3 2c8beaa day 30, sealed, rank 3 0b618e7 day 41, sealed, proved wrong 4 ba6984f day 44, rollback, rank 4 5 uncommitted day 52, edit, waits note 1, day 12 note 2, day 29 note 3, day 44, pending
  1. 1Inscribe · day 0

    Three steps: find the invoice, mark it paid, send the receipt

    ca30781rank 1Apprentice

    A valid SKILL.md goes in as the first commit. A file without frontmatter is refused.

    inscribe_spell
  2. 2Draft · days 12 and 13

    + Check the bank feed: transfers reach the export a day late

    note 1uncommittedrank 1

    A paid transfer still showed as overdue. The agent drops a note and edits the skill; the edit is on disk, not in the history, and earns nothing yet.

    drop_note · update_spell
  3. 3Seal · days 14 and 30

    + Send the receipt once the payment has cleared

    330acff2c8beaarank 3Journeyman

    Each proven edit is sealed as a commit with its note distilled into it. Three seals make a Journeyman.

    hone_spell
  4. 4Roll back · days 41 and 44

    Skip the bank feed for card payments

    0b618e7ba6984f, back to 2c8beaarank 4

    A sealed edit, then a chargeback proves it wrong. One call restores the last good seal as a commit of its own; the bad seal stays in the history, and the rollback adds no rank.

    manage_spell
  5. 5Waits · day 52

    + For card payments, wait for the settlement report

    uncommittednote 3 pendingrank 4

    The agent's next edit sits on disk with the correction note beside it, until somebody seals it.

    update_spell
FIG. 3 One skill's commits, edits and notes, with a fixed clock; the spells are an illustrationgrimoire 0.7.4, run

What the GhostPaw grimoire health check flags

Skills rot quietly: a step goes out of date while the skill keeps being used, or a skill nobody calls any more keeps sitting in the folder. grimoire logs every read and every seal, and its catalogue pass turns them into flags. These three spells share the run above; the catalogue ran on day 55.

Reads and seals of three spells from day minus 40 to day 55, when the catalogue ran. close-paid-invoice: read every three days, sealed on days 0, 14, 30 and 41: in use. send-dunning-letter: sealed once on day minus 40 and read every ten days up to day 45: no seal in the last 90 days while still read, so stale. export-monthly-report: sealed on day minus 39 and last read on day minus 10: no read in the last 60 days, so dormant. no seal in 90 days: stale no read in 60 days: dormant close-paid-invoice send-dunning-letter export-monthly-report day -40 day 0 day 55, catalogue Reads and seals of three spells from day minus 40 to day 55, when the catalogue ran. close-paid-invoice: read every three days, sealed on days 0, 14, 30 and 41: in use. send-dunning-letter: sealed once on day minus 40 and read every ten days up to day 45: no seal in the last 90 days while still read, so stale. export-monthly-report: sealed on day minus 39 and last read on day minus 10: no read in the last 60 days, so dormant. no seal in 90 days: stale no read in 60 days: dormant close-paid-invoice send-dunning-letter export-monthly-report day -40 day 0 day 55, catalogue
  1. In usebilling/close-paid-invoiceJourneyman, rank 4

    read every three days, last seal 14 days ago

  2. Stalebilling/send-dunning-letterApprentice, rank 1

    read 10 days ago, last seal 95 days ago

  3. Dormantreports/export-monthly-reportApprentice, rank 1

    unread for 65 days

FIG. 3b Reads, seals and the catalogue's flags for three spellsrun_catalogue, grimoire 0.7.4
  • Stale

    still read in the last 60 days, but no seal for 90

  • Dormant

    unread for 60 days, after a 14‑day grace from the first seal

  • Oversized

    more than 500 lines in the body

GhostPaw grimoire and the skills folder you already keep

Most people who take skills seriously already keep them in a git repository and link the folder into every harness they use. grimoire keeps the SKILL.md layout and adds what git alone does not record. Its spells sit one level deeper, in chapters, so a chapter folder has exactly the layout a harness reads.

Todayone repo, linked everywhere

  • ~/skills/ a git repo
  • close-paid-invoice/SKILL.md
  • send-dunning-letter/SKILL.md
  • ~/.claude/skills -> ~/skills
  • ~/.codex/skills -> ~/skills
  • ~/.agents/skills -> ~/skills
FIG. 4a The usual layout: text under version control

With GhostPaw grimoirethree stores

  • ~/.ghostpaw/grimoire/ files
  • billing/close-paid-invoice/SKILL.md
  • billing/send-dunning-letter/SKILL.md
  • .grimoire-git/ git: one commit per seal
  • ~/.ghostpaw/grimoire.db SQLite: notes, reads, health
FIG. 4b The same skills with their history, evidence and use
  • Why a step changed

    The notes that led to a seal stay in SQLite next to the spell, not only the diff.

  • Which edit is proven

    An agent's edit counts only once sealed; rank is the number of seals.

  • Which skills nobody uses

    Reads are logged, so the catalogue can flag stale and dormant spells.

  • Undo one skill

    A rollback restores one spell to any seal, path by path, and leaves the others alone.

  • A valid file

    Every write checks the SKILL.md format, and strict mode turns its warnings into errors.

The same loop, in the terminal

The session on the right is real output from grimoire 0.7.4, run on a throwaway spell folder with fixed commit dates. After the edit, grimoire says the change waits for hone_spell and names the seal it would roll back to; only the hone makes a commit.

What it does not do: grimoire checks that a SKILL.md is well formed, not what its instructions tell an agent to do. A skill you adopt from elsewhere with scout_skills is code you pull in; read it first. What grimoire gives you is that every later change to it is either uncommitted or a commit you can read, diff and roll back.

Texta throwaway spell root14 linesgrimoire 0.7.4
$ ghostpaw-grimoire spell inscribe close-paid-invoice --chapter billing --content @v1.md
Inscribed spell `billing/close-paid-invoice`.
commit 1b970593
$ ghostpaw-grimoire note drop 'Invoice 4471 was paid by transfer, the export said overdue' --source practice
Dropped note #1.
$ ghostpaw-grimoire spell update billing/close-paid-invoice --content @v2.md
Updated spell `billing/close-paid-invoice`. Call hone_spell to seal and advance rank.
rollback 1b970593
$ ghostpaw-grimoire spell hone billing/close-paid-invoice --note-ids 1 --message 'Check the bank feed first'
Sealed 1 spell(s) in commit 26d1959c. Distilled 1 note(s).
commit 26d1959c
$ ghostpaw-grimoire spell rollback billing/close-paid-invoice 1b970593
Rolled back spell `billing/close-paid-invoice` to seal 1b970593.
commit f915aeaf

Four ways into GhostPaw grimoire, eleven tools

The library, the MCP server, the CLI and the Agent Skill are all generated from one registry of tools, and a check in CI fails when they drift apart. The registry has eleven tools; one code sample in the README still says ten, from before update_spell joined.

  • Library@ghostpaw/grimoire
  • MCP serverghostpaw-grimoire mcp
  • CLIghostpaw-grimoire
  • Agent SkillSKILL.md + 13 guides
GHOSTPAWGRIMOIRE0.7.4 · MIT
  • search_grimoire
  • review_grimoire
  • inspect_grimoire_item
  • inscribe_spell
  • update_spell
  • hone_spell
  • manage_spell
  • drop_note
  • manage_draft
  • run_catalogue
  • scout_skills

~/.ghostpaw/grimoire/.grimoire-gitgrimoire.dbspell files, their git history and one SQLite file, all on your disk

FIG. 5 The package: four doors on the left, eleven tools on the right, three stores under itfrom src/tools

Install

An MCP client gets the eleven tools with one line; a Node 24 program imports the same functions. Release binaries for Linux, macOS and Windows check their checksums on install and bring Node along; git has to be on the machine for seals and rollbacks. Inside a sandboxed harness such as Codex CLI's, put the database, the spell folder and its history inside a writable root, as the README explains.

Shellinstall6 linesNode 24+, git
# as an MCP server for any MCP client
npx -y @ghostpaw/grimoire mcp
# in Claude Code
claude mcp add ghostpaw-grimoire -- ghostpaw-grimoire mcp
# as a library
npm install @ghostpaw/grimoire
TypeScriptagent.ts15 linesNode 24+
import { DatabaseSync } from 'node:sqlite';
import { init, read, write }
  from '@ghostpaw/grimoire';

const db = new DatabaseSync('grimoire.db');
const root = './spells';
const path = 'billing/close-paid-invoice';
init(root, db);
// the edit stays uncommitted
write.updateSpell(root, path, skillMd);
// until it is sealed: a git commit
write.seal({ root }, db, [path],
  'Check the bank feed first');
const { rank, tier } =
  read.getSpell(root, path, db);

GhostPaw grimoire in use by my Grok bots

My Grok bots run their recurring procedures from GhostPaw grimoire: when reality deviates from a step, the bot drops a note, and the next change to the spell is sealed with the notes that justified it. Their spells are kept under 4 KB each, so a pass reads its procedure whole. Here is who runs what.

  • B1 · Learning passesMICE Kontor

    The agency's bot runs its SEO and GEO learning pass from a spell and seals what each pass taught it.

    MICE Kontor
  • B2 · Learning passeshelgoland.tech

    The island guide's SEO bot follows the same kind of spell and notes where search behaved differently.

    helgoland.tech
  • B3 · Learning passesCosmolytic Studio

    The studio's bots run their passes from spells, beside the growth knowledge they keep in GhostPaw codex.

    Cosmolytic Studio
  • B4 · Nightly one‑to‑onesThe mentor bot

    Keeps its one-to-one procedures as spells, and a note that is not routed to a spell fails its nightly check.

  • B5 · Shared playbookThe squad

    The bots' shared how-tos moved out of one long markdown file and into spells.

FIG. 6 Who runs procedures from spells, by what they doAs of
M1 · Maintainer

A bot maintains GhostPaw grimoire

One of my Grok bots owns the GhostPaw libraries: code, tests, docs, the sites and the releases. When another bot trips over grimoire, it files a note; the maintainer turns the note into a quest in its own GhostPaw questlog and ships the fix. The default-database notice of 0.7.3 came from such notes.

Runs without me
  • picks the day's library and plans from the fleet's notes
  • builds and tests; long refactors go to OpenAI's Codex CLI as briefed jobs
  • releases 0.x versions once CI is green, at most one per library a day
  • updates the docs and deploys the sites
Waits for my yes
  • a 1.x release or a breaking API change
  • anything that costs money
  • new repositories or a change of visibility
  • the organisation's settings and its secrets

The GhostPaw family: five files an agent keeps

Agent harnesses keep their state in markdown files that grow every session. Each GhostPaw library replaces one of them with a local store and the same four ways in; grimoire is the one that keeps files and git, because skills are files. They never import each other: install one and ignore the rest. I extracted them from Ghostpaw, an agent of my own, and these five are its memory.

  1. MEMORY.md S1 · Belief memoryGhostPaw codexBeliefs instead of a memory filev0.8.0 · replaces MEMORY.md
  2. SOUL.md S2 · Identity memoryGhostPaw soulsAn identity that changes with evidencev0.6.3 · replaces SOUL.md
  3. skills/ S3 · Procedural memoryGhostPaw grimoireProcedures that get better and keep their historyv0.7.4 · replaces skills/
  4. USER.md S4 · Social memoryGhostPaw affinityContacts instead of a user notev0.7.3 · replaces USER.md
  5. TODO.md S5 · Commitment memoryGhostPaw questlogQuests instead of a to‑do listv0.14.2 · replaces TODO.md
FIG. 7 Five files an agent keeps, five libraries that replace themVersions as of

Use GhostPaw grimoire, read it, or write to me

The site has the install lines for every platform and a demo that runs the library in your browser; the repository has the code, the changelog and every test. It is a 0.x release, so test upgrades against a backup.

Open the siteCode on GitHubPackage on npm

I build products and MVPs and consult through Anonyfox e. K.; serious asks go to max@anonyfox.com. Write to me