Skills

Create Atomic Schema

Design and write a `BaseIOSchema` input/output pair for an Atomic Agents agent or tool...

Install

npx skills add Eigenwise/atomic-agents --skill create-atomic-schema -g -a claude-code -y
Category
Design
Updated
6d ago
License
MIT
Context cost
Mediumabout 1,547 tokens
Runs scripts
No, instructions only

What it does

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`.

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.

  1. Caller, is this for an AtomicAgent, a BaseTool, both (an agent that emits a tool-input schema), or a nested sub-schema?
  2. Direction, input only, output only, or a paired Input/Output?
  3. Fields, what fields does the caller need, with which types? (Required vs optional, defaults, constraints.)
  4. 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

Read the whole SKILL.md on GitHub

More in Design