Skills

Create Atomic Tool

Build a `BaseTool[InSchema, OutSchema]` subclass, input/output schemas...

Install

npx skills add Eigenwise/atomic-agents --skill create-atomic-tool -g -a claude-code -y
Category
AI and agents
Updated
6d ago
License
MIT
Context cost
Mediumabout 2,214 tokens
Runs scripts
No, instructions only

What it does

Build a `BaseTool[InSchema, OutSchema]` subclass, input/output schemas, `BaseToolConfig`, `run()` (and optional `run_async()`), env-driven secrets, typed failure outputs. Use when the user asks to "add a tool", "create a tool", "wrap an API as a tool", "build a `BaseTool`", "make a calculator/search/weather tool", or runs `/atomic-agents:create-atomic-tool`.

Create an Atomic Agents Tool

A tool is a deterministic capability an agent can invoke. In Atomic Agents, every tool is a BaseTool[InSchema, OutSchema] subclass with a typed run() (and optional run_async()). The input/output schemas double as the tool's signature for the LLM and as Pydantic validation at runtime.

For deep material (MCP interop, distributing as a standalone package, advanced error patterns), the authority is ../framework/references/tools.md. This skill is the action-oriented path: clarify → write → verify.

When this fires vs the umbrella framework skill

  • This skill: the user is creating a specific tool, wrapping an API, building a calculator, scraping a page, querying a DB.
  • framework skill: questions about Atomic Agents in general, or the user is doing something other than authoring a tool.

Phase 1, Clarify

Bundle into one message:

  1. What does the tool do? One sentence. This becomes the class docstring and feeds the LLM's tool description.
  2. Inputs and outputs. Names, types, units. If unclear, propose a schema pair and confirm.
  3. External dependencies. HTTP API? DB? Local computation only? If HTTP, what auth (API key env var, OAuth, none)?
  4. Sync, async, or both? If the rest of the project is async or the call is I/O bound, plan a run_async() alongside run().
  5. Failure modes. Rate limits, not-found, network errors, how should the agent see them? Default: typed failure output, not raised exceptions.

Skip any question already answered in context.

Phase 2, Plan

Confirm the location and shape in one short block, then proceed:

Read the whole SKILL.md on GitHub

More in AI and agents