Skip to main content
A skill is a reusable playbook that teaches an agent how to do a task your way. It is a SKILL.md file (plus optional references) with domain-specific instructions the agent loads on demand: your refund policy, your triage rules, your house style, or any other procedure you want to reuse without bloating the system prompt. Skills live in your project under src/skills/ and attach to the agents you build.

Example requests

Ask your coding agent for the procedure or house rules an agent should follow. It can capture them as a skill you reuse across agents.
“Build a skill for our weekly report format so any agent that writes one follows the same structure and sources.”
“Add a brand voice skill so the marketing agent writes announcements in our house style.”

How skills work

Skills live in your project under src/skills/, one folder per skill. Each folder has a SKILL.md; you attach the skill to an agent by its folder name.
src/skills/support/
  SKILL.md
  references/refund-policy.md   # optional
src/agents/support.ts
import { defineAgent } from "@keystrokehq/keystroke/agent";

export default defineAgent({
  slug: "support",
  systemPrompt: "Answer support questions. Use the support skill for policy and tone.",
  model: "anthropic/claude-sonnet-4.6",
  skills: ["support"],
});
Before a prompt runs, Keystroke materializes attached skills into the agent’s workspace at /workspace/agent/skills/{slug}/. The agent reads them like local files and pulls in deeper material from references/ only when the task calls for it.

When to use a skill

Use a skill forUse something else for
Reusable, on-demand guidance an agent reads when relevantAlways-needed, short instructions → systemPrompt
Multi-section playbooks, policies, and proceduresStatic reference docs the agent should read → files
Behavior shared across prompts or agentsA discrete capability or API call → an action
Skills and files both materialize into the workspace, but they play different roles: a skill is instructions (how to do something), while a file is context (a document to read).

Next steps

Create skills

Write a SKILL.md with clear task guidance.

Attach skills to agents

Attach skills to an agent by folder name.

Import skills

Reuse skills from external registries.

Files

Add static context documents to an agent workspace.