一键导入
add-storage
Step-by-step guide for adding a new storage backend
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Step-by-step guide for adding a new storage backend
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guided workflow for adding a new storage backend
Run all quality checks in sequence (lint, mypy, bandit, tests)
Run full linting and type checking suite
Run project tests (unit or all)
Run all linting checks (ruff format, ruff check, codespell)
Review code changes for quality, security, and project conventions
| name | add-storage |
| description | Step-by-step guide for adding a new storage backend |
| tags | ["architecture","implementation"] |
Create implementation directory:
src/jobify_db/_internal/{db}/{driver}/__init__.py
src/jobify_db/_internal/{db}/{driver}/storage.py
src/jobify_db/_internal/{db}/{driver}/queries.py
Create shared queries if needed:
src/jobify_db/_internal/{db}/queries.py # DDL (CREATE TABLE), SELECT
Create public re-export:
# src/jobify_db/{db}/{driver}.py
from jobify_db._internal.{db}.{driver}.storage import {Driver}Storage
__all__ = ["{Driver}Storage"]
Add empty __init__.py for public subpackage src/jobify_db/{db}/__init__.py
Add optional dependency in pyproject.toml under [project.optional-dependencies]
Storage class requirements:
Storage, use @override on all protocol methods__init___owns_pool = pool is None to track ownershippool/client property raises StorageNotInitializedError if Nonestartup() creates pool if needed + runs DDLshutdown() closes pool ONLY if _owns_pool is TrueAdd mock factory to tests/factories.py if the driver has complex mock setup
Add unit tests: tests/unit/test_{driver}_storage.py
Add fixtures to tests/integration/conftest.py, append fixture names to storage/storage_from_external params in tests/integration/test_storage.py
Add examples: examples/{driver}_example.py, examples/{driver}_external_pool_example.py
Update: README.md, noxfile.py, CLAUDE.md, AGENTS.md, QWEN.md
Verify: just lint && just mypy && uv run --active --frozen pytest tests/unit/ -q