SDK
Skills
Package reusable prompts, tools, and instructions into named skills the agent can invoke on demand.
A skill is a self-contained bundle of instructions (and optionally extra tools) that the agent can call by name through the skill tool. harnext ships a few built-ins — review, init, browser-verify — and you can add your own.
Loading skills
agent = Harnext(
provider="anthropic",
skills=["review", "browser-verify"], # built-ins by name
)
# The agent can now call them
agent.run("/review")
agent.run("Verify the login flow in the browser and attach a screenshot")Custom skills
A skill is a directory with a skill.md manifest. The front-matter declares its name and when to use it; the body is the instruction the agent loads when the skill is invoked.
skills/changelog/skill.md
---
name: changelog
description: Generate a changelog entry from the staged diff.
when_to_use: After implementing a change, before opening a PR.
---
Read the staged diff with `git diff --cached`. Summarize user-facing
changes under Added / Changed / Fixed. Write the entry to CHANGELOG.md
under a new "## Unreleased" heading if one does not exist.Registering a skill directory
agent = Harnext(provider="anthropic")
agent.skills.add("./skills/changelog") # from a directory
agent.skills.list() # ["changelog", ...]
agent.run("/changelog")Defining a skill inline
For quick, code-defined skills you can register one without a directory:
from harnext import skill
triage = skill(
name="triage",
description="Label and prioritize a bug report.",
instructions="Read the issue, assign a severity, and suggest an owner.",
)
agent = Harnext(provider="anthropic", skills=[triage])Skills vs. tools
A tool is a single function the model can call. A skill is a reusable procedure — instructions that may orchestrate several tools toward an outcome. Use a tool for a capability, a skill for a workflow.