# Skills and commands

> Give zelk reusable instructions and scripts as skills, and run them by name with a slash.

A **skill** is a folder of instructions, and optionally scripts and
reference files, that the agent loads when a task fits it. zelk reads the
open [Agent Skills](https://agentskills.io/specification) format, so
skills written for Claude Code, Codex and other agents work unchanged.

## Write a skill

A skill is a directory with a `SKILL.md`. Its front matter names it and
says when to use it; the body is the instructions:

```markdown title=".zelk/skills/greet/SKILL.md"
---
name: greet
description: Greet someone by name in the style of a ship's captain.
---

Greet $ARGUMENTS warmly, in one sentence, as a ship's captain would.
```

The `name` is up to 64 lowercase letters, digits and single hyphens, with
no hyphen at either end, and matches the directory. The agent picks a skill by its `description` alone, so say what
the skill does and when to use it. A skill whose description is under
three words, or two skills whose descriptions mostly overlap, get a
warning when they load.

Other fields, as Claude Code reads them:

- `allowed-tools` lists rules such as `Bash(git commit:*)` that run without
  asking while the skill is active. Only your own skills grant this; a
  skill from the repository grants nothing.
- `disable-model-invocation: true` keeps the skill to you: the agent never
  loads it on its own, and only `/name` runs it.
- `user-invocable: false` keeps it to the agent: it isn't offered in the
  palette.
- `arguments` names arguments for the body to use as `$name`.

## Where zelk finds skills

| Where | Whose |
|---|---|
| `~/.zelk/skills`, `~/.agents/skills`, `~/.claude/skills` | yours, in every project |
| `.zelk/skills`, `.agents/skills`, `.claude/skills` from the working directory up to the repository root | the project's |
| the same directories below the working directory | a package's, once the session works there |

Your own skills speak with your authority. A project's skills come from
the repository, so they are framed as lower-trust guidance, like project
instructions. When two skills share a name, yours wins, and zelk warns
about the one it ignored.

## Run a skill

The agent loads a skill when your request fits its description. To run one
yourself, type `/` and its name, with any arguments after it:

```sh
zelk -p "/greet Ada"
```

In the terminal UI, skills appear in the palette beside zelk's own
commands. The body's `$ARGUMENTS` takes everything you typed after the
name, and `$0`, `$1` and so on the words of it.

A line in the body written `` !`command` `` runs when you invoke the skill,
and its output takes the line's place. Each command is decided as a Bash
call would be: deny rules, hooks and the mode still apply, and the terminal
UI asks you about one the rules don't allow.

## Commands

A **command** is a skill of one file, as in Claude Code: each `.md` file in
a commands directory, run by its path with `:` between directories.

| Where | |
|---|---|
| `~/.zelk/commands`, `~/.claude/commands` | yours |
| `.zelk/commands`, `.claude/commands` from the working directory up to the repository root | the project's |

```markdown title=".zelk/commands/git/summary.md"
---
description: Summarize the latest commit in one sentence.
---

Summarize what the latest commit changed, in one sentence.
```

This one runs as `/git:summary`. Front matter is optional; without a
`description`, the body's first line describes it.

## Skills zelk ships

- `init` writes or corrects the project's `AGENTS.md` (`/init`, or **Set up
  AGENTS.md** in the palette). See [Memory](/cli/memory/#project-instructions).
- `statusline` writes the terminal UI's status line script (`/statusline`).
- `zelk` is zelk's guide to itself: the agent loads it when you ask how to
  do something in zelk.

## Scripts in skills

A skill's scripts run from the workspace, so a skill in your home
directory can't run its scripts by default. `-skill-cache DIR` publishes
loaded skills' scripts into a private cache in the workspace, where the
agent's commands can run them. The directory must already exist, be
private, and be named relative to the workspace, such as
`.zelk/skill-cache`. Use `-sandbox bwrap` on Linux, `-sandbox seatbelt` on
macOS, or `-sandbox mxc` on Windows. On Windows the directory needs a private
inheritable NTFS ACL. The terminal UI, `zelk exec` and `zelk acp` can keep
these publications with their persistent sessions. Bash refuses to run a
skill's script whose content changed since the skill loaded.

## Where to go deeper

- [The skills contract](/internals/skills/): loading, arguments, shell
  lines and their permissions, warnings
- [The CLI reference](/reference/cli/) and [settings](/reference/settings/)
