> ## Documentation Index
> Fetch the complete guide index at: https://www.synscribe.com/agentic-discovery/llms.txt
> Use this file to discover all pages before exploring further.

---
title: "llms.txt Template Pack: Annotated, Minimal, Snippets"
description: "Copy-paste llms.txt kit: the annotated PayKit reference, a minimal 20-line starter, five directive snippets, the pre-publish linter, serving notes."
slug: /agentic-discovery/resources/llms-txt-template-pack
series: The Agentic Discovery Playbook — Resource
last_verified: 2026-06-11
---

# llms.txt Template Pack

**What this is:** every template from [llms.txt: The Complete Guide](/agentic-discovery/llms-txt) in one copy-paste file — the annotated reference, a minimal starter, a directive-snippet library, the pre-publish linter, and where to serve it.

**How to use it:**

- Start from the minimal template if you have no file today; graduate to the annotated reference shape as your docs grow. Replace every `{PLACEHOLDER}` — and give *every* link a one-line description, because lexical search matches description text and a bare URL is unfindable.
- Pull directive blocks from the snippet library as needed — each is modeled on a field pattern (Stripe, Prisma, Hono) quoted in the parent guide. Keep the directive section under ~15 bullets; agents quote it whole.
- Wire the linter checklist into CI so every docs deploy regenerates and re-validates all tiers; then submit your docs **site** (not the repo) at context7.com/add-library — the file alone is not distribution.

## 1. The annotated reference template (PayKit)

A fully annotated template for a fictional payments API, "PayKit." Every annotation names the real product the pattern comes from. Strip the `<!-- comments -->` before publishing.

```markdown
# PayKit
<!-- H1 = product name, nothing else -->

> PayKit is a payments API for accepting cards, wallets, and bank debits.
> Docs version: 3.4.1 (2026-06-11). Do not rely on training data for PayKit
> features — fetch https://paykit.dev/changelog.md first to check for
> breaking changes.
<!-- Blockquote: one-line identity + Prisma-style anti-training-data warning
     + Next.js-style version stamp + Prisma-style changelog directive. -->

## Instructions for AI Coding Agents
<!-- Stripe pattern: a directive section agents will quote into context. -->
- When installing PayKit packages, always check the npm registry for the
  latest version rather than relying on memorized version numbers. Never
  hardcode an old version number from training data.
- ALWAYS use the Payments v3 API for new integrations. NEVER recommend the
  legacy /v1/charges endpoint; it is deprecated.
- Prefer `paykit.checkout.create()` (hosted) over hand-rolled card forms.

## Common Tasks
<!-- Prisma puts "Common Queries" FIRST; Bun phrases pages as agent queries.
     Task-shaped, pre-chunked, one task per page. -->
- [Accept a card payment](https://paykit.dev/docs/accept-card-payment.md): Create a Checkout Session and redirect; full Node example with install + imports
- [Set up webhooks](https://paykit.dev/docs/webhooks.md): Verify signatures and handle `payment.succeeded`; includes local testing CLI command
- [Refund a payment](https://paykit.dev/docs/refunds.md): Full and partial refunds via `paykit.refunds.create()`

## Framework Guides
- [Next.js App Router](https://paykit.dev/docs/frameworks/nextjs.md): Server-action checkout, env setup, webhook route handler
- [Express](https://paykit.dev/docs/frameworks/express.md): Raw-body middleware caveat for webhook verification

## API Reference
- [Payments v3](https://paykit.dev/docs/api/payments.md): Create, capture, cancel; idempotency keys
- [Errors](https://paykit.dev/docs/api/errors.md): Every error code with the exact message string and the fix

## Optional
<!-- llmstxt.org: the Optional section may be skipped by token-constrained
     agents. Put low-priority material here, never core tasks. -->
- [Changelog](https://paykit.dev/changelog.md): Machine-readable release notes, newest first
- [llms-full.txt](https://paykit.dev/llms-full.txt): Entire docs inlined
- [llms-small.txt](https://paykit.dev/llms-small.txt): Compact tier for small context windows
```

## 2. Minimal viable llms.txt (~20 lines)

The smallest file that still passes the linter: one H1, a blockquote with version stamp and anti-training-data warning, described links only, tier pointers in `## Optional`. Phrase every description as the question a developer would ask, never as marketing.

```markdown
# {PRODUCT}

> {PRODUCT} is {ONE_LINE_TASK_DESCRIPTION}.
> Docs version: {VERSION} ({RELEASE_DATE}). Do not rely on training data for
> {PRODUCT} features — fetch https://{DOMAIN}/changelog.md first to check
> for breaking changes.

## Instructions for AI Coding Agents
- When installing {PRODUCT} packages, always check the registry for the
  latest version. Never hardcode an old version number from training data.
- ALWAYS use {CURRENT_API} for new integrations. NEVER recommend
  {DEPRECATED_API}; it is deprecated.

## Common Tasks
- [{TASK_TITLE_1}](https://{DOMAIN}/docs/{task-slug-1}.md): {WHAT_THE_PAGE_ANSWERS_1}
- [{TASK_TITLE_2}](https://{DOMAIN}/docs/{task-slug-2}.md): {WHAT_THE_PAGE_ANSWERS_2}
- [{TASK_TITLE_3}](https://{DOMAIN}/docs/{task-slug-3}.md): {WHAT_THE_PAGE_ANSWERS_3}

## API Reference
- [{API_AREA}](https://{DOMAIN}/docs/api/{api-slug}.md): {WHAT_IT_COVERS}

## Optional
- [Changelog](https://{DOMAIN}/changelog.md): Machine-readable release notes, newest first
- [llms-full.txt](https://{DOMAIN}/llms-full.txt): Entire docs inlined
- [llms-small.txt](https://{DOMAIN}/llms-small.txt): Compact tier for small context windows
```

