# AI snippets

An AI snippet is a complete brief for a coding agent (Claude Code, Cursor, Lovable, Replit): what "done" means, what to check before touching your code, the exact files to create, the rules, and how to verify the result. Paste it, or open it in your agent with one click.

| Your stack | Snippet |
|---|---|
| Next.js, App Router | [Next.js](/docs/ai-snippets/nextjs) |
| Astro | [Astro](/docs/ai-snippets/astro) |
| Anything else | [Any other stack](/docs/ai-snippets/any) |
| Keep an agent on the rules later | [Agent rules](/docs/ai-snippets/rules) |

## What a snippet does

1. **Checks before it changes anything**: the framework and version, `src/` or not, and whether `/blog` already exists, in which case it stops and asks.
2. **Uses tested code**: the Next.js and Astro snippets take their code from the guides, which are tested on a fresh project. The agent adapts import paths, nothing else.
3. **Keeps secrets out of prompts**: it asks you for the content key and signing secret and puts them in environment variables. They are never in the prompt, a link, or a source file.
4. **Verifies its own work**: type check, build, the pages and their head tags, and, where the site has a webhook endpoint, a 401 for an unsigned delivery.
5. **Reports back**: the files it changed and what is left for you (secrets in your host, the webhook URL).

## Open in your agent

**Copy prompt** copies the whole snippet. The agent buttons next to it differ by what each agent accepts: Claude Code and Cursor links are length-limited, so they carry a short prompt that points the agent at the snippet's Markdown (`https://seoforsaas.dev/snippets/<id>.md`); Lovable and Replit receive the whole snippet.

In the dashboard (your site → **Delivery**), the same snippets come with your project ID filled in.
