# Fetch Rig docs from a coding agent

Use this page to retrieve Rig language and CLI facts without inventing fields.

## Outcome

You can name the raw URLs to fetch, write only documented Nix fields, and name the command that checks the result.

## Prerequisites

A network fetch to https://rig.slopkit.dev. HTML pages are for humans. Raw markdown is the source for machine consumers.

## Steps

1. Read https://rig.slopkit.dev/llms.txt and pick the pages that match the task.
2. Fetch those pages from their `/raw/` URLs.
3. Keep the field names, types, defaults, and eval failures from those pages. Do not add Nix fields that are absent there.
4. Do not catalog published agents or layers. Samples live at https://repo.slopkit.dev.
5. Before you claim a layer or agent is correct, run the check named on that page.

## Which raw page

| Task | Fetch |
| --- | --- |
| Write `agents/<name>/default.nix` | https://rig.slopkit.dev/raw/agent.md |
| Write `layers/<name>/default.nix` | https://rig.slopkit.dev/raw/layer.md |
| Create a workspace, add layers, compose, build | https://rig.slopkit.dev/raw/create-agent.md |
| Secrets stay out of the image | https://rig.slopkit.dev/raw/secrets.md |
| Webhook HTTP or trigger Nix | https://rig.slopkit.dev/raw/triggers.md |
| A `rig` command | https://rig.slopkit.dev/raw/cli.md |
| First run for a human | https://rig.slopkit.dev/raw/start.md |
| Word meanings | https://rig.slopkit.dev/raw/glossary.md |

One-shot bundle: https://rig.slopkit.dev/llms-full.txt. Use it for indexing or a cross-cutting audit. Prefer the smaller pages for a focused edit.

## Check

After a layer or agent change, one of these must match the page you used:

- `rig inspect <name|path>` prints `=== agent:` or `=== layer:`
- `rig secrets <agent>` runs `secretspec check`
- `rig build <agent>` prints a `build <name>:` line

Build and catalog lists need a workspace whose flake calls `rig.lib.workspace`. `rig inspect` also accepts a path. Pulled images do not need that tree. `rig new workspace` writes one.

## Do not

- Invent `rig` flags, Nix fields, HTTP status codes, or install URLs.
- Treat the homepage PTY, BOM cards, or repo stats as the language spec.
- Pull on a webhook. The image must already be on that runtime.
