Skip to main content

Skills

Skills package reusable instructions, reference files, and optional tools in a directory. An agent starts with a compact catalog and loads detailed material only when it is relevant, keeping the initial prompt focused. ISH follows the Agent Skills directory convention.

import asyncio
from ish import Agent, SkillRegistry

registry = SkillRegistry()
registry.add_search_path("./my-skills")

agent = Agent(
name="repository_helper",
model="gpt-4o-mini",
skills=registry,
max_active_skills=5,
)

async def main() -> None:
try:
result = await agent.run("Review the repository using relevant skills.")
print(result.content)
finally:
agent.close()

asyncio.run(main())

Skill discovery​

Why skills load on demand​

PhaseWhat the agent receivesWhen it receives it
CatalogSkill names and short descriptionsWhen the catalog is attached
InstructionsThe selected SKILL.md bodyAfter the agent activates that skill
References and gated toolsRequested files and tools tied to the skillOnly when the agent needs them and the skill is active

Directory layout​

my-skills/
└── git-hygiene/
├── SKILL.md
├── references/
└── scripts/
  • SKILL.md (required): YAML frontmatter with a name and description, followed by Markdown instructions.
  • references/ (optional): Longer documentation, schemas, or checklists the agent can read on demand.
  • scripts/ (optional): Helper scripts that your application may expose through its own tools. Discovering, listing, reading, or activating a skill does not execute files in this directory. A script runs only if an application explicitly exposes and invokes an execution tool.

Example SKILL.md:

---
name: git-hygiene
description: Use when reviewing branch history or preparing a Git change.
---

# Git hygiene

Check the working tree before editing. Keep each change focused and verify it
with the repository's documented checks.

Load a skill catalog​

Attach a SkillCatalog to expose search_skills, read_skill, and activate_skill to the agent. See Authoring Skills for file layout and Use Skills with Agents for activation and tool gating.

Trust boundaries​

  • Skills are instructional and resource bundles, not OS sandboxes or authorization policies. Review every third-party SKILL.md and scripts/ directory as application code before attaching it to an agent.
  • While read_skill enforces strict directory containment under the skill folder, once a skill body enters model context its instructions can steer subsequent model tool calls within whatever capabilities your agent grants.
  • Skill discovery reads skill metadata and instructions. It does not import or execute code from a skill directory. A tools.py file has no special meaning to the SDKs.
  • The standard sandbox execute tool sets the command's working directory and applies process limits, but it does not isolate the process from the host filesystem or network. Do not use it as a security boundary for untrusted skill scripts. ISH also exposes Rust-backed kernel-isolated process execution (KernelSandbox / executeKernelProcess); it uses an available OS backend and fails closed when none is available. An application must explicitly provide an agent tool that calls this isolated path and make the skill files available inside its workspace. See Sandbox execution.

Author a skill​

Create a folder with a SKILL.md file. Add a short YAML header with a unique name and a specific description, then write the instructions the agent should receive only when the skill is activated. Optional references/ files can hold longer material. See the skill authoring guide for the full format and examples.

Use skills in an agent​

Add the skill folder to a SkillCatalog or Python SkillRegistry, then attach that catalog to the agent. The agent can search the compact catalog, read a skill when it is relevant, and activate its instructions. Use max_active_skills to limit active skills and requires_skill to gate tools. See using skills with agents for SDK examples and activation behavior.