brainblend-ai/atomic-agents/create-atomic-schema
Claude Code and agent skill by brainblend-ai/atomic-agents
- community
- ext:[{"type":"context","description":"Custom context provider definitions"}]
Checking that the SKILL.md file is still in the repository.
Design and write a `BaseIOSchema` input/output pair for an Atomic Agents agent or tool — docstrings, field descriptions, validators, error variants. Use when the user asks to "create a schema", "design the input/output schema", "define an `IOSchema`", "write a `BaseIOSchema`", "model the agent's output", or runs `/atomic-agents:create-atomic-schema`.
Install
npx vskill@latest install brainblend-ai/atomic-agents/create-atomic-schemaSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as brainblend-ai/atomic-agents/create-atomic-schema.
Create an Atomic Agents Schema
Author a BaseIOSchema pair (input and/or output) that becomes the contract between an agent or tool and its caller. The framework enforces docstrings on every subclass, and Instructor flows field descriptions into the LLM prompt — so the schema is part of the prompt, not just typing.
For deep material (validators, discriminated unions, error envelopes), the authority is ../framework/references/schemas.md. This skill is the action-oriented path: clarify → write → validate.
When this fires vs the umbrella framework skill
- This skill: the user is creating or modifying a specific schema — e.g. "design the output schema for the planner agent", "add a field to
WeatherInput", "split the result into success and failure variants". - `framework` skill: the user is asking about Atomic Agents in general or doing something other than authoring schemas.
Phase 1 — Clarify
Ask only what is not already obvious from context. Bundle into one message; do not interrogate one-at-a-time.
- Caller — is this for an
AtomicAgent, aBaseTool, both (an agent that emits a tool-input schema), or a nested sub-schema? - Direction — input only, output only, or a paired Input/Output?
- Fields — what fields does the caller need, with which types? (Required vs optional, defaults, constraints.)
- Failure modes — can this legitimately fail? If yes, plan a typed error variant rather than raising. See
../framework/references/schemas.md→ "Error-schema pattern".
If the user is mid-conversation about an existing schema, skip questions answered in context.
Phase 2 — Write
Place schema(s) where they will be imported from. Conventional locations:
<project>/agents/<agent_name>/schemas.py— agent-owned schemas<project>/tools/<tool_name>_tool.py— tool I/O lives next to the tool<project>/schemas/<topic>.py— schemas shared across multiple components
Required ingredients on every schema
- Subclass
BaseIOSchema(notBaseModel). - A non-empty class docstring — the framework raises at import otherwise. Write it for the LLM, because Instructor uses it as the schema's
description. - Every
Field(...)carries adescription=written for the LLM. - Use
Literal[...]for closed sets before reaching forEnum— flatter JSON Schema, easier for Instructor.
Minimal template
When to add validators
- Field-level for normalization (lowercase, strip, enum coercion) and single-field validation.
- Model-level (
@model_validator(mode="after")) for cross-field rules (start ≤ end, mutually exclusive flags).
Validation errors trigger Instructor retries and fire the parse:error hook — they're a feature, not a failure path. Do not swallow them.
When to use discriminated unions
If the caller must exhaustively handle multiple result shapes, prefer a union over an inflated single schema:
The kind discriminator on each variant lets Pydantic resolve the union without ambiguity.
Phase 3 — Verify
Smoke-check the schema imports cleanly and round-trips through model_json_schema():
If the import raises ValueError("… must have a non-empty docstring …"), add the docstring. If a field's JSON schema is missing a description, add description= to its Field(...).
Phase 4 — Hand off
Tell the user:
- Where the schema lives and what to import.
- Next step in their flow:
- Wiring it into an agent →
create-atomic-agentskill. - Wiring it into a tool →
create-atomic-toolskill. - Adding a context provider that depends on the same domain →
create-atomic-context-providerskill.
Anti-patterns to refuse on sight
- Plain
BaseModelinstead ofBaseIOSchema— loses docstring enforcement and the JSON-schema overrides Instructor depends on. - Missing class docstring — framework raises at import.
Field(...)withoutdescription=— Instructor has nothing to tell the model about the field.Optional[str]with no default — required-but-nullable, which is rarely the intent.dict,Any, orobjectas a field type — the LLM produces anything and Pydantic cannot validate.- Catching
ValidationErrorto "make the agent more robust" — fix the field constraints or descriptions instead.
For deeper material — composition, nested schemas, discriminated unions in production, validator gotchas — load ../framework/references/schemas.md.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-plugin/atomic-agents/skills/create-atomic-schema/SKILL.md
Popularity
- Repository stars
- 6,028
- Repository forks
- 513
- 7-day trend score
- 44
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
contextCustom context provider definitions
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
[](https://verified-skill.com/skills/brainblend-ai/atomic-agents/create-atomic-schema)