recover-sqlite-database

recover-sqlite-database is a skill for Cursor from markmhendrickson/neotoma. It costs 41 tokens per session (530 once invoked), scanned A, a copy of recover_sqlite_database, MIT.

A recovery procedure for fixing a corrupted Neotoma SQLite database, a local file used to store application data.

In plain words
What is it for?
It checks SQLite integrity, runs SQLite's recovery process, and guides you through verifying and replacing the damaged database file.
Why use it?
It helps diagnose database corruption and create a repaired copy when Neotoma stops working because its database cannot be read.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/recover_sqlite_database.js.

Good fit It checks SQLite integrity, runs SQLite's recovery process, and guides you through verifying and replacing the damaged database file.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/markmhendrickson/neotoma
agentmods
npx agentmods add skills/markmhendrickson/neotoma/recover-sqlite-database

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for recover-sqlite-database

README.md
[![agentmods](https://agentmods.dev/badge/skills/markmhendrickson/neotoma/recover-sqlite-database/github.svg)](https://agentmods.dev/skills/markmhendrickson/neotoma/recover-sqlite-database)
Your own site
<a href="https://agentmods.dev/skills/markmhendrickson/neotoma/recover-sqlite-database"><img src="https://agentmods.dev/badge/skills/markmhendrickson/neotoma/recover-sqlite-database/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recover-sqlite-database

Your own site · 80×15
<a href="https://agentmods.dev/skills/markmhendrickson/neotoma/recover-sqlite-database"><img src="https://agentmods.dev/badge/skills/markmhendrickson/neotoma/recover-sqlite-database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00530
Opus 5 $0.00020 $0.00265
Sonnet 5 $0.00008 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 7d ago against content hash d1c7d8a23965, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

recover-sqlite-database scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to recover_sqlite_database — 13 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/skills/recover-sqlite-database/SKILL.md · 49 lines

What it actually says

Recover Neotoma SQLite Database

When to use

Neotoma errors such as database disk image is malformed, failed PRAGMA integrity_check, or btreeInitPage / SQLITE_CORRUPT on the local SQLite file (neotoma.db or neotoma.prod.db under NEOTOMA_DATA_DIR).

Preconditions

  • sqlite3 CLI on PATH (macOS usually has it).
  • Stop Neotoma (MCP stdio processes, neotoma api, anything using the DB) before --recover or before swapping files.

Script (primary)

From the Neotoma repo root:

# Check only (exit 0 = ok, 2 = corrupt)
node scripts/recover_sqlite_database.js
node scripts/recover_sqlite_database.js --env production

# Write recovered copy (does not replace live DB)
node scripts/recover_sqlite_database.js --env production --recover

Or: npm run recover:db and npm run recover:db:prod -- --recover (see package.json).

Output is a sibling file like neotoma.prod.recovered-<timestamp>.db. Verify it reports PRAGMA integrity_check: ok, then manually archive the live .db/-wal/-shm and cp the recovered file to the live name.

After swap

  • Inspect lost_and_found in the recovered file if present; re-ingest important rows via POST /store / MCP store using normal schemas (see prior recovery notes: note, issue, etc.).
  • Prefer NEOTOMA_DATA_DIR outside iCloud-synced folders (e.g. not only under ~/Documents if Documents syncs) to reduce recurrence.

Do not

  • Run --recover while Neotoma still holds the database open.
  • Auto-delete the corrupt file until a good recovered copy is verified and backed up.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 49 lines · 41 tokens per session scan A d1c7d8a23965

Subscribe to this mod's changes

recover-sqlite-database is a skill published in the GitHub repository markmhendrickson/neotoma (32 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 530 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to recover_sqlite_database, differing in 13 lines, and is treated as a copy.

Related

Other skills, from other repositories

architecture-paradigm-cqrs-es

Applies CQRS and Event Sourcing for read/write separation and audit trails. Use when designing systems with complex domain logic or full state-change history.

athola/claude-night-market · 39 tokens

backend-event-sourcing

Use this skill when the user says 'event sourcing', 'event store', 'event stream', 'event sourced', 'rehydrate from events', 'event replay', 'projection rebuild', 'event log', 'append-only log', 'event history'. This skill enforces: events as the single source of truth, current state derived from event replay…

j4flmao/agent-skills · 118 tokens

cratis-readmodel

Step-by-step guidance for creating a Cratis Chronicle read model from scratch — defining events, choosing between projection and reducer, [ReadModel] record with static query methods, and the generated TypeScript proxy in React. Use when creating a read model, working with [EventType], [ReadModel], IProjectionFor…

Cratis/AI · 100 tokens

cratis-arc-ef-core-migration

Change an Entity Framework Core schema in a Cratis Arc application — the DbContext base types Arc provides, the cross-database column helpers, JSON columns, how a migration is created and applied, and how an EF Core read model becomes injectable into a command. Use when adding or changing a table, column…

Cratis/AI · 93 tokens

cratis-chronicle-event-type-migration

Evolve a Chronicle event schema without breaking replay - add a generation and an EventTypeMigration so stored events upcast into the new shape. Use when an event needs a new required property, a renamed or split property, a structural change, or a changed enum value after events of the prior shape already exist. Do…

Cratis/AI · 93 tokens

cratis-chronicle-event-constraints

Enforce append-time uniqueness in Chronicle with the [Unique] attribute, [RemoveConstraint], and IConstraint, and specify the violation with EventScenario. Use when a rule must hold at the event store rather than in a command, so two concurrent appends cannot both win. Do not use for ordinary command input validation…

Cratis/AI · 81 tokens