agent-friendly-apis

Teaches building agent-friendly APIs with llms.txt documentation and doc-generating Claude Code skills.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/EricL2001/spoke-and-mirror --skill agent-friendly-apis-ericl2001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-friendly-apis
Source: https://github.com/EricL2001/spoke-and-mirror/tree/main/agent/skills/agent-friendly-apis
Command: npx skills add https://github.com/EricL2001/spoke-and-mirror --skill agent-friendly-apis-ericl2001

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers building APIs often write documentation that AI agents cannot reliably parse, and they lack a guided path to learn agent-friendly documentation patterns like llms.txt and structured markdown docs. ## Core Features & Use Cases - Guided course companion: Drives a 12-lesson Vercel Academy course across three modes (TA, Teaching, Evaluation), fetching lesson content and detecting student progress from their codebase. - Agent-friendly documentation patterns: Teaches seven documentation patterns, the llms.txt standard, and markdown doc endpoints for Next.js App Router APIs. - Skill-building workflow: Walks through creating a Claude Code skill that auto-generates API documentation, including quality checklists and an iteration loop. - Use Case: A student building a Next.js feedback API asks "teach me" and the skill detects their current lesson, fetches the lesson content, and coaches them step by step through adding llms.txt endpoints. ## Quick Start Ask the assistant to start the Agent-Friendly APIs course and teach you the next lesson based on your current project.

Frequently Asked Questions about agent-friendly-apis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make my API documentation agent-friendly?

Agent-friendly docs use seven patterns: endpoint signatures in code blocks, parameters as markdown tables, curl examples with real values, complete response bodies, exhaustive error documentation, a schema section, and multi-step workflow examples. Agents read docs literally, so explicit structure prevents wrong guesses.

What is llms.txt and how do I add it to a Next.js app?

llms.txt is a convention from llmstxt.org where sites serve a markdown discovery index at /llms.txt, similar to robots.txt for LLMs. In Next.js App Router, create app/llms.txt/route.ts returning text/plain content with an H1 project name, blockquote summary, and H2 sections with links.

How do I build a Claude Code skill that generates API docs?

Create a folder with SKILL.md containing YAML frontmatter (name, description with trigger phrases) and a five-step instruction body: discover routes, analyze each route, read TypeScript types, generate markdown, and write output. Add a references/ directory with formatting rules for progressive disclosure.

Why is my Claude Code skill not triggering?

Skills fail to trigger when the description field lacks trigger phrases matching what the user typed. Add more variations like "generate docs", "document this API", and "create API documentation" to the frontmatter description, and confirm SKILL.md is in the project root.

Does Next.js 16 handle dynamic route params differently?

Yes, in Next.js 16 dynamic route params are asynchronous and must be awaited. Use `const { id } = await params` in route handlers for [id] segments, unlike earlier versions where params were synchronous objects.