litestar-styleguide

Centralizes shared code style rules for Litestar, Python, TypeScript, testing, and CI/CD conventions.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/renjianguo666/litecms --skill litestar-styleguide-renjianguo666
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: litestar-styleguide
Source: https://github.com/renjianguo666/litecms/tree/main/.agents/skills/litestar-styleguide
Command: npx skills add https://github.com/renjianguo666/litecms --skill litestar-styleguide-renjianguo666

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When maintaining multiple Litestar-related skills or projects, style rules like PEP 604 unions, async I/O, ruff/mypy/pyright configuration, and pytest conventions get duplicated and drift apart. This Skill provides a single shared style baseline that sibling skills link to instead of duplicating. ## Core Features & Use Cases - Shared Reference Files: Six focused references covering general principles, Python, Litestar, TypeScript, testing (pytest/vitest), and CI/CD (GitHub Actions, pre-commit, uv). - Single-Source-of-Truth Workflow: Generic rules live here exactly once; sibling skills link to only the references matching their language/framework mix. - Authoring Guardrails: Enforces terse, imperative rules with one-line justifications, copy-pasteable examples, and validation checklists to prevent duplication. - Use Case: When two sibling skills both write "use ruff format, never black", pull the rule into references/python.md once and replace the duplicates with links. ## Quick Start Ask the AI to review your Litestar project's Python code against the shared styleguide baseline for PEP 604 unions, async I/O, and docstring conventions.

Frequently Asked Questions about litestar-styleguide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent code style across multiple Litestar skills?▼

Place generic rules (type hints, naming, imports, tooling) in this shared baseline's reference files and have each sibling skill link to only the relevant subset. Framework-specific rules stay in the individual skill, so nothing is duplicated.

Should I use Optional or PEP 604 union syntax in Python?▼

Use PEP 604 union syntax (`str | None`) instead of `typing.Optional`. The baseline also clarifies that `from __future__ import annotations` is fine in application code but should be avoided in modules with runtime-introspected types like msgspec.Struct or SQLAlchemy Mapped models.

What CI/CD tooling does this styleguide recommend for Python projects?▼

It recommends GitHub Actions with astral-sh/setup-uv instead of actions/setup-python, `uv sync` instead of pip install, pre-commit with ruff and typos hooks, and caching for both pre-commit and uv. Conventional commits are enforced via a pre-commit hook.

When should a rule go in the shared styleguide versus a sibling skill?▼

Generic rules about language, tooling, or testing belong in the shared baseline; framework-specific implementation guidance stays in the individual skill. If a rule becomes contentious across two or more sibling skills, pull it into the appropriate reference file here.

Does this skill provide Litestar framework implementation guidance?▼

No, it only provides the shared style baseline such as guards, DTOs, DI, and plugin conventions at a style level. For framework-specific implementation guidance, use the individual focused skill referenced in the description.