agenthatch CLI

A CLI that compiles a SKILL.md file into a standalone Python agent with tools, knowledge-base retrieval and its own runner.

  • 73 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Generation and self-review call an external model and spend provider tokens.
  • The generated agent runs its own tools and keeps the key in a settings file.
All reasons and checks

agenthatch/agenthatch

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/agenthatch

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Generation and self-review call an external model and spend provider tokens.
  • The generated agent runs its own tools and keeps the key in a settings file.

This is third-party code. Review the repository files before installing.

What it does

agenthatch treats SKILL.md as source code. The `agenthatch hatch` command parses the file deterministically, six specialized model passes then extract a specification, and Jinja2 templates turn it into a Python package: its own `pyproject.toml`, a CLI entry point, typed tools, MCP wiring and a runtime config file. After generation the agent inspects its own `tools.py`: it looks for undefined variables and stubs, runs each tool with sample parameters and asks the model to rewrite broken functions, up to three rounds. If a directory of reference files is passed as a second argument, an SQLite FTS index is built next to it and a `retrieve()` tool appears: the agent answers from the archive and names the source file for every claim.

Who it is for. People with more than three SKILL.md files who want real programs from them rather than prose for a model to interpret.

Good fit when

  • A skill is needed as a separate program that can be imported and run outside Claude Code.
  • A directory of reference documents becomes an agent that answers strictly from the archive.
  • You want to review the specification first with `--no-generate` or `--dry-run`.
  • The same skill runs on different models, including local ones through Ollama.

Not a fit when

  • A skill is short and works as is, so compilation adds an extra layer.
  • No supported model provider is reachable, since generation uses AI passes.
  • You need a deterministic result with no model calls during generation.

Example request

Add my SKILL.md to agenthatch, hatch an agent with a knowledge base from the ./docs folder and show the self-review report.

Limitations

Python 3.11 or newer is required. Generation calls the model six times in a row plus a self-review stage, so it spends the chosen provider tokens, and the key is written to `runtime.toml` of the generated agent, which must not be published. The author calls it a solo project looking for first contributors. Agent quality depends on how detailed the skill is: vague text yields a vague specification. Check the result on real data before running.

How to disable. Run `pip uninstall agenthatch`. Delete the `~/.agenthatch/` folder with provider settings and the skill house by hand, along with any generated agents.

FAQ

Which model providers are supported?

OpenAI, Anthropic, DeepSeek, GLM, Qwen, Ollama and any OpenAI-compatible endpoint. Settings live in a TOML file under `~/.agenthatch/`.

What is inside a generated agent?

A package with `agent.py`, `tools.py`, `references.py`, an `agenthatch.yaml` manifest, the original skill and a `runtime.toml` file. Knowledge-base mode adds an index.

How do I hatch an agent with a knowledge base?

Pass a directory as a second argument: `agenthatch hatch my-skill ./my-knowledge-base`. The agent answers only from the index and reports it when a request is outside it.

Can I review the specification before code generation?

Yes. `--no-generate` skips the third phase and `--dry-run` previews without writing files. `--force` overwrites a previous agent.

How does planning work at runtime?

The agent uses a six-state machine: starting, planning, executing, verifying, replanning and done. On a tool failure it rebuilds the steps.

Discussion

No questions or reviews yet.

CLI tools

The `askit` command line toolkit for agent skills: lint, security scan, tests, forging new ones and export to any agent.

CLIExtended access50Repository stars

HEXIS compiles a SKILL.md into a state machine: code fixes the order of steps and the model reasons only inside each state.

CLIExtended access136Repository stars

A meta-skill that folds rules scattered across AGENTS.md, CLAUDE.md and Cursor files into one project skill with task routes.

PluginExtended access622Repository stars

A command-line skill manager: installs skills from a marketplace, GitHub, private Git and npm into 45 agents' folders and scans them first

CLIExtended access194Repository stars

A CLI skill manager for AI agents: install from repositories, translate between agent formats and deploy into their configs

CLIExtended access1.6KRepository stars

A meta-skill that takes a vague idea to a finished agent skill: it designs, writes the files, checks them and refines by evidence

SkillExtended access250Repository stars

README in short

The project splits generation into three phases: a parse without AI, six model passes with cross-validation and template code generation. The result is saved in a skill house and can be rerun any time. The README compares SKILL.md with a compiled agent on reliability, typing and reproducibility.

README badge

Report a problem