Skip to main content

haiku.skills

Tests codecov

Skill-powered AI agents implementing the Agent Skills specification with pydantic-ai.

How it works

SkillToolset is a pydantic-ai FunctionToolset that you attach to your own agent. It exposes a single execute_skill tool. When the agent calls it, a focused sub-agent spins up with only that skill's instructions and tools — then returns the result. The main agent never sees the skill's internal tools, so its tool space stays clean no matter how many skills you load.

This sub-agent architecture means each skill runs in isolation with its own system prompt, tools, and token budget. Skills don't interfere with each other, tool descriptions don't compete for attention, and failures in one skill can't confuse another.

Features

  • Sub-agent execution — Each skill runs in its own agent with dedicated instructions and tools
  • Skill discovery — Scan filesystem paths for SKILL.md directories or load from Python entrypoints
  • In-process tools — Attach pydantic-ai Tool functions or AbstractToolset instances to skills
  • Per-skill state — Skills declare a Pydantic state model and namespace; state is passed to tools via RunContext and tracked on the toolset
  • AG-UI protocol — State changes emit StateDeltaEvent (JSON Patch), compatible with the AG-UI protocol
  • Script tools — Python, JavaScript, TypeScript, and shell scripts in scripts/; Python scripts with a main() function are AST-parsed for typed tool schemas and executed via uv run with PEP 723 dependency support
  • MCP integration — Wrap any MCP server (stdio, SSE, streamable HTTP) as a skill
  • Signing and verification — Identity-based skill signing via sigstore

Quick start

uv add haiku.skills
from pathlib import Path
from pydantic_ai import Agent
from haiku.skills import SkillToolset, build_system_prompt

toolset = SkillToolset(skill_paths=[Path("./skills")])
agent = Agent(
    "anthropic:claude-sonnet-4-5-20250929",
    instructions=build_system_prompt(toolset.skill_catalog),
    toolsets=[toolset],
)

result = await agent.run("Analyze this dataset.")
print(result.output)

Documentation

Full documentation at ggozad.github.io/haiku.skills.

License

MIT

Metadata

Release files for haiku.skills 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for haiku.skills 0.9.1
File Size Uploaded Provenance Actions
haiku_skills-0.9.1.tar.gz 187.6 kB Without provenance Details for haiku_skills-0.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for haiku.skills 0.9.1
File Interpreter ABI Platform Actions
haiku_skills-0.9.1-py3-none-any.whl Python 3 none any Details for haiku_skills-0.9.1-py3-none-any.whl

Total release size: 217.8 kB

Release files / haiku_skills-0.9.1.tar.gz

Download URL haiku_skills-0.9.1.tar.gz
Size 187.6 kB
Tags Source
SHA-256 checksum
How to use checksums
48bd05e25de40ee652d86cba0f49c332c9d532722f6458e203e3f4695da63b52
BLAKE2b-256 checksum
How to use checksums
f80c0f96fde2cf4ff94f57d3e1c0eb67bf698c545acc36435997622491a440ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / haiku_skills-0.9.1-py3-none-any.whl

Download URL haiku_skills-0.9.1-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d03d5f6ad86eb6311befa69762f845e3a59924364cb7bf89808bac4a3ce6696
BLAKE2b-256 checksum
How to use checksums
6cfed0d71731973c377ca12e257fa68442bf4e0f28198fb57e1e44188d890249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for haiku.skills 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page