alti3/litestar-skills/litestar-dataclasses

Claude Code and agent skill by alti3/litestar-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use Python dataclasses as Litestar transport models with explicit typing, defaults, and DTO interplay. Use when modeling request/response contracts with lightweight typed objects. Do not use when plugin-backed model systems (Pydantic/msgspec/attrs/ORM) are a better fit for the task.

Install

npx vskill@latest install alti3/litestar-skills/litestar-dataclasses

SKILL.md

The same SKILL.md was published earlier as alti3/litestar-skills/litestar-dataclasses.

Dataclasses

Execution Workflow

  1. Define dataclasses for transport boundaries with explicit field types.
  2. Use defaults and optionality intentionally to avoid ambiguous schemas.
  3. Combine with DTO configuration when write/read shapes diverge.
  4. Keep domain entities and transport dataclasses separate when needed.

Implementation Rules

  • Favor immutable or clearly controlled mutation patterns.
  • Avoid embedding persistence/session behavior in dataclasses.
  • Keep field names/schema stable for clients.
  • Validate nested dataclass behavior in serialization paths.

Example Pattern

python
from dataclasses import dataclass
from litestar import post
@dataclass
class CreateUser:
name: str
email: str
@post("/users")
async def create_user(data: CreateUser) -> dict[str, str]:
return {"email": data.email}

Validation Checklist

  • Confirm request binding maps correctly into dataclass fields.
  • Confirm response serialization matches expected JSON schema.
  • Confirm DTO include/exclude behavior remains predictable.

Cross-Skill Handoffs

  • Use litestar-dto for advanced shaping and nested field policy.
  • Use litestar-plugins when switching to different model ecosystems.

Litestar References

  • https://docs.litestar.dev/latest/usage/dto/index.html

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
7
Repository forks
1
7-day trend score
15

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alti3/litestar-skills/litestar-dataclasses/badge)](https://verified-skill.com/skills/alti3/litestar-skills/litestar-dataclasses)

Something wrong with this skill or its page? Tell us.