get-api-docs
What it does
This skill fetches up-to-date documentation for software libraries and online services using the chub tool. It is for people who ask their AI to write code that uses an API or SDK.
When to use it
- βWhen you ask your AI to use an API such as OpenAI or Stripe.
- βWhen you ask for code that uses a specific SDK or library.
- βWhen you want your agent to check current docs instead of running a web search.
Skill link
https://github.com/andrewyng/context-hub/blob/main/cli/skills/get-api-docs/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to use the Stripe API to write code that creates a payment link, with the latest docs.β
5 new skills a week. 1 minute to read.
How it works
The agent installs or runs the chub tool, searches for matching documentation, and reads it before writing code. It can also leave feedback on the docs it used.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
Do I need to install anything?
The agent checks for the chub tool and installs it if it is missing and the setup allows it.
Is this better than a web search?
The skill says it finds more accurate, current documentation than a general web search.
Which languages can it fetch docs for?
The docs can be fetched for Python, JavaScript, or TypeScript, depending on the language you choose.
Details
Original description by the author
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
repo: andrewyng/context-hub
Popularity
- GitHub stars
- 14k
- Ranking position
- #11268
- License
- MIT
- Updated
- 5/31/2026
Comments
- β¦
More skills from this repository
bloc-cubit
14kTeaches your agent how to manage app state in Flutter with Bloc or Cubit, including when to pick each one and safe defaults for testing.
riverpod
14kTeaches your agent how to manage Flutter app state with Riverpod, covering providers, async data, and testing, with sensible defaults for each case.
document-extraction
14kHelps your agent read PDFs, images, and spreadsheets, turn them into clean text, and pull out fields like invoice totals using LandingAI's ADE service.
document-workflows
14kHelps your agent build repeatable pipelines that process many documents at once, prepare them for search tools, and load results into a database.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.