agentsclimarketplace

Litestar settings

Skill litestar-org/litestar-skills/skills/litestar-settings

Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.

Install
npx -y skills add litestar-org/litestar-skills --skill litestar-settings

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Auto-activate for get_env, dataclass settings, pydantic_settings, BaseSettings, lru_cache config factories, app.state settings, LITESTAR_APP, or env parsing. Not for frontend env.

SKILL.md

2.3 KB, as published. Nobody here has run it

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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.