sqlite-expert

sqlite-expert is a skill for Codex from LeeYudok/doksam-skills. It costs 51 tokens per session (2,118 once invoked), scanned A, original, MIT.

A skill for working with SQLite, a database stored in a single file rather than run as a separate server. It focuses on safe reading, file locking, write-ahead logging, migrations, and dynamic table names.

In plain words
What is it for?
Use it when reading SQLite files, handling concurrent access, applying schema changes, or working with table names that cannot be passed as ordinary query parameters. It includes checks for keeping read-only inspections from changing the original file.
Why use it?
It helps prevent changing or corrupting an SQLite file that another application is using. It also addresses intermittent locked-database errors and unwanted companion files such as WAL or journal files.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when reading SQLite files, handling concurrent access, applying schema changes, or working with table names that cannot be passed as ordinary query parameters. It includes checks for keeping read-only inspections from changing the original file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeyudok/doksam-skills/sqlite-expert
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 LeeYudok/doksam-skills --skill sqlite-expert
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/doksam-skills

Made for: 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-expert

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/sqlite-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/sqlite-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,118 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00051 $0.02118
Opus 5 $0.00026 $0.01059
Sonnet 5 $0.00010 $0.00424
Haiku 4.5 $0.00005 $0.00212

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

Security

Grade A, and why

sqlite-expert 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 9d 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.

skills/sqlite-expert/SKILL.md · 143 lines

How it starts

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

sqlite-expert

SQLite 엔진 고유의 문제가 대상이다. 스키마 설계 이론·PostgreSQL 운영은 db-expert, Go 코드 관용구는 go-expert 가 맡는다.

SQLite 는 "작은 RDB"가 아니라 파일 하나가 데이터베이스인 라이브러리다. 서버가 없다는 사실에서 이 문서의 거의 모든 항목이 파생된다.

1. 남의 파일을 읽을 때 — 원본을 바꾸지 않는다

앱이 쓰고 있는 캐시·데이터 파일을 조회하는 작업이 흔하다. 원본을 건드리면 그 앱의 데이터가 깨진다. 기본은 읽기 전용이다.

dsn := "file:" + path + "?mode=ro&_pragma=busy_timeout(5000)"
  • mode=ro — 쓰기를 엔진 수준에서 막는다. 애플리케이션 규율에 기대지 않는다.
  • busy_timeout — 다른 프로세스가 쓰는 중이면 즉시 실패하지 않고 기다린다. 없으면 산발적인 database is locked 로 나타난다.
  • URI 파일명에서 ?·# 은 구분자다. 경로에 들어 있으면 퍼센트 인코딩한다. 경로 문자열을 그냥 이어붙이면 파일을 못 찾는다.

곁 파일까지 확인한다

읽기만 해도 -wal·-shm·-journal 이 생기면 원본 폴더를 오염시킨 것이다. WAL 모드 DB 를 열면 실제로 발생할 수 있다. 정말 건드리면 안 되는 파일은 immutable=1 을 고려하되, 이건 "파일이 변하지 않는다"는 약속이므로 앱이 쓰는 중이면 쓰지 않는다.

가장 안전한 순서: 사본을 떠서 사본을 연다. 그럴 수 없으면 mode=ro + 곁 파일 검사.

이건 테스트로 고정한다

문서에만 적힌 "읽기 전용"은 다음 리팩터링에서 사라진다. 회귀 테스트로 못 박는다.

// 조회란 조회를 다 돌린 뒤 파일 해시가 같은지, 곁 파일이 안 생겼는지
before := sha256sum(path)
// ... Rooms / Messages / Count / Search ...
if after := sha256sum(path); after != before { t.Error("원본이 바뀌었다") }
for _, s := range []string{"-wal", "-shm", "-journal"} {
    if _, err := os.Stat(path + s); !os.IsNotExist(err) { t.Error("곁 파일이 생겼다") }
}

쓰기가 실제로 막히는지도 확인한다 — mode=ro 로 연 뒤 DELETE 가 실패해야 한다.

2. 동적 테이블·컬럼명 — 유일한 방어선

테이블명은 플레이스홀더로 넘길 수 없다. 스키마가 Chat_<방ID> 처럼 데이터에 따라 갈리는 구조면 문자열 조립이 불가피하다. 그러면 검증이 유일한 방어선이 된다.

var roomIDRe = regexp.MustCompile(`^[0-9a-f]{12}-[0-9]{3}$`)

func tableName(id string) (string, error) {
    if !roomIDRe.MatchString(id) {   // 통과 못 하면 절대 쿼리에 넣지 않는다
        return "", fmt.Errorf("%w: %q", ErrInvalidRoomID, id)
    }
    return "Chat_" + id, nil
}
// 조립 시 반드시 인용부호로 감싼다 — 이름의 '-' 가 연산자로 파싱되는 것도 막는다
q := fmt.Sprintf(`SELECT ... FROM %q WHERE Sequence > ?`, table)

규칙: 화이트리스트(정규식 또는 sqlite_master 조회 결과)를 통과한 값만 쓰고, %q 로 감싸고, 주입 시도 케이스를 테스트에 넣는다. 값은 언제나 플레이스홀더(?)로 넘긴다.

LIKE 검색

r := strings.NewReplacer(`\`, `\\`, `%`, `\%`, `_`, `\_`)
pattern := "%" + r.Replace(query) + "%"
// ... WHERE Content LIKE ? ESCAPE '\'

Read the full file on GitHub · 143 lines

Files

What ships with it

4 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. 9d ago First seen · 143 lines · 51 tokens per session scan A a623bb4865a2

Subscribe to this mod's changes

sqlite-expert is a skill published in the GitHub repository LeeYudok/doksam-skills (10 stars, last pushed 17d ago), licensed MIT. It adds 51 tokens to every session and 2,118 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

deprecation-and-migration

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset…

addyosmani/agent-skills · 69 tokens

database-migration

Execute database migrations across ORMs and platforms with zero-downtime strategies, data transformation, and rollback procedures. Use when migrating databases, changing schemas, performing data transformations, or implementing zero-downtime deployment strategies.

rmyndharis/antigravity-skills · 47 tokens

database-migrations-migration-observability

Migration monitoring, CDC, and observability infrastructure.

rmyndharis/antigravity-skills · 18 tokens

database-architect

Expert database architect specializing in data layer design from scratch, technology selection, schema modeling, and scalable database architectures. Masters SQL/NoSQL/TimeSeries database selection, normalization strategies, migration planning, and performance-first design. Handles both greenfield architectures and…

rmyndharis/antigravity-skills · 78 tokens

baserow-automation

Automate Baserow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/awesome-claude-skills · 29 tokens

database-admin

Expert database administrator specializing in modern cloud databases, automation, and reliability engineering. Masters AWS/Azure/GCP database services, Infrastructure as Code, high availability, disaster recovery, performance optimization, and compliance. Handles multi-cloud strategies, container databases, and cost…

rmyndharis/antigravity-skills · 70 tokens