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

# strata skills

> Generate and install agent skill files from your active ruleset so agent instructions stay in sync with what CI enforces.

`strata skills` installs a guidance file generated from your project's active
rules, ready for an AI agent to follow. Because it is generated from the same rule
metadata `strata check` enforces, the guidance your agents read cannot drift from
the rules your CI runs. There is no hand-maintained rules document to fall out of
date; you regenerate it.

```bash theme={null}
strata skills update [--target TARGET ...] [--global] [--force]
```

<Note>
  `update` is a subcommand, not a flag. Running `strata skills` on its own prints
  usage and exits non-zero; the command to generate files is `strata skills update`.
</Note>

## Usage

From your repository root:

```bash theme={null}
strata skills update
```

Strata generates the guidance from the active ruleset and writes a `SKILL.md` for
each supported agent target, then lists what it wrote:

```text theme={null}
Updated Strata skill files:
  /path/to/repo/.opencode/skills/strata/SKILL.md
  /path/to/repo/.claude/skills/strata/SKILL.md
  /path/to/repo/.agents/skills/strata/SKILL.md
```

The file lists every active rule for the repository, with its family, message, and
remediation. It reflects your `select` and `ignore` configuration, so the guidance
matches exactly what `strata check` will enforce.

## Targets

By default Strata installs to all supported agent targets. Pass `--target` (which
may be repeated) to install to specific ones:

```bash theme={null}
strata skills update --target opencode --target claude
```

| Target     | Project path                       | Global path (`--global`)                    |
| ---------- | ---------------------------------- | ------------------------------------------- |
| `opencode` | `.opencode/skills/strata/SKILL.md` | `~/.config/opencode/skills/strata/SKILL.md` |
| `claude`   | `.claude/skills/strata/SKILL.md`   | `~/.claude/skills/strata/SKILL.md`          |
| `agents`   | `.agents/skills/strata/SKILL.md`   | `~/.agents/skills/strata/SKILL.md`          |

## Options

| Option            | Description                                                                                        |
| ----------------- | -------------------------------------------------------------------------------------------------- |
| `--target TARGET` | Install only to this target. Repeatable. One of `opencode`, `claude`, `agents`. Defaults to all.   |
| `--global`        | Install into your home directory instead of the project, so the skill applies across repositories. |
| `--force`         | Overwrite an existing file even if it was not generated by Strata.                                 |

## Overwrite safety

Strata will not clobber a hand-written file. If a target path already exists and
does not carry Strata's generated marker, the update fails rather than replacing
your content:

```text theme={null}
refusing to overwrite non-generated skill file: .claude/skills/strata/SKILL.md; rerun with --force
```

Files Strata previously generated are updated in place. Use `--force` only when you
intend to replace a file Strata did not write.

## Exit codes

| Code | Meaning                                                                           |
| ---- | --------------------------------------------------------------------------------- |
| `0`  | Skill files were generated and installed.                                         |
| `2`  | No subcommand was given, or an install failed (for example an overwrite refusal). |

## Custom rules are included

Because [custom rules](/concepts/custom-rules) merge into the same catalogue as core
rules, their `message` and `remediation` appear in the generated guidance once they
are configured and selected. Your project's own conventions become part of the
instructions your agents read, generated from the rules themselves.

## Keeping guidance current

Regenerate whenever your ruleset changes so the committed guidance stays in sync. A
convenient place is alongside `strata check` in CI, or a pre-commit hook:

```bash theme={null}
strata skills update
```

## Related

<CardGroup cols={2}>
  <Card title="Custom rules" icon="code" href="/concepts/custom-rules">
    Author rules whose messages flow into generated guidance.
  </Card>

  <Card title="strata rule" icon="magnifying-glass" href="/cli/rule">
    Inspect a single rule's metadata.
  </Card>
</CardGroup>
