/litestar:litestar-docsfrom litestar
Guides documentation setup for Litestar ecosystem repos using Sphinx or Zensical. Covers config, themes, API extraction, cross-repo linking, and quality invariants.
Ships in litestar. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Dual-engine documentation architecture for litestar-org and ecosystem repositories, supporting both Sphinx (docs/conf.py + shibuya / litestar-sphinx-theme + autodoc / napoleon) and Zensical (zensical.toml + mkdocstrings-python / Griffe static AST). Match the repository's chosen documentation engine and apply shared quality invariants across both.
| Aspect | Sphinx (docs/conf.py) | Zensical (zensical.toml) |
|---|---|---|
| Primary Config | docs/conf.py | zensical.toml |
| Markup Formats | .rst (reStructuredText) + .md (myst-parser) | .md (Python Markdown + pymdown-extensions) |
| Theme & Styling | shibuya or litestar-sphinx-theme (docs/_static/custom.css) | variant = "modern" (docs/stylesheets/extra.css) |
| Python API Extraction | sphinx.ext.autodoc + sphinx.ext.napoleon | mkdocstrings-python (Griffe static AST) |
| Cross-Repo Linking | sphinx.ext.intersphinx (objects.inv) | mkdocstrings (enable_inventory = true, objects.inv) |
| UI Components & Tabs | sphinx-design (.. grid::, .. tab-set::), auto-pytabs | pymdownx.tabbed (content.tabs.link), pymdownx.details |
| Code Inclusion | .. literalinclude:: | pymdownx.snippets (--8<--, check_paths = true) |
| CLI Reference | sphinx-click (.. click::) | tools/docs/generate_cli_docs.py |
| Diagrams | sphinxcontrib-mermaid (.. mermaid::) | pymdownx.superfences (```mermaid) |
docs/conf.py vs zensical.toml before making edits.68–75ch (46rem) reading column with persistent left and right sidebars. Reason: Uncapped prose columns and hidden right-hand "On this page" outlines degrade scannability on technical pages.<= 12 viewports (~80–200 lines) and Reference pages at <= 120 KB HTML (<= 14 TOC items). Reason: Monolithic module dumps with 15+ classes and 200+ inherited methods bury primary constructors.show_bases = true / :show-inheritance:). Reason: Base driver or repository methods belong once on the base class Reference page.TypedDict and msgspec.Struct field with a PEP 257 inline docstring immediately below the field. Reason: Sphinx autoclass renders zero fields without inline attribute docstrings, and Griffe requires them to build structured parameter tables.@overload stubs or leak internal compiler notes (mypyc, PyCapsule) into public docstrings. Reason: Both engines render overload docstrings ahead of the implementation docstring.docs/examples/**/*.py modules in pytest. Reason: Standalone modules checked by ruff, pyright, and pytest stay runnable and prevent snippet rot.[data-md-color-scheme] CSS classes (not <picture><source media="(prefers-color-scheme: dark)">) for light/dark hero banners on Zensical pages, hide single-page left sidebars on Home, and omit redundant <h1> titles above hero logos. Reason: <picture> media queries only respond to OS-level dark mode and fail when toggling Zensical's theme button ([data-md-color-scheme="slate"]).`code` pills, reserve bordered code pills strictly for clickable links (a > code), keep tab labels short (white-space: nowrap), and never write \| inside backticked code in Markdown tables. Reason: Python-Markdown splits table cells on | before backticks are parsed (leaving literal \| in <code>), and bordered pills on every non-link code span create visual noise.| Topic | Reference File | Key Contents |
|---|---|---|
| Sphinx Architecture | references/sphinx-architecture.md | docs/conf.py, shibuya / litestar-sphinx-theme, autodoc + napoleon, sphinx-design, custom.css |
| Zensical Architecture | references/zensical-architecture.md | zensical.toml, built-in plugins, mkdocstrings-python, pymdownx, postbuild.py, verify_docs_artifacts.py |
| Information Architecture | references/information-architecture.md | Domain tabs (Learn, Databases, Integrations, Reference), page budgets, WCAG AAA palette, tutorial structure |
| Python Docstrings | references/python-docstrings.md | Google style, inline TypedDict / msgspec.Struct docstrings, type alias leak prevention, AST scanner |
| Database Adapter Docs | references/database-adapters.md | Central Capability Matrix, 1-page per-driver guide, own-symbols-only Reference templates (Sphinx & Zensical) |
| Polyglot & CLI Docs | references/polyglot-cli.md | TypeScript (TypeDoc / mkdocstrings-typescript), Rust (.pyi stubs + /rustdoc/), Click CLI generation |
| Interop & Redirects | references/migration-interop.md | Directive translation matrix, cross-engine objects.inv linking, URL redirect stubs |
Inspect the repository root for docs/conf.py (Sphinx) or zensical.toml (Zensical):
[dependency-groups] doc with sphinx, shibuya (or litestar-sphinx-theme via Git, which extends pydata-sphinx-theme), sphinx-design, sphinx-copybutton, sphinx-click, sphinxcontrib-mermaid, auto-pytabs[sphinx], and myst-parser. Configure docs/conf.py with sphinx.ext.autodoc, sphinx.ext.napoleon, and sphinx.ext.intersphinx. See references/sphinx-architecture.md.[dependency-groups] doc with zensical>=0.1.3, mkdocstrings-python>=2.0.10, pymdown-extensions>=13.0, and ruff>=0.17.6. Configure zensical.toml with use_directory_urls = true, navigation.tabs, toc.follow, pymdownx.snippets (check_paths = true), and enable_inventory = true. See references/zensical-architecture.md.TypedDict HygieneRun tools/docs/scan_public_docstrings.py --check-leaks --check-overloads --check-typeddicts <pkg> before building docs. Ensure every public TypedDict and msgspec.Struct field has an inline PEP 257 docstring and zero duplicate class-level Attributes: blocks. See references/python-docstrings.md.
Organize top-level navigation into task-oriented sections (Learn, Databases when multi-driver, Integrations, Reference, Playground when applicable, Project). Author runnable scripts under docs/examples/<area>/<topic>.py with main() entry points, include them via .. literalinclude:: (Sphinx) or --8<-- (Zensical), and execute them in tests/unit/docs/test_examples.py. See references/information-architecture.md.
<= 120 KB HTML, <= 14 TOC items)Group API directives (.. autoclass:: in Sphinx or ::: in Zensical) under 2–5 H2 category headings per Reference page with explicit member allowlists. Keep inherited_members: false / :no-inherited-members: on leaf classes so inherited base methods are documented once on the base class page. For Click CLIs, use .. click:: (sphinx-click) in Sphinx or tools/docs/generate_cli_docs.py in Zensical.
uv run sphinx-build -b html -W --keep-going docs site and verify output artifacts.zensical build --clean --strict, tools/docs/postbuild.py, and tools/docs/verify_docs_artifacts.py..sy-rside (Shibuya), .bd-sidebar-secondary (pydata-sphinx-theme / litestar-sphinx-theme), or .md-sidebar--secondary (Zensical) in custom CSS. Reason: Hiding the right-hand "On this page" outline traps readers on multi-section guides and API pages.numpydoc or sphinx_autodoc_typehints alongside sphinx.ext.napoleon in Sphinx. Reason: Combining them double-parses docstrings and duplicates union types across signatures and parameter lists.:no-index: on primary .. automodule:: directives in Sphinx. Reason: :no-index: strips HTML id="" anchors from public classes and breaks :class: cross-references across the site.400 KB and duplicates search results.mkdocs-click on Click >= 8.3 in Zensical. Reason: mkdocs-click renders literal Sentinel.UNSET defaults and drops positional argument tables; use tools/docs/generate_cli_docs.py."path/foo.md" = "path/foo/index.md" in Zensical redirect_maps when use_directory_urls = true. Reason: Both resolve to site/path/foo/index.html and create a self-redirect loop; emit flat site/path/foo.html stubs in postbuild.py.<picture><source media="(prefers-color-scheme: dark)"> for hero banners inside Zensical Markdown pages. Reason: Zensical switches themes via [data-md-color-scheme="default"|"slate"] without altering the browser's OS media query, causing the light-mode dark-ink banner to render invisibly on the dark slate canvas.`code` spans with heavy border pills or place inline `code` / numbering in ##/### headings. Reason: Bordered pills on every identifier clutter prose and tables, and code spans in headings wrap awkwardly in both the main column and the right-hand TOC.uv run python -m tools.docs.scan_public_docstrings --check-leaks --check-overloads --check-typeddicts <pkg> exits 0sphinx-build -b html -W --keep-going docs site or zensical build --clean --strict) exits 0 with zero warningsobjects.inv exists in the built output directory and is non-empty<= 120,000 bytes with <= 14 "On this page" TOC itemsuv run pytest tests/unit/docs/ -q passes with zero inline comments in docs/examples/docs/reference/adapters/asyncpg.md)# AsyncPG API Reference
```python
from sqlspec.adapters.asyncpg import AsyncpgConfig, AsyncpgDriver
```
API reference for `sqlspec.adapters.asyncpg`. Inherited execution methods are documented on [`AsyncDriverAdapterBase`](../driver/async.md).
## Configuration & Parameter Types
::: sqlspec.adapters.asyncpg.AsyncpgConfig
options:
members:
- provide_connection
- provide_session
- provide_pool
- create_pool
- close_pool
::: sqlspec.adapters.asyncpg.config.AsyncpgPoolConfig
## Driver & Exception Handling
::: sqlspec.adapters.asyncpg.AsyncpgDriver
options:
inherited_members: false
show_bases: true
members:
- dialect
- data_dictionary
docs/reference/adapters/asyncpg.rst)AsyncPG API Reference
=====================
.. code-block:: python
from sqlspec.adapters.asyncpg import AsyncpgConfig, AsyncpgDriver
API reference for ``sqlspec.adapters.asyncpg``. Inherited execution methods are documented on :class:`~sqlspec.driver.AsyncDriverAdapterBase`.
Configuration & Parameter Types
-------------------------------
.. autoclass:: sqlspec.adapters.asyncpg.AsyncpgConfig
:members: provide_connection, provide_session, provide_pool, create_pool, close_pool
:no-inherited-members:
:show-inheritance:
.. autoclass:: sqlspec.adapters.asyncpg.config.AsyncpgPoolConfig
:members:
:no-inherited-members:
Driver & Exception Handling
---------------------------
.. autoclass:: sqlspec.adapters.asyncpg.AsyncpgDriver
:members: dialect, data_dictionary
:no-inherited-members:
:show-inheritance:
references/database-adapters.md (opens in a new tab)references/information-architecture.md (opens in a new tab)references/migration-interop.md (opens in a new tab)references/polyglot-cli.md (opens in a new tab)references/python-docstrings.md (opens in a new tab)references/sphinx-architecture.md (opens in a new tab)references/zensical-architecture.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
20 skills in this plugin
/advanced-alchemyUse when working with advanced_alchemy, alembic/, SQLAlchemyAsyncRepositoryService, SQLAlchemyAsyncConfig, ServiceGroup, FilterSet, CursorFilter, RelationshipFilter, filters, or storage. Not for raw SQLAlchemy — use sqlspec./litestarUse when working with Litestar, Controller, Router, @get/@post, FromPath, MsgspecDTO, OpenAPIConfig, Provide, FromDishka, Guard, ASGIMiddleware, HTTPException, ChannelsPlugin, or WebSocket. Not for standalone libs./litestar-autowireUse when working with litestar_autowire, AutowirePlugin, AutowireConfig, domain_packages, AutowireIntegration, AutowireLoader, or clear_autowire_cache. Not for manual Router composition — use explicit routes./litestar-buildUse when working with uv build, uv_build, hatch build, PyApp, scie-jump, PYAPP_*, wheel assets, GitHub release matrices, cargo-zigbuild, or python-build-standalone. Not for runtime deployment./litestar-deploymentUse when working with Dockerfile, compose, Railway, Cloud Run, GKE, systemd, Kubernetes, Terraform, deploy scripts, or granian/litestar run at runtime. Not for packaging artifacts./litestar-emailUse when working with litestar_email, EmailPlugin, EmailConfig, EmailService, EmailMessage, EmailMultiAlternatives, InMemoryBackend, SMTPConfig, ResendConfig, SendGridConfig, MailgunConfig, SESConfig. Not for marketing APIs — use vendor SDKs.npx claudepluginhub litestar-org/litestar-skills --plugin litestarOther plugins' skills for the same job