---
title: Generate Agent Guidance
description: Prepare repository policy, render repository-specific Agent Skill guidance with presswork skills docs, and handle documented failures.
---

Use this guide when an agent needs repository-specific instructions for documentation creation, maintenance, moves, renames, or deletion.

## Prepare the repository

The command must be able to resolve the Repository Root, Presswork Configuration, Profile, Document Types, Templates, Creation Policies, Index Sections, and an operationally complete Check. Existing Violations do not prevent rendering, but Operational Diagnostics do.

Run a Check to identify operational problems before rendering guidance.

```sh
presswork check
```

Follow the recovery guidance for every Operational Diagnostic. Violations can remain while you render guidance, but they prevent documentation work from being complete.

## Render the Agent Skill

Write the repository-specific `SKILL.md` content to standard output.

```sh
presswork skills docs
```

Use `--root <path>` to select one explicit Repository Root. The command accepts no `--json` or `--no-color` option.

On success, standard output contains only the raw, complete `SKILL.md` bytes. On failure, standard output is empty, standard error contains one diagnostic, and the command exits `2`.

Review the rendered guidance before placing it where your agent loads skills. The guidance records the resolved Profile, Documentation Directories, Root Documents, Document Types, Creation Policies, Index Sections, and repository-authored routing hints.

Use [Presswork Configuration](/configuration/#skillguidance) for routing-hint fields, [CLI](/cli/#presswork-skills-docs) for the command contract, or [Rules and diagnostics](/rules-and-diagnostics/#cli-diagnostic-codes) for failure codes.
