Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Improve Documentation by Running Real Agent Tasks Against It

Overview

Test your documentation by giving Claude Code and Codex real tasks that depend on it in a clean sample project, read where each agent went wrong, and revise the docs on a branch before rerunning the same tasks.

Problem or Objective

More in Coding and Code Review

AI Agents and Models

Tools and Integrations

Tools
Claude Code · Codex CLI · Git
Prerequisites
Claude Code with its non-interactive -p mode (most surfaces require a Claude subscription or Anthropic Console account), Codex CLI signed in with a ChatGPT plan or an API key, a set of tasks with checks, and a throwaway sample project.

How It Works

Write five to ten realistic tasks a developer would do with your product using only the docs, each with a check that shows success (a test passes, a command prints the expected output). Make a clean sample project that contains your published docs as files and nothing else about the product. Run each task through Claude Code non-interactively with -p from a small script, saving the output of every run to a file, and run the same tasks in Codex CLI in its own copy of the project. Read the saved runs: note where an agent searched for something the docs never say, followed an outdated example or guessed a parameter. Group those notes by docs page, then ask Claude Code to draft revisions to those pages on a separate branch, quoting the confusion each change addresses. Have the docs owner review the changes, then rerun the same tasks on the revised docs and compare which checks now pass. Keep the task list and checks so the loop can be repeated after each release.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude Code, Codex CLI.
  2. Connect the toolsConnect the tools this workflow relies on: Claude Code, Codex CLI, Git.
  3. Check the prerequisitesClaude Code with its non-interactive -p mode (most surfaces require a Claude subscription or Anthropic Console account), Codex CLI signed in with a ChatGPT plan or an API key, a set of tasks with checks, and a throwaway sample project.
  4. Gather your detailsCollect what the prompt asks for: Folder with the saved runs, File listing the tasks and checks, Docs folder, Branch for the revisions.
  5. Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.

Practical Starter Prompt: Find where the docs confused the agents

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Read the saved agent runs in [Folder with the saved runs] for the tasks in [File listing the tasks and checks]. For each failed or slow run, note the step where the agent went wrong and which page in [Docs folder] it was relying on. Group the notes by page. Then, on a new branch named [Branch for the revisions], draft revisions only to those pages, and for each change quote the confusion it addresses. Do not change product code, delete pages or merge anything; I will have the docs owner review the branch before we rerun the tasks.

Run the tasks in a throwaway sample project. Have the docs owner review the branch, then rerun the same tasks and compare the checks before merging.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Anthropic's documentation says Claude Code can run non-interactively with the -p flag and is available as a CLI for scripts and CI/CD. The Codex CLI README describes signing in with a ChatGPT plan to use Codex locally. Neither source describes documentation testing, so how much the revised docs help depends on how realistic the tasks and checks are.

Limitations and Considerations

An agent getting stuck is a signal, not proof that a page is wrong; a person who knows the product decides every change. Run the tasks in a throwaway project: a -p session without --bare runs the project's hooks and connects its MCP servers, even in a folder you have never trusted. Each run uses your plan or API usage, so start with a small task set. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Official Website

The official site of the main tool or project in this use case.

Visit Website (opens in a new tab)code.claude.com

Related Videos

About anthropics/claude-code

About openai/codex

About anthropics/claude-code

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Run Claude Code programmatically - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC

    What this source supports
    • Add the -p (or --print ) flag to any claude command to run it non-interactively.
    • It's available as a CLI for scripts and CI/CD, or as Python and TypeScript packages for full programmatic control.
    • Without --bare , a -p session runs the hooks in a project's .claude/settings.json and connects the servers in its .mcp.json , even in a folder you've never trusted.
  2. openai/codex README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • We recommend signing into your ChatGPT account to use Codex as part of your Plus, Pro, Business, Edu, or Enterprise plan.
  3. Overview - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC

    What this source supports
    • Most surfaces require a Claude subscription or Anthropic Console account.
Report a problem

More with Claude Code

Planned, not done

Create Custom Store Tools Instead of Paying for Subscriptions

Use Claude Code to write small in-house tools for an online shop, such as a reply helper for support mail or a margin report, as an alternative to paying for separate apps, with testing before you rely on them.

code.claude.comanthropics/claude-code
Planned, not done

Structure Repeated Browser Research Into Evidence Tables

Give Claude Code the open-source Browser Use CLI with a local browser, ask the same research questions across a short list of pages, and keep every answer as a sourced table row.

github.comanthropics/claude-code, browser-use/browser-use
Planned, not done

Create Browser-Based Reading Activities for a Classroom

Give Claude Code a reading passage, a target level and a word list, and have it build one self-contained HTML page with comprehension questions and vocabulary flip cards that you check before class.

code.claude.comanthropics/claude-code

View all: Claude Code