Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sqlite-ops

БесплатноЗапускает вложенные скриптыНе проверен

Patterns for SQLite databases in Python projects - state management, caching, and async operations. Triggers on: sqlite, sqlite3, aiosqlite, local database…

aiskillstoreот aiskillstore★ 509 звёзд на GitHub

Об этом скилле

SQLite Operations

Patterns for SQLite databases in Python projects.

Quick Connection

import sqlite3

def get_connection(db_path: str) -> sqlite3.Connection:
    conn = sqlite3.connect(db_path, check_same_thread=False)
    conn.row_factory = sqlite3.Row  # Dict-like access
    conn.execute("PRAGMA journal_mode=WAL")  # Better concurrency
    conn.execute("PRAGMA foreign_keys=ON")
    return conn

Context Manager Pattern

from contextlib import contextmanager

@contextmanager
def db_transaction(conn: sqlite3.Connection):
    try:
        yield conn
        conn.commit()
    except Exception:
        conn.rollback()
        raise

WAL Mode

Enable for concurrent read/write:

conn.execute("PRAGMA journal_mode=WAL")
Mode Reads Writes Best For
DELETE (default) Blocked during write Single Simple scripts
WAL Concurrent Single Web apps, MCP servers

Common Gotchas

Issue Solution
"database is locked" Use WAL mode
Slow queries Add indexes, check EXPLAIN QUERY PLAN
Thread safety Use check_same_thread=False
FK not enforced Run PRAGMA foreign_keys=ON

CLI Quick Reference

sqlite3 mydb.sqlite    # Open database
.tables                # Show tables
.schema items          # Show schema
.headers on && .mode csv && .output data.csv  # Export CSV
VACUUM;                # Reclaim space

When to Use

  • Local state/config storage
  • Caching layer
  • Event logging
  • MCP server persistence
  • Small to medium datasets

Additional Resources

For detailed patterns, load:

  • ./references/schema-patterns.md - State, cache, event, queue table designs
  • ./references/async-patterns.md - aiosqlite CRUD, batching, connection pools
  • ./references/migration-patterns.md - Version migrations, JSON handling

Установить sqlite-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash

Вложенные файлы

assets/.gitkeepreferences/async-patterns.mdreferences/migration-patterns.mdreferences/schema-patterns.mdscripts/.gitkeepskill-report.json

FAQ

Что делает скилл sqlite-ops?

Patterns for SQLite databases in Python projects - state management, caching, and async operations. Triggers on: sqlite, sqlite3, aiosqlite, local database, database schema, migration, wal mode.

Как установить скилл sqlite-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sqlite-ops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить sqlite-ops с