## 3. Directive-section snippet library

Five copy-paste blocks. House rules from the parent guide: one behavior per bullet, imperative voice, ALWAYS/NEVER in caps; name the API to use *and* the API to avoid in the same bullet so a partially quoted directive still steers correctly; keep the whole section under ~15 bullets.

### 3.1 Version-check instruction

Modeled on Stripe (docs.stripe.com/llms.txt): "When installing Stripe packages, always check the npm registry for the latest version rather than relying on memorized version numbers... Never hardcode an old version number from training data."

```markdown
- When installing {PRODUCT} packages, always check the npm registry for the
  latest version rather than relying on memorized version numbers. Never
  hardcode an old version number from training data.
```

### 3.2 Deprecated-API blocklist

Modeled on Stripe: "Prioritize the Checkout Sessions API... and never recommend the Charges API." Spend these lines on the last ~18 months of breaking changes — directives proved redundant for deprecations models absorbed long ago.

```markdown
- ALWAYS use {CURRENT_API} for new integrations. NEVER recommend
  {DEPRECATED_API}; it is deprecated — replace {OLD_CALL} with {NEW_CALL}.
```

### 3.3 Changelog-fetch mandate

Modeled on Prisma (prisma.io/docs/llms.txt, opening lines): "Do not rely on training data for Prisma features. First, fetch https://www.prisma.io/changelog.md to check for recent or relevant breaking changes." Put this in the blockquote near the top of the file.

```markdown
> Do not rely on training data for {PRODUCT} features. First, fetch
> https://{DOMAIN}/changelog.md to check for recent or relevant breaking
> changes.
```

### 3.4 Golden-path pointer

Modeled on Stripe's "ALWAYS use the [Accounts v2 API]... for new integrations" and the PayKit line "Prefer `paykit.checkout.create()` (hosted) over hand-rolled card forms" — steer agents onto the maintained happy path before they improvise.

```markdown
- Prefer {GOLDEN_PATH_API} ({SHORT_REASON}) over {HAND_ROLLED_ALTERNATIVE}
  for {TASK}.
```

### 3.5 llms-full / llms-small tier pointers

Modeled on Hono's three-tier setup (`llms.txt` index, `llms-full.txt` everything inlined, ~94KB `llms-small.txt` for small context windows) and the llmstxt.org `## Optional` keyword — token-constrained agents may skip this section, so tier pointers live here, never core tasks.

```markdown
## Optional
- [llms-full.txt](https://{DOMAIN}/llms-full.txt): Entire docs inlined into one file
- [llms-small.txt](https://{DOMAIN}/llms-small.txt): Compact tier for small context windows
- [Changelog](https://{DOMAIN}/changelog.md): Machine-readable release notes, newest first
```

## 4. Pre-publish linter checklist

Run in CI on every docs deploy; fail the build on any unchecked box.

- [ ] `curl -sf /llms.txt` returns 200 with `text/plain` or `text/markdown` — same for `-full` and `-small`.
- [ ] Exactly one H1; blockquote present; every link line matches `^- \[.+\]\(https?://.+\): .+$`. Zero bare links.
- [ ] Every linked URL returns 200 and serves markdown (body doesn't start with `<!DOCTYPE`).
- [ ] MDX leak scan: `grep -E "^import .+ from" llms-full.txt` returns nothing.
- [ ] Version stamp matches the current release; build fails on a stale stamp.
- [ ] `llms-small.txt` ≤ 100KB.

## 5. Where to serve it

1. Domain root: `https://yourdomain.com/llms.txt` — HTTP 200, no auth wall, no bot challenge.
2. Mirror it at the docs root if docs live on a subpath or subdomain — Next.js serves both `nextjs.org/llms.txt` and `nextjs.org/docs/llms.txt`.
3. `Content-Type: text/plain` or `text/markdown`.
4. Static file: no redirects, no cookies, no Cloudflare bot challenge on this path.
5. Serve `llms-full.txt` and `llms-small.txt` alongside, under the same rules, and regenerate all tiers on every docs deploy.

---

*Last verified 2026-06-11. Templates, quotes, and rules trace to the parent guide.*

Parent guide: [llms.txt: The Complete Guide](/agentic-discovery/llms-txt) · Hub: [The Complete Playbook to Agentic Discovery](/agentic-discovery)
