<!-- generated by epythet -->

# For AI agents

`opsward` ships artifacts for coding agents alongside its code. This page lists
them, says where each lives in the repository, and points at the
machine-readable copies of this documentation.

## Skills

Skills are folders holding a `SKILL.md` (the [Agent Skills](https://agentskills.io) format): a description that tells an agent when to use it and a body with the procedure. Install one into your agent with `gh skill` (any host: `--agent claude-code`, `copilot`, `cursor`, `codex`, `gemini`), or use the copy bundled in the wheel.

### `opsward`

Run opsward to assess and improve this project’s AI agent setup. Use when the user says ‘opsward’, ‘check my setup’, ‘improve my AI config’, or wants a full audit and remediation.

Source: [`.claude/skills/opsward`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward).

### `opsward-add-drift-check`

Add a new staleness or drift check to opsward’s maintain stage (maintain.py), so `opsward maintain` reports a new kind of MaintenanceSuggestion — a stale reference, an out-of-sync index, an outdated or empty doc, an incomplete skill. Use when extending what `opsward maintain` detects, adding a suggestion category, or deciding whether a finding belongs in maintain or in the diagnose score. Covers the check-generator shape, categories, the diff field, the exit-code contract, and the CLI golden it can move.

Source: [`.claude/skills/opsward-add-drift-check`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-add-drift-check).

### `opsward-add-recommendation`

Add a tech-stack→skill mapping to opsward’s recommendation engine in recommend.py, so `opsward recommend` suggests an ecosystem skill when it detects a dependency or framework (e.g. Supabase, FastAPI, Tailwind). Use when extending the curated `_RECOMMENDATIONS` list, adding a new detection signal, or changing where recommended skills are sourced from.

Source: [`.claude/skills/opsward-add-recommendation`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-add-recommendation).

### `opsward-add-scan-field`

Add a new fact that opsward learns about a target project — a field on ScanResult populated by scan.py — and consume it downstream in score/generate/maintain/recommend. Use when a new check, score, template variable, or drift detector needs data the scan does not yet collect (a new config file, a new .claude/ inventory, a project signal), or when changing project-type detection. Covers the read-only contract, the dataclass-default rule, the util read helpers, and the CLI goldens a scan change can move.

Source: [`.claude/skills/opsward-add-scan-field`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-add-scan-field).

### `opsward-add-scoring`

Add or adjust opsward’s quality scoring — a CLAUDE.md sub-dimension, a whole weighted component, or the skill/spec validation rules — in score.py. Use when changing how `opsward diagnose` grades a project, tuning weights or point thresholds, adding a new ComponentScore, or modifying validate_skill_spec. Explains the pure-function contract, the weighting math, and the constants to keep balanced.

Source: [`.claude/skills/opsward-add-scoring`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-add-scoring).

### `opsward-add-template`

Add or edit a generation template in opsward — a doc template (architecture.md, testing.md, …), an installable skill (SKILL.md), or an agent definition — and wire it into generate.py so opsward produces it. Use when adding a new artifact opsward should scaffold into target projects, adding a template variable, or changing what `opsward generate` / `install-skills` emit. Covers string.Template rules and the python/jsts/shared layout.

Source: [`.claude/skills/opsward-add-template`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-add-template).

### `opsward-dev`

Contributor guide for developing opsward itself — its architecture, hard invariants, and where each kind of change goes. Use when modifying opsward’s own source (scan/score/generate/maintain/recommend/cli), adding a template, scoring dimension, or skill recommendation, or when unsure which module owns a change. NOT for running opsward on a target project (use the `opsward` skill for that).

Source: [`.claude/skills/opsward-dev`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-dev).

### `opsward-diagnose`

Diagnose the health of this project’s AI agent setup. Use when the user asks to check, audit, or score the project’s CLAUDE.md, skills, docs, or agent configuration.

Source: [`.claude/skills/opsward-diagnose`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-diagnose).

### `opsward-generate`

Generate missing AI setup artifacts for this project. Use when the user asks to scaffold, create, or bootstrap CLAUDE.md, docs, skills, or agent configuration.

Source: [`.claude/skills/opsward-generate`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-generate).

### `opsward-maintain`

Check documentation and AI setup for staleness, drift, or inconsistency. Use when the user asks to maintain, refresh, or update project docs and AI configuration.

Source: [`.claude/skills/opsward-maintain`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-maintain).

### `opsward-subagents`

Decide which of a repo’s skills should also run as subagents (in their own context), declare it in each skill’s frontmatter, and generate or refresh the twin agent files with opsward. Use when a skill does bulky or read-heavy work whose output should stay out of the main context, when a skill needs a tool restriction or a cheaper model, when a hand-written agent duplicates a skill, when `opsward maintain` reports a `subagent_twin` finding, or when asked “should this skill be a subagent”, “make this skill usable as a subagent”, “generate agents from skills”, or to sweep a repo for skill/agent pairs. Also usable as a subagent itself.

Source: [`.claude/skills/opsward-subagents`](https://github.com/addaix/opsward/tree/HEAD/.claude/skills/opsward-subagents).

## Subagents

Subagents are Markdown files with a frontmatter (`name`, `description`, `tools`) and a system prompt as the body. Copy one into your project’s `.claude/agents/` (or your agent host’s equivalent) to delegate the task it describes.

### `opsward-subagents`

Decide which of a repo’s skills should also run as subagents (in their own context), declare it in each skill’s frontmatter, and generate or refresh the twin agent files with opsward. Use when a skill does bulky or read-heavy work whose output should stay out of the main context, when a skill needs a tool restriction or a cheaper model, when a hand-written agent duplicates a skill, when `opsward maintain` reports a `subagent_twin` finding, or when asked “should this skill be a subagent”, “make this skill usable as a subagent”, “generate agents from skills”, or to sweep a repo for skill/agent pairs. Also usable as a subagent itself.

Source: [`.claude/agents/opsward-subagents.md`](https://github.com/addaix/opsward/tree/HEAD/.claude/agents/opsward-subagents.md); tools: `Bash, Read, Grep, Glob, Edit, Write`.

### `setup-auditor`

Read-only diagnostic agent that audits the project’s AI setup (CLAUDE.md, skills, docs, rules). Use when you want to check the health of the project’s agent configuration without making changes.

Source: [`.claude/agents/setup-auditor.md`](https://github.com/addaix/opsward/tree/HEAD/.claude/agents/setup-auditor.md).

## Instruction files

Files agents read before working in this repository.

- [`CLAUDE.md`](https://github.com/addaix/opsward/tree/HEAD/CLAUDE.md): read by Claude Code
- [`AGENTS.md`](https://github.com/addaix/opsward/tree/HEAD/AGENTS.md): read by Codex, Copilot, Cursor and other agents

## Machine-readable documentation

This site publishes the same documentation in forms that fit an agent’s context window:

- [`llms.txt`](https://addaix.github.io/opsward/llms.txt): an index of every page with a one-line description ([llms.txt](https://llmstxt.org) format)
- [`opsward.md`](https://addaix.github.io/opsward/opsward.md): the whole documentation as one Markdown file
- `<page>.html.md`: a rendered Markdown twin of every page, advertised from each page’s `<head>` with `<link rel="alternate" type="text/markdown">`
- [`objects.inv`](https://addaix.github.io/opsward/objects.inv): the Sphinx inventory: a symbol-to-URL index (`sphobjinv convert plain objects.inv -`)
