Iptvnator Sqlite DB Worker
4gray/iptvnator
A skill your agent uses when changing Electron SQLite IPC, database-worker operations, request-scoped progress or cancellation, worker packaging, or runtime verification of non-EPG database work.
Diagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default.
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install majiayu000/spellbook codex-log-guard --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codex-log-guard .claude/skills/codex-log-guard && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .claude/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guardType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install majiayu000/spellbook codex-log-guard --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/codex-log-guard .agents/skills/codex-log-guard && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .agents/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install majiayu000/spellbook codex-log-guard --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/codex-log-guard .cursor/skills/codex-log-guard && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .cursor/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/majiayu000/spellbook.git --path skills/codex-log-guard--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install majiayu000/spellbook codex-log-guard --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/codex-log-guard .gemini/skills/codex-log-guard && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .gemini/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install majiayu000/spellbook codex-log-guardInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/codex-log-guard .github/skills/codex-log-guard && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .github/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/spellbook --skill codex-log-guard -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install majiayu000/spellbook codex-log-guard --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/codex-log-guard .opencode/skills/codex-log-guard && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "codex-log-guard" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/codex-log-guard into .opencode/skills/codex-log-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codex-log-guard", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
codex-log-guardDiagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default.
Codex Log Guard is an agent skill from majiayu000/spellbook. Diagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default. Use when a user mentions logs2.sqlite, logs2.sqlite-wal, blockloginserts, SSD/TBW wear, or explicitly asks to protect, clean up, verify, or restore Codex diagnostic logging.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).
It sits in Databases. It works with SQLite. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
sqlite3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Codex Log Guard loads about 2.3k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 1,010 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 1,010 words, ~2,299 tokens.
.claude/skills/codex-log-guard/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Diagnose Codex persistent diagnostic logging from local evidence, then give a concise conclusion and the safest next action. Do not make the user choose from a command menu.
Select one mode from the current user request:
diagnose_only is the default for check, inspect, explain, or verify requests. It is read-only.protect requires an explicit request to stop or mitigate log writes. It may install and verify block_log_inserts, but it does not delete rows or vacuum files.cleanup requires an explicit current request to reclaim disk space or clean up logs. It first installs protection when needed, creates and verifies a timestamped backup, and only then deletes log rows and vacuums.restore requires an explicit request to resume diagnostic logging. It may drop only the known block_log_inserts trigger.Generic wording such as "处理", "修一下", or "止血" selects protect, not cleanup. Prior approval does not carry into a later run. If the requested write mode is ambiguous, return the diagnose_only report and the exact proposed mutation without applying it.
Direct actions:
Escalate before:
Evidence-backed pushback:
Feedback loop:
agents/openai.yaml contains discovery UI metadata only; it is not an operational instruction source.
When the user asks to "check", "看看", "诊断", or asks whether the local machine is affected:
~/.codex/logs_2.sqlite~/.codex/sqlite/logs_2.sqliteblock_log_inserts already exists on each candidate with a logs table.logs is still being written using COUNT(*), MIN(id), MAX(id) samples.
Treat MAX(id) or MIN(id) movement with stable COUNT(*) as active churn, not necessarily disk growth.TRACE/DEBUG counts and top noisy targets.In protect mode:
block_log_inserts first.COUNT(*), MAX(id) stops growing.In cleanup mode:
.backup and require a non-empty file plus a successful PRAGMA quick_check result.In restore mode:
block_log_inserts.COUNT(*), MAX(id) to confirm logging resumes or stays quiet.Run direct shell/SQLite commands. Use only the needed subset for the user's request; do not paste a menu back to the user.
Inspect files:
for db in ~/.codex/logs_2.sqlite ~/.codex/sqlite/logs_2.sqlite; do
ls -lh "$db"* 2>/dev/null
du -h "$db"* 2>/dev/null
doneAfter lsof identifies the active candidate, validate the selected path in the
same shell command before running any later SQLite snippet:
: "${CODEX_LOG_DB:?set CODEX_LOG_DB to the verified active candidate}"
case "$CODEX_LOG_DB" in
"$HOME/.codex/logs_2.sqlite"|"$HOME/.codex/sqlite/logs_2.sqlite") ;;
*) echo "refusing unexpected Codex log database path" >&2; exit 2 ;;
esac
readonly db="$CODEX_LOG_DB"Do not supply a default. If no active path can be proven, stay in
diagnose_only and report the ambiguity.
Check schema and trigger:
sqlite3 "$db" ".tables"
sqlite3 "$db" "PRAGMA table_info(logs);"
sqlite3 "$db" "SELECT name, tbl_name, sql FROM sqlite_master WHERE type='trigger' AND name='block_log_inserts';"Sample writes and growth:
for i in 1 2 3; do
date '+%F %T'
sqlite3 "$db" "SELECT COUNT(*) AS rows, MIN(id) AS min_id, MAX(id) AS max_id FROM logs;"
stat -f '%N %z bytes mtime=%Sm' "$db" "$db-wal" "$db-shm" 2>/dev/null
sleep 10
doneInspect levels and noisy targets:
sqlite3 "$db" "SELECT level, COUNT(*) AS n, ROUND(SUM(estimated_bytes)/1024.0/1024.0, 1) AS estimated_mib FROM logs GROUP BY level ORDER BY n DESC;"
sqlite3 "$db" "SELECT target, level, COUNT(*) AS n, ROUND(SUM(estimated_bytes)/1024.0/1024.0, 1) AS estimated_mib FROM logs GROUP BY target, level ORDER BY n DESC LIMIT 15;"Check open processes:
lsof ~/.codex/logs_2.sqlite ~/.codex/logs_2.sqlite-wal ~/.codex/logs_2.sqlite-shm \
~/.codex/sqlite/logs_2.sqlite ~/.codex/sqlite/logs_2.sqlite-wal ~/.codex/sqlite/logs_2.sqlite-shm 2>/dev/nullInstall protection:
sqlite3 "$db" "PRAGMA busy_timeout=10000; CREATE TRIGGER IF NOT EXISTS block_log_inserts BEFORE INSERT ON logs BEGIN SELECT RAISE(IGNORE); END;"Clean up after protection:
backup="$db.bak.$(date +%Y%m%d-%H%M%S)"
sqlite3 "$db" ".backup '$backup'"
test -s "$backup"
test "$(sqlite3 "$backup" 'PRAGMA quick_check;')" = "ok"
sqlite3 "$db" "PRAGMA busy_timeout=10000; PRAGMA wal_checkpoint(TRUNCATE); DELETE FROM logs; VACUUM; PRAGMA wal_checkpoint(TRUNCATE);"
echo "$backup"Restore persistent logging:
sqlite3 "$db" "DROP TRIGGER IF EXISTS block_log_inserts;"logs_2.sqlite files: healthy/not applicable unless the user expects Codex to have run.lsof; do not assume the top-level path is the only live database.COUNT/MIN(id)/MAX(id) stable: protected.MIN(id) or MAX(id) moves: affected and actively writing.TRACE/DEBUG, but no sample movement: affected historically; recommend protection, cleanup optional.logs is absent or schema differs, stop and report that the known workaround is not safely applicable.COUNT(*), MAX(id) sampling.cleanup as reversible only through its timestamped backup. Mention the backup path in the final answer.~/.codex/logs_2.sqlite* and ~/.codex/sqlite/logs_2.sqlite*); it does not manage conversation archives, repo files, credentials, or remote telemetry.COUNT(*) can stay constant while MIN(id) and MAX(id) move; classify this as churn, not a quiet database.Keep the user-facing answer short:
© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/codex-log-guard of majiayu000/spellbook.
Open the folder on GitHubat commit ed52af7
Codex Log Guard next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Codex Log Guard this skillmajiayu000/spellbook | 287 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Iptvnator Sqlite DB Worker4gray/iptvnator | 7.3k | — | ~824 | Automated safety check: Pass | MIT | |
| Analyze Nsys Profilemlc-ai/pith-train | 355 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Reactive Sqlite UIfastrepl/anarlog | 9.5k | — | ~699 | Automated safety check: Pass | MIT | |
| Composer Forensicsdxos/dxos | 526 | — | ~3.1k | Automated safety check: Pass | Custom licence | |
| Sqlite Schema Designfastrepl/anarlog | 9.5k | — | ~1.9k | Automated safety check: Pass | MIT |
4gray/iptvnator
A skill your agent uses when changing Electron SQLite IPC, database-worker operations, request-scoped progress or cancellation, worker packaging, or runtime verification of non-EPG database work.
mlc-ai/pith-train
Query a captured PithTrain Nsight Systems profile to measure compute/communication overlap, locate exposed comm by DualPipeV stage, and inspect per-rank stream behavior.
fastrepl/anarlog
Build SQLite-backed reactive UI in apps/desktop using stable patterns for reads, selection, forms, writes, and loading states.
dxos/dxos
Forensically inspect and repair Composer browser profiles — offline (Chrome OPFS / SQLite extract) or live via /recovery.html debug port.
fastrepl/anarlog
Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice.
deusXmachina-dev/memorylane
Create SQLite migrations for MemoryLane storage schema changes.
majiayu000/spellbook
Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.
majiayu000/spellbook
Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.
majiayu000/spellbook
Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.
majiayu000/spellbook
Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.
majiayu000/spellbook
Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.
majiayu000/spellbook
Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.
Works with
Categories
Diagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default. Codex Log Guard is an agent skill from majiayu000/spellbook. Diagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default.
Codex Log Guard fits situations like: A user mentions logs2.sqlite; logs2.sqlite-wal; blockloginserts; explicitly asks to protect.
Run `npx skills add majiayu000/spellbook --skill codex-log-guard -a claude-code`. Or copy the skill folder (skills/codex-log-guard in majiayu000/spellbook) into .claude/skills/codex-log-guard in your project. Claude Code loads it when a task matches its description.
Run `npx skills add majiayu000/spellbook --skill codex-log-guard -a codex`. Or copy the skill folder (skills/codex-log-guard in majiayu000/spellbook) into .agents/skills/codex-log-guard in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill codex-log-guard -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-log-guard, .gemini/skills/codex-log-guard, .github/skills/codex-log-guard and .opencode/skills/codex-log-guard in your project.
Going by SKILL.md and its folder, Codex Log Guard needs the command-line tools its instructions call (sqlite3).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Codex Log Guard is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Codex Log Guard: Iptvnator Sqlite DB Worker (4gray/iptvnator, 7.3k stars), Analyze Nsys Profile (mlc-ai/pith-train, 355 stars), Reactive Sqlite UI (fastrepl/anarlog, 9.5k stars) and Composer Forensics (dxos/dxos, 526 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.
Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.