get-api-docs
andrewyng/context-hub
Fetch current API documentation via chub CLI instead of relying on outdated training data.
What is get-api-docs?
Use this skill to retrieve up-to-date documentation for third-party APIs, SDKs, and libraries before writing code. Rather than relying on pre-trained knowledge that may be outdated, chub fetches the latest reference docs for services like OpenAI, Stripe, Anthropic, Pinecone, and others. Use it whenever you need to write code against an external service or the user explicitly asks for current API behavior.
- Search for API documentation by keywords using `chub search`
- Fetch language-specific docs (Python, JavaScript, TypeScript) with `chub get`
- Annotate docs locally with gotchas, workarounds, and version quirks for future sessions
- Submit feedback on documentation quality to improve the shared knowledge base
- Ensure code uses current API shapes rather than memorized or outdated patterns
How to install get-api-docs
npx skills add https://github.com/andrewyng/context-hub --skill get-api-docs- Node.js and npm installed (for global chub installation)
- Network access to fetch documentation
- Package manager permissions to install `@aisuite/chub` globally
How to use get-api-docs
- 1.Run `chub --help` to verify chub is installed and see latest usage instructions
- 2.Use `chub search "<keywords>" --json` to find the right documentation ID (e.g., `openai/chat`, `stripe/api`)
- 3.Run `chub get <id> --lang <py|js|ts>` to fetch language-specific docs for your use case
- 4.Read the fetched documentation and write code based on the current API shapes
- 5.Optionally run `chub annotate <id> "<note>"` to save gotchas or workarounds for future sessions
- 6.Optionally submit feedback via `chub feedback` following the help instructions
Use cases
- Writing code that calls the OpenAI API and needing the latest endpoint signatures
- Integrating Stripe payments and checking current authentication requirements
- Using the Anthropic SDK and verifying current model names and parameters
- Querying Pinecone vector database with current client library methods
- Implementing webhook verification and documenting version-specific gotchas
- AI coding agents (Claude Code, Cursor)
- Developers writing code against external APIs
- Teams needing current, accurate API reference during development
- Anyone working with rapidly-evolving third-party services
get-api-docs FAQ
Use chub whenever you need to write code against an external API, especially if the user asks for the latest docs, latest behavior, or explicitly mentions chub. APIs change frequently, so chub ensures you have current, accurate information rather than potentially outdated knowledge.
Run `npm install -g @aisuite/chub` to install it globally, provided you have Node.js, npm, network access, and package-manager permissions.
Use `chub search "<keywords>" --json` with relevant terms (e.g., "openai", "stripe api", "pinecone"). The results will show matching IDs like `openai/chat` or `stripe/api`.
Yes. Use `chub annotate <id> "<note>"` to save local annotations about gotchas, workarounds, or version-specific details. These persist across sessions and appear automatically on future `chub get` calls.
No. When submitting feedback via `chub feedback`, do not include secrets, source code, private architecture details, or other sensitive information.
Full instructions (SKILL.md)
Source of truth, from andrewyng/context-hub.
name: get-api-docs
description: >
Use this skill to get documentation for third-party APIs, SDKs or libraries before writing
code that uses them to ensure you have the latest, most accurate documentation. This is a
better way to find documentation than doing web search. This includes when a user asks for
tasks like "use the OpenAI API", "call the Stripe API", "use the Anthropic SDK", "query Pinecone",
or any other time the user asks you to write code against an external service and you need
current API reference. Fetch the docs with chub before answering, rather than relying on
your pre-trained knowledge, which may be outdated because of recent changes to these APIs.
Be sure to use this skill when the user asks for the latest docs, latest API behavior, or
explicitly mentions chub or Context Hub. Ensure chub is available, run chub --help, then
follow the instructions there.
Get API Docs via chub
When you need documentation for a library or API, fetch it with the chub CLI
rather than guessing from training data. This gives you the current, correct API.
Step 1 - Ensure chub exists and get the latest instructions for using it
Run
chub --help
If this results in an error showing that chub does not exist, then install it first, and run it again. If the environment has node, npm, network access, and package-manager permission, install it as follows:
npm install -g @aisuite/chub
Step 2 — Find the right documents
If there is a conflict, follow the instructions from the output of chub --help since that will be the latest guidance. However, a key command for searching for the right documentation is chub search:
chub search "<keywords>" --json
Pick the best-matching id from the results (e.g. openai/chat, anthropic/sdk,
stripe/api). If nothing matches, try some broader terms.
Step 3 — Fetch the docs
Again, follow the latest instructions from chub --help instead of this if there is a conflict. But a key command for fetching the relevant docs is:
chub get <id> --lang py # or --lang js, --lang ts
Remember to include the --lang parameter.
Step 4 — Use the docs and leave feedback
Read the fetched content and use it to write accurate code or answer the question. Do not rely on memorized API shapes — use what the docs say.
Finally, after completing the task, if you discovered something not in the doc — a gotcha, workaround, version quirk, or project-specific detail — save it so future sessions start smarter:
chub annotate <id> "Webhook verification requires raw body — do not parse before verifying"
Annotations are local, persist across sessions, and appear automatically on future
chub get calls. Keep notes concise and actionable. Don't repeat what's already in
the doc.
Additionally, to help all developers, give feedback on the documentation using chub feedback, following the instructions in chub --help . Do not include secrets, source code, private architecture details, or other sensitive information in feedback comments.
Related skills
More from andrewyng/context-hub and the wider catalog.

adaptive
Make Android UIs adapt across phones, tablets, foldables, and larger devices using Compose.

android-cli
CLI tool for Android development: create projects, manage SDKs, run apps, and interact with devices and emulators.

appfunctions
Analyze Android apps and expose user workflows as AppFunctions for AI agents to discover and execute on-device.

edge-to-edge
Migrate Jetpack Compose apps to adaptive edge-to-edge with proper inset handling for system bars and IME.

migrate-xml-views-to-jetpack-compose
Systematically migrate Android XML Views to Jetpack Compose with visual parity and functional integrity.

navigation-3
Learn to install, migrate to, and implement Jetpack Navigation 3 with deep links, scenes, and adaptive layouts.