CyrusNuevoDia

Next With Text — Documentation skill for Claude Code

Documentation community

llms.txt, llms-full.txt, and per-page markdown for Next.js — in 2m.

How to install Next With Text

This entry records only its repository, not the path inside it, so there is no exact command to give. Open CyrusNuevoDia/next-with-text and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Next With Text does

llms.txt, llms-full.txt, and per-page markdown for Next.js — in 2m.

Alternatives in Documentation

  • PDF — Extract text, create PDFs, merge/split documents, and handle forms 94.1k ★
  • Skills Quick Reference Guide — A guide for choosing the right skill for your task 6.8k ★
  • Larecipe — ✏️ LaRecipe lives inside your Laravel app 2.5k ★

README

next-with-text

llms.txt for Next.js — in 3 simple steps.

npm install next-with-text
// next.config.ts
import { withText } from "next-with-text";

export default withText(nextConfig);
# .gitignore
**/app/%5Fllms/

That's the entire integration. Your app now serves:

  • /llms.txt — a spec-compliant llmstxt.org index of your pages, with real titles and descriptions
  • /llms-full.txt — every page's full content as markdown, in one file, for bulk ingestion
  • Accept: text/markdown — agents that ask a canonical URL for markdown get markdown; browsers are unaffected
  • /.md — a markdown twin of every page (/about → /about.md)

No route handlers to write, no middleware, no config files, no route lists to maintain. It reads your build output — not your source tree — so nothing it needs disappears in a serverless bundle. ChatGPT, Claude, Perplexity, and coding agents can read your site the way they want to.

Building locally leaves nothing behind: the generated files exist only for the deploy build that needs them ([details](#generated-files-clean-up-after-themselves)).

Requires Next.js 16.x, the App Router, and Node.js 20.9 or newer. Both ESM imports and CommonJS `require()` are supported.

How it works

`withText` hooks into the Next.js build and generates a private catch-all route. From there, the package has two paths that produce the same markdown:

  1. At build time, it reads the prerendered HTML paths Next.js reports, discovers the concrete routes Next emitted, converts each page to markdown, and writes llms.txt, llms-full.txt, and the per-page .md files into the deploy artifact. When you configure a deployment adapter, next-with-text composes with it and reads the adapter API's build outputs; without one it registers no adapter, because any adapter changes where Next stores prerenders, and reads Next's build manifests after next build finishes instead. Bot