recover_sqlite_database

recover_sqlite_database is a skill for Claude Code, Codex from markmhendrickson/neotoma. It costs 11 tokens per session (486 once invoked), scanned A, original, MIT.

A recovery procedure for damaged Neotoma SQLite database files. SQLite is a file-based database system, and this procedure creates a repaired copy for checking and possible replacement.

In plain words
What is it for?
Use it to check a Neotoma database, create a recovered copy, verify its integrity, and inspect any rows placed in a lost-and-found area.
Why use it?
It helps when Neotoma reports that its database is malformed or corrupt, instead of leaving you to recover the file manually.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/markmhendrickson/neotoma/recover_sqlite_database
Any agent
npx skills add markmhendrickson/neotoma --skill recover_sqlite_database
Clone the repo
git clone --depth 1 https://github.com/markmhendrickson/neotoma

Made for: Claude Code, Codex.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 486 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00011 $0.00486
Opus 5 $0.00005 $0.00243
Sonnet 5 $0.00002 $0.00097
Haiku 4.5 $0.00001 $0.00049

Measured 4d ago against content hash 60e5356be359, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

.claude/skills/recover_sqlite_database/SKILL.md · 46 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. 4d ago First seen · 46 lines · 11 tokens per session scan A 60e5356be359

Subscribe to this mod's changes

recover_sqlite_database is a skill published in the GitHub repository markmhendrickson/neotoma (31 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 486 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

security-observability

只读查询 agent-sec-cli 已落盘的历史安全事件记录,并据此生成会话级安全复盘。仅当用户显式要求查看或审计已发生的安全事件、安全告警、安全审计记录,或要求按 session/run/trace/时间/类别筛选与统计已有安全事件,或要求复盘某次会话的安全判定时使用。不用于扫描新内容:检查代码安全性用 code-scanner,检测 prompt 注入用 prompt-scanner,审查 Skill 安全状态用 skill-ledger。不要因为对话中出现“安全”“工具调用”等字样、或为了主动自查而触发。.

alibaba/anolisa · 145 tokens

add-backend

Guide for adding a backend (Rust or Python) to the agent-sec-core security middleware. Use when creating new backends, integrating Rust or Python code into the security middleware, or extending with new backend actions.

alibaba/anolisa · 46 tokens

skill-ledger

Skill 安全状态查看、风险暴露审查、用户决策、快速扫描认证与可选深度扫描。支持用户主动查看或扫描单个/全部 Skill;当用户要求 agent 安装 Skill 且安装成功后,必须自动对最终本地目录执行快速扫描认证。.

alibaba/anolisa · 67 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

install-openclaw

Install and configure OpenClaw non-interactively with Alibaba Cloud Model Studio. Use when the user asks to install OpenClaw, configure Aliyun Bailian/Model Studio/DashScope credentials, choose pay-as-you-go, Coding Plan, or Token Plan billing, set Base URL/model config, optionally configure DingTalk, start the local…

alibaba/anolisa · 85 tokens

prompt-scanner

使用 agent-sec-cli 扫描 prompt 文本中的注入攻击和越狱尝试,返回结构化 JSON 扫描结果。当用户提到 prompt 安全、prompt 注入检测、越狱检测、提示词攻击检测,或者需要判断一段文本是否包含恶意 prompt 注入时,都应使用此技能。即使用户没有明确说"扫描",只要涉及评估 prompt 文本的安全性,也应触发此技能。.

alibaba/anolisa · 103 tokens