create-atomic-schema
What it does
It explains how to write the input and output shapes that agents and tools use in the Atomic Agents framework. It is for developers defining the data each part of an AI app expects and returns.
When to use it
- βWhen a developer needs an output shape that a language model should fill in for an agent.
- βWhen a developer wants to add a field to an existing agent or tool input.
- βWhen a developer wants separate success and failure output shapes for a tool.
Skill link
https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/create-atomic-schema/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βDesign the output schema for a planner agent that returns a list of steps with owners and due dates.β
5 new skills a week. 1 minute to read.
How it works
The skill asks who uses the schema and which fields and failure cases are needed, then writes a schema class with a docstring and field descriptions, since those descriptions also guide the model.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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". frameworkskill: 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
from typing import Optional, Literal
from pydantic import Field
from atomic_agents import BaseIOSchema
class WeatherInput(BaseIOSchema):
"""A request for current weather conditions."""
city: str = Field(..., description="City name, e.g. 'Brussels' or 'New York'.")
units: Literal["metric", "imperial"] = Field(
default="metric",
description="Unit system for the temperature.",
)
class WeatherOutput(BaseIOSchema):
"""Current weather conditions for a city."""
status: Literal["ok", "error"] = Field(..., description="Outcome code.")
temperature_c: Optional[float] = Field(
default=None, description="Temperature in Celsius when status='ok'."
)
summary: Optional[str] = Field(
default=None, description="Human-readable summary when status='ok'."
)
error: Optional[str] = Field(
default=None, description="Failure message when status='error'."
)
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:
class SearchSuccess(BaseIOSchema):
"""Successful search result."""
kind: Literal["ok"] = "ok"
results: list[str] = Field(..., description="Matching items.")
class SearchFailure(BaseIOSchema):
"""Search could not complete."""
kind: Literal["error"] = "error"
code: Literal["rate_limited", "no_results", "upstream_error"] = Field(
..., description="Machine-readable failure code."
)
message: str = Field(..., description="Human-readable failure reason.")
class SearchOutput(BaseIOSchema):
"""Search outcome β success or typed failure."""
result: SearchSuccess | Se
FAQ
Why does the schema need docstrings?
The framework requires them, and the descriptions help the language model fill each field correctly.
Can a schema have failure versions?
Yes. The skill covers success and error variants for outputs that can fail.
Who is this for?
Developers building Atomic Agents apps who need typed data contracts.
Details
Original description by the author
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`.
repo: Eigenwise/atomic-agents
Popularity
- GitHub stars
- 6.3k
- Ranking position
- #14239
- License
- MIT
- Updated
- 10/29/2026
Comments
- β¦
More skills from this repository
create-atomic-agent
6.3kHelps your agent build a new Atomic Agents agent with typed input and output, a system prompt, and a chosen AI provider.
create-atomic-context-provider
6.3kHelps your agent add a context provider to an Atomic Agents agent, so fresh details like the time or retrieved documents appear in its prompt.
create-atomic-tool
6.3kHelps your agent build a typed tool for an Atomic Agents app, such as an API wrapper or calculator that an agent can call.
framework
6.3kHelps your agent work correctly with the Atomic Agents Python framework, covering schemas, agents, tools, prompts and provider setup.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.