> ## Documentation Index
> Fetch the complete documentation index at: https://app.keystroke.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Reusable playbooks that specialize your agents.

A skill is a reusable playbook that teaches an [agent](/learn/agents/overview) 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
```

```ts src/agents/support.ts theme={null}
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 for                                           | Use something else for                                                       |
| --------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Reusable, on-demand guidance an agent reads when relevant | Always-needed, short instructions → `systemPrompt`                           |
| Multi-section playbooks, policies, and procedures         | Static reference docs the agent should read → [files](/learn/files/overview) |
| Behavior shared across prompts or agents                  | A discrete capability or API call → an [action](/learn/actions/overview)     |

Skills and [files](/learn/files/overview) 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

<CardGroup cols={2}>
  <Card title="Create skills" href="/learn/skills/create-skills">
    Write a SKILL.md with clear task guidance.
  </Card>

  <Card title="Attach skills to agents" href="/learn/skills/attach-skills-to-agents">
    Attach skills to an agent by folder name.
  </Card>

  <Card title="Import skills" href="/learn/skills/import-skills">
    Reuse skills from external registries.
  </Card>

  <Card title="Files" href="/learn/files/overview">
    Add static context documents to an agent workspace.
  </Card>
</CardGroup>
