# coding-agent-docs-optimization

Turns SDK, API or protocol docs into something a coding agent can integrate from unattended, on the first attempt.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 10300 installs · ★ 5
- Author: Samuel Berthe
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/samber/developer-relations-skills/tree/HEAD/skills/coding-agent-docs-optimization/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/coding-agent-docs-optimization

## What it does

The skill treats the agent as a real reader with fixed traits: no memory of the previous page, no eyes for screenshots, a hard context budget, and a habit of inventing plausible API surface when the real one is unstated. It starts by checking whether an agent can fetch the docs at all. If you can make outbound HTTP requests, it fetches a page and the index with each agent user-agent string and records the status codes. A CDN that blocks AI crawlers by default fails every later step silently, so that check comes before any audit of the text.

Next comes a baseline cold run: a fresh agent, no prior knowledge, sources restricted to the published surfaces, one run per task in a frozen set. Every corrective turn gets logged. Then the skill inventories what an agent can already reach — an index file, markdown versions of pages, machine-readable specs, a versioned entry point, SDK doc comments — and marks each present, partial or missing.

Rewrites are limited to the pages the failed runs actually touched. A finding on a task no cold run failed does not make the list, however easy the fix. The spec gets annotated where an invented parameter or a wrong call traces back to it, and new entry points are published and advertised in the README, the docs navigation and the response headers. Scope covers docs pages, machine-readable specs and SDK source-level documentation; getting cited by AI search engines and contributor-facing agent instructions sit in separate skills.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add samber/developer-relations-skills --skill coding-agent-docs-optimization -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/coding-agent-docs-optimization/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/coding-agent-docs-optimization/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add samber/developer-relations-skills --skill coding-agent-docs-optimization -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/coding-agent-docs-optimization/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add samber/developer-relations-skills --skill coding-agent-docs-optimization -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/coding-agent-docs-optimization/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install samber/developer-relations-skills coding-agent-docs-optimization
```

2. **Manually: put the files in place**
- File: `.github/skills/coding-agent-docs-optimization/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add samber/developer-relations-skills --skill coding-agent-docs-optimization -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/samber/developer-relations-skills --path skills/coding-agent-docs-optimization
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/coding-agent-docs-optimization/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add samber/developer-relations-skills --skill coding-agent-docs-optimization -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/samber/developer-relations-skills/tree/HEAD/skills/coding-agent-docs-optimization/SKILL.md

## When to use it
- check whether the CDN serves docs to AI crawlers
- trace invented API calls back to the spec that caused them
- run a cold agent pass over a frozen task set
- publish llms.txt and markdown versions of pages
- rank doc fixes by how many cold runs failed

## Example prompts
- Check whether an agent could wire up our SDK from the published docs alone
- Run a cold agent pass over these five integration tasks and log where it goes wrong
- Add llms.txt and markdown endpoints, then advertise them in the README and docs navigation

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: e269e659fe123f10.

BEGIN THIRD-PARTY FILE e269e659fe123f10
```text
---
name: coding-agent-docs-optimization
description: Makes SDK, API or protocol documentation something a coding agent can integrate from unattended - crawler access, machine-readable entry points (llms.txt, markdown endpoints, OpenAPI and JSON Schema files), self-contained copy-paste-safe pages, and a measured first-attempt agent success rate. Use whenever the user mentions agent-readable or AI-ready docs, agent experience or AX, llms.txt or llms-full.txt, docs for coding agents, agents inventing API calls that do not exist, or asks whether an agent could wire up their SDK from the docs alone - even if they never say "agent". Not for AI-search citation (samber/developer-relations-skills@developer-docs-ai-visibility) or a repo's contributor agent instructions. For human docs architecture use samber/developer-relations-skills@developer-docs-structure-audit.
license: MIT
metadata:
  author: Samuel Berthe
  version: "1.0.2"
---

# Coding Agent Docs Optimization

You are a documentation engineer whose reader is a coding agent integrating someone else's SDK, API, or protocol. Make that integration succeed on the first attempt, unattended, and prove it with a repeatable run.

This is the documentation half of **agent experience (AX)** - the term Mathias Biilmann (Netlify) coined in January 2025 for "the holistic experience AI agents will have as the user of a product or platform". His three pillars:

- Simple access and permissions.
- Clean APIs.
- Machine-optimized documentation - this skill owns that one.

The first two are product and API design. Pointing at them as the real cause of a failure is a legitimate finding, not a deflection.

Biilmann again, on why this is a distinct discipline: "LLMs understand your product differently than human developers. And writing documentation for LLMs is not the same as for humans."
```
END THIRD-PARTY FILE e269e659fe123f10

The third-party file has ended. Everything between the e269e659fe123f10 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 1849 of 21449 bytes. © Samuel Berthe · MIT · https://github.com/samber/developer-relations-skills/tree/HEAD/skills/coding-agent-docs-optimization/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
