sqlite-ops
Skill10 starsChanged 2 months agoApache-2.0View on GitHub
SQLite usage, backup/care, WAL mode, and corruption handling in issue-orchestrator. Use when answering questions about SQLite configuration, persistence, backup/recovery, or when modifying sqlite3 usage in this repo.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- architectureSkill
- configurationSkill
- control-center-lifecycleSkill
- dependency-upgradesSkill
- e2e-testsSkill
- frontend-designSkill
- github-token-rotationSkill
- hooksSkill
- issue-dependency-stackingSkill
- issue-prioritiesSkill
- onboardingSkill
- refactoringSkill
- review-workflowSkill
- schema-updatesSkill
- session-debuggingSkill
- session-replaySkill
- startupSkill
- troubleshoot-e2eSkill
- troubleshootingSkill
- ui-openapiSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
If DB may be open: use VACUUM INTO or sqlite3 .backup (avoid raw file copy).
- Very specific: line 19
If DB can be closed: stop app, then copy the DB file (and -wal/-shm if WAL) or still use VACUUM INTO for a clean snapshot.
- Very specific: line 25
Run PRAGMA quick_check on startup.
- Distinctive: line 29
Stop orchestrator, replace DB file with backup, restart.
- Very specific: line 34
Add new persistent SQLite DBs to sqlite_registry.py so doctor checks, startup pragmas, and backups can see them.
- Very specific: line 43
Use references/issue-orchestrator-sqlite.md for DB locations, connection settings, and current corruption handling.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sqlite Ops
Overview
Locate SQLite usage in issue-orchestrator and provide practical, low-maintenance backup and corruption-handling guidance tailored to the repo's databases.
Workflow
- Identify which SQLite DB(s) are in scope.
- Load
references/issue-orchestrator-sqlite.mdfor paths and owners.
- Load
- Confirm the runtime context (local desktop vs server, DB size, write frequency, WAL or not).
- Recommend a safe backup method:
- If DB may be open: use
VACUUM INTOor sqlite3.backup(avoid raw file copy). - If DB can be closed: stop app, then copy the DB file (and
-wal/-shmif WAL) or still useVACUUM INTOfor a clean snapshot.
- If DB may be open: use
- Suggest durability settings:
- Repo code should normally use
infra/sqlite_connection.py::open_sqlite(). - The shared helper applies foreign keys, busy timeout, WAL mode, and
PRAGMA synchronous=FULL. - Periodic checkpoints may still be needed if WAL files grow unexpectedly.
- Repo code should normally use
- Corruption response:
- Run
PRAGMA quick_checkon startup. - On failure: move DB to
*.corrupt, restore latest backup, and surface a clear alert.
- Run
- Recovery guidance:
- Identify latest backup in
.issue-orchestrator/backups/sqlite/<db_key>/daily/(or weekly). - Stop orchestrator, replace DB file with backup, restart.
- Identify latest backup in
Repo Notes
- Registered DBs are listed in
src/issue_orchestrator/infra/sqlite_registry.py. - Add new persistent SQLite DBs to
sqlite_registry.pyso doctor checks, startup pragmas, and backups can see them. - Startup maintenance applies WAL/FULL pragmas to existing registered DBs and backs them up when
sqlite_backupis enabled. - Most runtime DB owners use
open_sqlite(); ad hocsqlite3.connect()usage should be intentional and checked. - Subprocess registry includes auto-corruption handling; the other DB owners generally surface exceptions and rely on doctor/backup recovery.
Resources
references/
Use references/issue-orchestrator-sqlite.md for DB locations, connection settings, and current corruption handling.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

