Skillquality 0.45

litestar-settings

Auto-activate for get_env, dataclass settings, pydantic_settings, BaseSettings, lru_cache settings factories, app.state settings, LITESTAR_APP, env var parsing, or typed app config. Use when defining Litestar settings, config factories, env loading, or settings injection. Not for

Price
free
Protocol
skill
Verified
no

What it does

Litestar Settings

Use this skill for typed settings, env loading, cached settings factories, and app-state wiring.

Code Style Rules

  • Use dataclass settings plus get_env for fresh Litestar apps.
  • Use pydantic-settings when the project already depends on Pydantic for config.
  • Cache settings once per process.
  • Keep secret values out of logs and generated docs.

Quick Reference

<workflow>

Workflow

  1. Inventory required env vars and defaults.
  2. Choose dataclass settings or the existing Pydantic settings path.
  3. Add a cached factory.
  4. Inject settings through app state or DI.
</workflow> <guardrails>

Guardrails

  • Do not parse env vars repeatedly in handlers.
  • Do not use msgspec Structs for env loading.
  • Do not bake environment-specific values into code.
  • Do not log secrets while debugging config.
</guardrails> <validation>

Validation Checkpoint

  • Settings are typed.
  • Settings are cached.
  • Required values fail early.
  • Tests can override settings without mutating global process env unexpectedly.
</validation> <example>

Example

from dataclasses import dataclass, field
from functools import lru_cache
from os import getenv

def get_env(key: str, default: str) -> str:
    return getenv(key, default)

@dataclass(frozen=True)
class AppSettings:
    name: str = field(default_factory=lambda: get_env("APP_NAME", "api"))

@lru_cache(maxsize=1)
def get_settings() -> AppSettings:
    return AppSettings()
</example>

References Index

Official References

Shared Styleguide Baseline

Capabilities

skillsource-litestar-orgskill-litestar-settingstopic-advanced-alchemytopic-agent-skillstopic-agentskillstopic-ai-agentstopic-claude-code-plugintopic-claude-code-skillstopic-gemini-cli-extensiontopic-htmxtopic-inertiatopic-litestartopic-mcptopic-python

Install

Quality

0.45/ 1.00

deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (2,148 chars)

Provenance

Indexed fromgithub
Enriched2026-05-18 19:13:54Z · deterministic:skill-github:v1 · v1
First seen2026-05-18
Last seen2026-05-18

Agent access