Skill Specification (SKILL.md)
A skill is a folder with a SKILL.md file and optional reference material or scripts. ISH follows the Agent Skills specification so the same skill layout can be used across SDKs.
- Python
- TypeScript
- Rust
- Go
- C#
- Java
from ish import SkillRegistry
catalog = SkillRegistry()
result = catalog.add_search_path("./skills")
print("Loaded:", result.loaded)
print("Diagnostics:", result.diagnostics)
matches = catalog.search("financial", limit=5)
prompt = catalog.get_catalog_prompt(max_items=10)
activation = catalog.activate_current("pdf-financial-extractor", max_active=5)
import { IshClient, SkillCatalog } from "ish-harness";
const client = new IshClient();
const catalog = new SkillCatalog(client);
const result = catalog.addSearchPath("./skills");
console.log("Loaded:", result.loaded, "Diagnostics:", result.diagnostics);
const matches = catalog.search("financial", 5);
const prompt = catalog.catalogPrompt(10);
const activation = catalog.activateCurrent("pdf-financial-extractor", 5);
catalog.close();
client.close();
use ish_harness::SkillCatalog;
let catalog = SkillCatalog::new();
let (loaded, diagnostics) = catalog.add_search_path("./skills");
println!("Loaded: {:?}, diagnostics: {:?}", loaded, diagnostics);
let matches = catalog.search("financial", 5);
let prompt = catalog.get_catalog_prompt(Some(10));
let activation = catalog.activate("pdf-financial-extractor", Some(5));
client, err := ish.NewClient("")
if err != nil {
panic(err)
}
defer client.Close()
catalog, err := ish.NewSkillCatalog(client)
if err != nil {
panic(err)
}
defer catalog.Close()
res, err := catalog.AddSearchPath("./skills")
if err != nil {
panic(err)
}
fmt.Println("Loaded:", res.Loaded, "Diagnostics:", res.Diagnostics)
matches, err := catalog.Search("financial", 5)
prompt, err := catalog.GetCatalogPrompt(ish.IntPtr(10), "")
activation, err := catalog.ActivateCurrent("pdf-financial-extractor", ish.IntPtr(5))
_, _, _ = matches, prompt, activation
using Ish.Harness;
using var client = new IshClient();
using var catalog = new SkillCatalog(client);
var result = catalog.AddSearchPath("./skills");
Console.WriteLine($"Loaded: {result.Loaded.Count}, Diagnostics: {result.Diagnostics.Count}");
var matches = catalog.Search("financial", limit: 5);
var prompt = catalog.GetCatalogPrompt(maxItems: 10);
var activation = catalog.ActivateCurrent("pdf-financial-extractor", maxActive: 5);
import io.github.ishharness.IshClient;
import io.github.ishharness.SkillCatalog;
import java.nio.file.Path;
try (var client = new IshClient(Path.of(System.getenv("ISH_NATIVE_LIBRARY")));
var catalog = new SkillCatalog(client)) {
var result = catalog.addSearchPath("./skills");
System.out.println("Loaded: " + result.loaded() + ", Diagnostics: " + result.diagnostics());
var matches = catalog.search("financial", 5);
var prompt = catalog.catalogPrompt(10, null);
var activation = catalog.activateCurrent("pdf-financial-extractor", 5);
}
Directory Layout
skills/
└── pdf-financial-extractor/
├── SKILL.md
├── scripts/
│ └── parse_tables.py
└── references/
├── gaap-definitions.md
└── target-schema.json
SKILL.md(Required): Structured YAML frontmatter between---markers, followed by Markdown instructions loaded at activation time.references/(Optional): Supplementary documentation or schemas enumerated lazily whenread_skillis called withoutfile_path. Hidden dot-prefixed entries (.DS_Store,.gitkeep) are skipped, and paths are sorted lexicographically.scripts/(Optional): Helper files addressable viaread_skillor invocable through an execution tool supplied by your application. Discovery, listing, reading, and activation do not execute these files.assets/(Optional): Static templates or sample outputs bundled with the skill directory.
Safe skill discovery
How the shared loader scans skill folders
SkillCatalog preserves registration order in SkillCatalogInner.order and returns (loaded_names, diagnostics):
- Deterministic ordering: When scanning a parent directory, subdirectories containing
SKILL.mdare sorted lexicographically by subdirectory name soget_catalog_promptandsearchresults remain deterministic across filesystems. - Fault-tolerant YAML parsing:
parse_skill_markdownlooks for an opening---line and a matching closing---line, deserializing the YAML header withserde_yaml. If the closing delimiter is missing or YAML deserialization fails, the parser leavesmetadataempty and treats the full raw text as the body instead of crashing discovery. - Name & description fallbacks:
- If
nameis missing or whitespace-only after trimming, it defaults to the parent folder's directory name. - If
descriptionis missing or whitespace-only, it defaults to"Skill <dir_name>".
- If
- Non-fatal diagnostics: Unreadable
SKILL.mdfiles append(manifest_path, error_message)todiagnosticswithout aborting valid sibling skills. Reloading a skill with an existingnamereplaces itsSkillentry in place without duplicating its key inorder.
YAML Frontmatter
Place frontmatter at the top of SKILL.md:
---
name: pdf-financial-extractor
description: Extract balance sheets, income statements, and cash flows from quarterly SEC 10-Q/10-K PDFs. Use when handling corporate financial reports or financial table parsing tasks.
license: Apache-2.0
compatibility: python>=3.10, requires pdfplumber
metadata:
author: finance-automation-team
version: "1.2.0"
category: finance
---
Frontmatter fields
| Field | Spec Status | Spec Limits & Loader Notes | Purpose |
|---|---|---|---|
name | Required (falls back to dir name in loader) | agentskills.io spec: max 64 chars, [a-z0-9-]+ matching parent folder name | Unique lookup key for activate_skill, read_skill, and requires_skill |
description | Required (falls back to "Skill <dir_name>") | agentskills.io spec: max 1024 chars; imperative capabilities and trigger conditions | Surfaced in Tier 1 catalog prompt and matched by search_skills |
license | Optional | Standard SPDX identifier (Apache-2.0, MIT) | Licensing metadata |
compatibility | Optional | agentskills.io spec: max 500 chars | Runtime or dependency expectations |
metadata | Optional | Arbitrary YAML key-value mapping | Authoring, versioning, and taxonomy notes |
Write a useful skill description
Because Tier 1 only exposes (name, description) entries (up to max_items, default 40, switching to an overflow prompt above max_items), the description determines both catalog selection and search_skills substring recall:
- State concrete artifacts and tasks (domain nouns, file formats, protocols).
- State exact trigger conditions ("Use when...").
Good Examples
- "Extract balance sheets, income statements, and cash flows from quarterly SEC 10-Q/10-K PDFs. Use when handling corporate financial reports or financial table parsing tasks."
- "Standard Git hygiene, interactive rebases, cherry-picking, and conventional commit generation. Use when resolving git conflicts, preparing pull requests, or rewriting commits."
Bad Examples
- "Handles PDFs." (Too broad; low signal during model selection and
search_skillsqueries). - "A set of Python scripts for our company." (Omits capabilities and trigger phrases).
Add skill instructions
The Markdown body of SKILL.md is injected into the tool result only when activate_skill runs:
# PDF Financial Extractor
Follow these steps when extracting financial statements:
1. **Format Validation**: Verify the document contains selectable text rather than scanned images.
2. **Table Extraction**:
- Execute the bundled parser script: `python scripts/parse_tables.py --input <path>`
3. **Data Normalization**:
- Validate extracted column headers against the schema in `references/target-schema.json`.
- Ensure negative values (enclosed in parentheses `(1,234)`) are converted to `-1234`.
4. **Output Generation**:
- Write the normalized JSON output to `./workspace/extracted_financials.json`.
When the model calls read_skill(name, file_path):
read_skill_referencechecks[file_path, "references/" + file_path, "scripts/" + file_path]relative to the skill directory.- Every candidate is validated through both lexical path normalization (
normalize_under, popping..components without escapingskill_dir) and filesystem canonicalization (fs::canonicalizewhen the target exists, blocking symlink escapes). - Traversal outside the skill directory returns
PermissionError("Access denied: '<rel>' outside skill directory."); valid relative paths that do not exist returnFileNotFoundError.
Reading a script returns its text; it does not run it. To run one, the agent needs an execution tool and the script must be present under that tool's workspace root. For example, when scripts/parse_tables.py is inside ./workspace, an application can explicitly run python scripts/parse_tables.py --input report.pdf through its sandbox process API.
Choose the execution boundary deliberately:
- The standard workspace
executeagent tool runs a command with the workspace as its working directory and applies process limits. It does not isolate filesystem or network access. Treat it as a convenience for trusted code, not as a security boundary. KernelSandboxin Python andexecuteKernelProcess/execute_kernel_processin the other SDKs use the shared Rust process implementation with an OS isolation backend when one is available. Configure network access and resource limits for the workload. This path fails closed when kernel isolation is unavailable; it does not silently fall back to unrestricted execution.- WASI is another Rust-backed option for WebAssembly modules, with capability profiles and an instruction fuel limit. It is not a general runner for arbitrary Python, Bash, or JavaScript scripts.
The SDK classes are language wrappers around these Rust operations. The same boundary applies regardless of the SDK. See Sandbox execution for per-language examples and platform details. For untrusted skill scripts, expose a tool that calls the kernel-isolated process API; do not route them through the standard workspace execute tool.
Skills have the same file-based format in every SDK. Discovery, listing, reading, and activation do not import or execute files in the skill directory; tools.py is not a special skill file. Applications may explicitly expose a tool that runs a script, and should choose an execution boundary appropriate to the trust level.
Files under scripts/ remain ordinary skill resources. Discovery, listing, reading, and activation do not execute them. The skill instructions may tell the agent when a script is useful, but the application decides whether to expose an execution tool. If it does, use the kernel-isolated process API for untrusted scripts and ensure the skill directory is available inside the sandbox workspace.
Skill loading
Once your SKILL.md directories are in place, load them with SkillCatalog (SkillRegistry in Python) to inspect diagnostics, search entries, generate catalog prompts, or activate a skill directly.