Verify External API Docs
Purpose
Keep the main coding thread clean while verifying external technical facts from the internet.
This skill is for moments when implementation quality depends on checking documentation instead of guessing.
Use when
Use this skill when the task involves code that depends on behavior outside the current repository, especially:
- third-party library APIs
- framework APIs
- language or standard library behavior
- CLI flags or command syntax
- config schema or supported options
- migration or deprecation checks
- version-sensitive usage
This includes cases where the user does not explicitly say "check docs", but the task clearly requires verification.
Typical hidden triggers inside a coding task:
- refactoring to a different library API
- replacing one function/class with another
- updating old code to a newer major version
- fixing an error caused by incorrect parameters or unsupported options
- checking whether a proposed API actually exists
- confirming exact signature/defaults before modifying code
Do not use when
Do not use this skill for:
- repository-internal APIs that can be verified from local code
- generic exploratory browsing
- choosing between libraries or comparing products at a high level
- package installation instructions unless directly needed for the code change
- architecture discussions that do not require exact external facts
- local codebase exploration
Inputs
Expected inputs:
- current coding task
- the relevant file, call site, error, or refactor target
- the external library, language feature, framework, CLI, or config topic to verify
Optional inputs:
- repo dependency files to infer likely version
- current failing code snippet
- target replacement API or migration direction
Outputs
The skill should produce:
- a compact verification memo from the subagent
- the minimal verified facts needed for the current task
- the applied coding decision in the main thread
The final result should stay concise and should not paste large docs into the main context.
Constraints
- Prefer primary sources: official docs, language specs, official repositories, official release notes, and maintainer-authored migration guides.
- Use secondary sources only when no stronger source exists, and mark that clearly.
- Do not dump long excerpts from documentation into the main thread.
- Keep one subagent per distinct external topic; do not recurse further.
- Anchor to the likely installed version when repository context makes that possible.
- If the docs remain ambiguous, report ambiguity instead of guessing.
Procedure
Detect uncertainty that depends on external docs.
Trigger this skill when the task would otherwise require guessing an API, parameter, option, behavior, or version detail.
Infer likely version before research when possible.
Check nearby project files such as:
- package manifests
- lockfiles
pyproject.toml / requirements.txt
go.mod
Cargo.toml
pom.xml
- relevant config files
Do this only to narrow the research target.
Spawn a documentation subagent.
Prefer the custom agent docs-researcher if available at ~/.codex/agents/docs-researcher.toml.
If that custom agent is unavailable, use one bounded research subagent with the same contract.
For multiple unrelated libraries or APIs, spawn one subagent per topic and wait for all results.
Subagent instructions.
Ask the subagent to:
- prioritize official documentation and primary sources
- verify exact signatures, parameters, supported options, and semantics
- identify version-specific differences
- return only a compact memo
Keep the subagent return format small.
Require this format:
- Topic checked
- Likely version or version caveat
- Verified answer
- Exact API details
- Minimal example
- Sources
- Uncertainty or conflicts
Use the verified result in the main task.
After the subagent returns:
- continue the refactor, fix, or implementation
- avoid re-explaining the whole docs page
- surface only the facts necessary for the code decision
Handle uncertainty honestly.
If the docs are ambiguous, conflicting, or version-mismatched:
- say so clearly
- choose the safest implementation path
- prefer conservative changes over speculative API usage
Decision rules
When to trigger implicitly
Trigger when external correctness matters more than speed and the answer is likely version-sensitive or easy to hallucinate.
When not to trigger
Do not trigger if the answer is already available from local repository code or if the task does not depend on exact external behavior.
Version rule
If the repository version is visible, anchor the research to that version first.
If not, mention the ambiguity explicitly.
Source quality rule
Prefer:
- official docs
- official repo docs, release notes, or migration guides
- maintainer-authored material
Use blogs or forum answers only when no stronger source exists.
Definition of done
- External facts were verified from the strongest available sources rather than guessed.
- The memo stayed compact and focused on the exact coding decision.
- Version caveats are explicit when relevant.
- The main thread contains only the necessary verified facts, not a documentation dump.
- The resulting code decision is traceable back to the verified memo.
Final response behavior
In the main thread, return only a compact summary such as:
- what was verified
- what exact API or behavior is correct
- what code decision follows from that
- any version caveat that affects the change
Do not flood the main thread with documentation text.
Positive examples
Use this skill for tasks like:
- "refactor this to pathlib"
- "move this code to pydantic v2"
- "replace requests usage with httpx"
- "fix this unsupported keyword argument error"
- "update this React hook usage"
- "check whether this pandas parameter still exists"
- "see why this SQLAlchemy option fails after upgrade"
Negative examples
Do not use this skill for:
- "explain this repository architecture"
- "find where this local helper is defined"
- "compare 5 web frameworks for a new project"
- "install poetry on this machine"
- "write a high-level design doc"
1---2name: verify-external-api-docs3description: Verify external library, framework, language, standard library, CLI, or configuration behavior against official online documentation during implementation, refactoring, debugging, migration, or code review. Trigger not only when the user explicitly asks to check documentation, but whenever the current coding task depends on exact external API details that should not be guessed: method signatures, parameter names or defaults, supported options, return values, exceptions, deprecations, migration changes, version-specific behavior, language semantics, or configuration syntax. Use this for third-party or platform behavior outside the current repository. Spawn a docs-focused subagent, wait for its result, then continue the main task using only the verified facts. Do not use for repository-internal APIs, generic product research, package selection, dependency installation, or unrelated web browsing.4---56# Verify External API Docs78## Purpose910Keep the main coding thread clean while verifying external technical facts from the internet.1112This skill is for moments when implementation quality depends on checking documentation instead of guessing.1314## Use when1516Use this skill when the task involves code that depends on behavior outside the current repository, especially:17- third-party library APIs18- framework APIs19- language or standard library behavior20- CLI flags or command syntax21- config schema or supported options22- migration or deprecation checks23- version-sensitive usage2425This includes cases where the user does not explicitly say "check docs", but the task clearly requires verification.2627Typical hidden triggers inside a coding task:28- refactoring to a different library API29- replacing one function/class with another30- updating old code to a newer major version31- fixing an error caused by incorrect parameters or unsupported options32- checking whether a proposed API actually exists33- confirming exact signature/defaults before modifying code3435## Do not use when3637Do not use this skill for:38- repository-internal APIs that can be verified from local code39- generic exploratory browsing40- choosing between libraries or comparing products at a high level41- package installation instructions unless directly needed for the code change42- architecture discussions that do not require exact external facts43- local codebase exploration4445## Inputs4647Expected inputs:48- current coding task49- the relevant file, call site, error, or refactor target50- the external library, language feature, framework, CLI, or config topic to verify5152Optional inputs:53- repo dependency files to infer likely version54- current failing code snippet55- target replacement API or migration direction5657## Outputs5859The skill should produce:601. a compact verification memo from the subagent612. the minimal verified facts needed for the current task623. the applied coding decision in the main thread6364The final result should stay concise and should not paste large docs into the main context.6566## Constraints6768- Prefer primary sources: official docs, language specs, official repositories, official release notes, and maintainer-authored migration guides.69- Use secondary sources only when no stronger source exists, and mark that clearly.70- Do not dump long excerpts from documentation into the main thread.71- Keep one subagent per distinct external topic; do not recurse further.72- Anchor to the likely installed version when repository context makes that possible.73- If the docs remain ambiguous, report ambiguity instead of guessing.7475## Procedure76771. Detect uncertainty that depends on external docs.78 Trigger this skill when the task would otherwise require guessing an API, parameter, option, behavior, or version detail.79802. Infer likely version before research when possible.81 Check nearby project files such as:82 - package manifests83 - lockfiles84 - `pyproject.toml` / `requirements.txt`85 - `go.mod`86 - `Cargo.toml`87 - `pom.xml`88 - relevant config files89 Do this only to narrow the research target.90913. Spawn a documentation subagent.92 Prefer the custom agent `docs-researcher` if available at `~/.codex/agents/docs-researcher.toml`.93 If that custom agent is unavailable, use one bounded research subagent with the same contract.94 For multiple unrelated libraries or APIs, spawn one subagent per topic and wait for all results.95964. Subagent instructions.97 Ask the subagent to:98 - prioritize official documentation and primary sources99 - verify exact signatures, parameters, supported options, and semantics100 - identify version-specific differences101 - return only a compact memo1021035. Keep the subagent return format small.104 Require this format:105 - Topic checked106 - Likely version or version caveat107 - Verified answer108 - Exact API details109 - Minimal example110 - Sources111 - Uncertainty or conflicts1121136. Use the verified result in the main task.114 After the subagent returns:115 - continue the refactor, fix, or implementation116 - avoid re-explaining the whole docs page117 - surface only the facts necessary for the code decision1181197. Handle uncertainty honestly.120 If the docs are ambiguous, conflicting, or version-mismatched:121 - say so clearly122 - choose the safest implementation path123 - prefer conservative changes over speculative API usage124125## Decision rules126127### When to trigger implicitly128129Trigger when external correctness matters more than speed and the answer is likely version-sensitive or easy to hallucinate.130131### When not to trigger132133Do not trigger if the answer is already available from local repository code or if the task does not depend on exact external behavior.134135### Version rule136137If the repository version is visible, anchor the research to that version first.138If not, mention the ambiguity explicitly.139140### Source quality rule141142Prefer:1431. official docs1442. official repo docs, release notes, or migration guides1453. maintainer-authored material146147Use blogs or forum answers only when no stronger source exists.148149## Definition of done150151- External facts were verified from the strongest available sources rather than guessed.152- The memo stayed compact and focused on the exact coding decision.153- Version caveats are explicit when relevant.154- The main thread contains only the necessary verified facts, not a documentation dump.155- The resulting code decision is traceable back to the verified memo.156157## Final response behavior158159In the main thread, return only a compact summary such as:160- what was verified161- what exact API or behavior is correct162- what code decision follows from that163- any version caveat that affects the change164165Do not flood the main thread with documentation text.166167## Positive examples168169Use this skill for tasks like:170- "refactor this to pathlib"171- "move this code to pydantic v2"172- "replace requests usage with httpx"173- "fix this unsupported keyword argument error"174- "update this React hook usage"175- "check whether this pandas parameter still exists"176- "see why this SQLAlchemy option fails after upgrade"177178## Negative examples179180Do not use this skill for:181- "explain this repository architecture"182- "find where this local helper is defined"183- "compare 5 web frameworks for a new project"184- "install poetry on this machine"185- "write a high-level design doc"