Skip to content
Skillpedia
General coding14k Β· #11268

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.md

Copy 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

Use this skill to help me: https://github.com/andrewyng/context-hub/blob/main/cli/skills/get-api-docs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills