advanced-alchemy
Auto-activate for advanced_alchemy, alembic/, SQLAlchemyAsyncRepositoryService,…
Auto-activate for Google ADK, LlmAgent, Runner, SQLSpecSessionService, google-genai, AgentRuntime, SpecTree, DynamicWorkflow, FunctionTool, or SSE agent chats. Not for offline ML training.
$ npx -y skills add litestar-org/litestar-skills --skill litestar-ai --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/litestar-aiContext preview
The summary Claude sees to decide when to auto-load this skill.
Auto-activate for Google ADK, LlmAgent, Runner, SQLSpecSessionService, google-genai, AgentRuntime, SpecTree, DynamicWorkflow, FunctionTool, or SSE agent chats. Not for offline ML training.
name: litestar-ai description: Auto-activate for Google ADK, LlmAgent, Runner, SQLSpecSessionService, google-genai, AgentRuntime, SpecTree, DynamicWorkflow, FunctionTool, or SSE agent chats. Not for offline ML training.
Build production AI agents, multi-agent specialist hierarchies, multi-step workflows, and structured LLM services in Litestar using either **Google ADK (`google-adk` + `sqlspec.extensions.adk`)** or a **native `google-genai` + `msgspec` agent runtime**.
| Pattern | Primary Signals | Best For | | --- | --- | --- | | **Google ADK + SQLSpec** (`google.adk` + `sqlspec.extensions.adk`) | `LlmAgent`, `App`, `Runner`, `SQLSpecSessionService`, `SQLSpecMemoryService`, `FunctionTool`, `SkillToolset` | Multi-turn conversational agents using ADK's built-in `sub_agents` delegation, `ContextCacheConfig`, `EventsCompactionConfig`, and `BasePlugin` callbacks backed by SQLSpec stores | | **Native `google-genai` + `msgspec` Runtime** (`google.genai` + `msgspec` + `sqlspec`) | `AgentRuntime`, `AgentSpec`, `SpecTree`, `DynamicWorkflow`, `WorkflowEngine`, `declare`, `CacheRegistry`, `CompactionPolicy` | Explicit control over DAG workflows (`WorkflowNode`), parallel tool execution (`asyncio.gather`) with live SSE events, optimistic session locking (`expected_version`), and custom prompt slot fencing | | **Structured-Output Domain Service** (`google.genai` + `GenerateContentConfig`) | `response_mime_type="application/json"`, `response_schema`, `embed_content`, `tenacity.retry` | Single-shot or batch classification, entity extraction, and embedding pipelines without multi-turn conversation state | | **MCP Server Surface** (`litestar-mcp`) | `LitestarMCP`, `MCPConfig`, `mcp_tool=`, `mcp_resource=` | Exposing Litestar route handlers or domain services to external MCP clients (use `litestar-mcp`) |
| Prefix | Lifetime | Typical Keys | Persistence Behavior | | --- | --- | --- | --- | | `app:*` | Application-wide | `app:catalog_version`, `app:feature_flags` | Shared across all users and sessions for `app_name` | | `user:*` | Principal-scoped | `user:preferred_region`, `user:output_format` | Shared across sessions belonging to the same `(workspace_id, user_id)` | | *(unprefixed)* | Session-scoped | `usage.total_tokens`, `compaction`, `workspace_id` | Persisted on the individual conversation session row | | `temp:*` | Single turn | `temp:run_context_token`, `temp:dynamic_instruction`, `temp:tool_calls` | Invocation-local only; stripped before database persistence |
| `event` | Payload Shape (`data`) | Purpose | | --- | --- | --- | | `session` | `{"session_id": "...", "compacted_through_seq": 12}` | Emitted first so the client can bind the active session ID | | `tool_call` | `{"id": "...", "name": "...", "author": "...", "args": {...}}` | Model requested a tool invocation | | `tool_start` | `{"id": "...", "name": "...", "author": "...", "args": {...}}` | Parallel tool runner or workflow node started execution | | `tool_end` | `{"id": "...", "name": "...", "author": "...", "status": "completed" \| "error", "result_preview": "..."}` | Tool finished with bounded JSON preview | | `delta` | `{"text": "..."}` | Incremental assistant Markdown text chunk (thoughts excluded) | | `ping` | `{}` | Keep-alive frame emitted on idle intervals before terminal frame | | `complete` | `{"prompt_tokens": ..., "output_tokens": ..., "total_tokens": ..., "cached_tokens": ..., "finish_reason": "STOP"}` | Terminal success frame with aggregated turn token usage | | `error` | `{"code": "...", "message": "..."}` | Terminal error frame (`session_turn_limit`, `llm_calls_exhausted`, `session_conflict`, `stream_error`) |
<workflow>
1. Inspect `pyproject.toml` and existing agent modules. 2. If `google-adk` is installed or `LlmAgent` / `Runner` is present, follow the **Google ADK + SQLSpec** pattern in [adk-and-serving.md](references/adk-and-serving.md). 3. If `google-genai` is used directly with `msgspec.Struct` events, `SpecTree`, or `DynamicWorkflow`, follow the **Native `google-genai` Runtime** pattern in [custom-agents-and-tools.md](references/custom-agents-and-tools.md). 4. If the task is non-conversational classification, extraction, or embedding, implement a **Structured-Output Domain Service** with `response_mime_type="application/json"` and `tenacity` backoff on HTTP 429.
1. **Coordinator + Specialist Tree**:
2. **Static vs Dynamic Instructions**:
Opinionated, first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework and its ecosystem — publishable to every major AI agent and IDE from a single repo.
Repo: litestar-org/litestar-skills
Auto-activate for advanced_alchemy, alembic/, SQLAlchemyAsyncRepositoryService,…
Auto-activate for litestar_autowire, AutowirePlugin, AutowireConfig, domain_packages,…
Auto-activate for uv build, hatch build, PyApp, PYAPP_*, wheel assets, GitHub release…
Auto-activate for Dockerfile, compose, Railway, Cloud Run, GKE, systemd, Kubernetes,…
Auto-activate for litestar_email, EmailPlugin, EmailConfig, EmailService, EmailMessage,…
Auto-activate for litestar_granian, GranianPlugin, litestar run Granian options, runtime…