sqlite-guide-skill

sqlite-guide-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 205 tokens per session (6,815 once invoked), scanned A, original, Apache-2.0.

A learning and selection guide for SQLite, a small database stored in a local file rather than run as a separate server. It covers setup, data operations, transactions, concurrent access, and ORM mappings.

In plain words
What is it for?
Use it to configure a SQLite file, perform create/read/update/delete operations, group changes in transactions, handle concurrent access, and connect entities through a repository layer.
Why use it?
It helps developers decide whether a lightweight embedded database fits their application and explains the basic concerns before they add SQLite to a backend.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to configure a SQLite file, perform create/read/update/delete operations, group changes in transactions, handle concurrent access, and connect entities through a repository layer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiushiwon/wg-skills/sqlite-guide-skill
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.

Any agent
npx skills add jiushiwon/wg-skills --skill sqlite-guide-skill
Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills

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 sqlite-guide-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/sqlite-guide-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/sqlite-guide-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/sqlite-guide-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/sqlite-guide-skill/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 sqlite-guide-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/sqlite-guide-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/sqlite-guide-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,815 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 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.1 $0.00205 $0.06815
Opus 5.5 $0.00082 $0.02726
Sonnet 5.5 $0.00041 $0.01363
Haiku 4.5 $0.00020 $0.00681

Measured 1mo ago against content hash d8e217dd909f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sqlite-guide-skill 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 1mo 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.

database/sqlite-guide-skill/SKILL.md · 804 lines

How it starts

The opening of the file, as written. The whole thing — 804 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQLite Module Skill

面向已有后端项目的开发者,快速集成 SQLite 能力。覆盖5 语言 + AI 时代新场景。

为什么单独做 SQLite 技能

SQLite 是全球部署量最大的数据库 —— Android、iOS、macOS、Windows、Chrome、Firefox、Skype、WhatsApp 全部内置 SQLite。但很多后端开发者只会 MySQL/PG 思维,用 SQLite 时要么过度设计,要么错失其独特优势。

本技能解决 3 个问题:

  1. 正确使用:WAL、busy_timeout、连接模型、调优
  2. 选型判断:什么场景选 SQLite,什么场景必须 MySQL/PG
  3. AI 时代新角色:本地 LLM 缓存、RAG 检索、AI Agent 状态存储、Edge AI

能力清单

能力 说明 难度
连接配置 SQLite 文件路径 + PRAGMA 调优 ⭐
CRUD 操作 增删改查/批量操作 ⭐
事务处理 事务提交/回滚/嵌套 ⭐
并发访问 WAL 模式/锁机制/busy_timeout ⭐⭐
ORM 映射 SQLAlchemy/Hibernate/GORM/Prisma/Diesel ⭐⭐
全文搜索 FTS5 内置全文搜索引擎 ⭐⭐
多语言集成 Python/Java/Go/Node.js/Rust 5 语言 ⭐⭐
AI 时代应用 本地 LLM 缓存、RAG、AI Agent 状态 ⭐⭐
备份/迁移 .backup API、Litestream、流式复制 ⭐⭐

触发场景

用户说"帮我加 SQLite"、"集成轻量数据库"、"嵌入式数据库"、"AI 本地数据库"、"本地优先存储"、"RAG 检索库"、"FTS5 全文搜索"时触发。


核心配置(5 语言)

Python (FastAPI)

# config.py
class Settings(BaseSettings):
    db_path: str = "./data/myapp.db"

# database.py
import sqlite3
from contextlib import contextmanager

class SQLiteClient:
    def __init__(self, db_path: str):
        self.db_path = db_path
        self._init_db()

    def _init_db(self):
        with self.get_conn() as conn:
            # 必开项:WAL 模式提升读写并发
            conn.execute("PRAGMA journal_mode=WAL")
            conn.execute("PRAGMA synchronous=NORMAL")
            conn.execute("PRAGMA busy_timeout=5000")
            conn.execute("PRAGMA foreign_keys=ON")

    @contextmanager
    def get_conn(self):
        conn = sqlite3.connect(self.db_path)
        conn.row_factory = sqlite3.Row
        try:
            yield conn
            conn.commit()
        except Exception:
            conn.rollback()
            raise
        finally:
            conn.close()

    def execute(self, sql: str, params: tuple = ()):
        with self.get_conn() as conn:
            cursor = conn.execute(sql, params)
            return cursor.lastrowid

    def query(self, sql: str, params: tuple = ()):
        with self.get_conn() as conn:
            cursor = conn.execute(sql, params)
            return [dict(row) for row in cursor.fetchall()]

Read the full file on GitHub · 804 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · +629 lines · +105 tokens per session d8e217dd909f
  2. 2mo ago First seen · 175 lines · 100 tokens per session scan A ea4c3fdac39b

Subscribe to this mod's changes

sqlite-guide-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 205 tokens to every session and 6,815 once invoked, about $0.0008 per session on Opus 5.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-09-30.

Related

sqlite-guide-skill compared with skills from other repositories

sqlite-guide-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sqlite-guide-skilljiushiwon/wg-skillsSkill1547d agoApache-2.0A205Claude Code, Codex
create-prprisma/ormSkill48ktodayApache-2.0A47Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill32ktodayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.9k5d agoApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
pentesting-mysqlxalgorix/xalgorixSkill1.5k2d agoApache-2.0A65Claude Code, Codex
nornicdb-cypher-queriesorneryd/NornicDBSkill937todayMITA79Claude Code, Codex