Guide · Agent skill
How to use the Get API Docs via chub agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The get-api-docs skill tells your AI agent to look up current documentation with the chub command-line tool before it writes code against an outside service such as the OpenAI or Stripe API. Instead of relying on what the model remembers from training, the agent searches for the matching doc, fetches it in your chosen language, and writes code from that text. This guide explains what the skill does, how to install it, how to trigger it, and what to watch for on safety and network access.
Quick start
- 1Download the ZIP. Download the get-api-docs ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
- 4Make sure chub is installed. Check that chub works. If it is missing and you have Node.js, npm and permission, install it with npm install -g @aisuite/chub.
- 5Ask for code against an API. Make a request that names an external service and a language, such as using the Stripe API in TypeScript.
- 6Review annotations and feedback. Before the agent saves a chub annotate note or sends chub feedback, check that it contains no secrets or private code.
What is an agent skill, and what does get-api-docs make the agent do?
An agent skill is a folder containing a SKILL.md file with instructions that an AI agent reads when a task matches the skill's description. The get-api-docs skill is one such folder. Its description tells the agent to fetch documentation for third-party APIs, SDKs or libraries before writing code that uses them.
When you ask for code against an external service, the agent runs chub to find and fetch the relevant doc. After the task, it can save short notes about gotchas it discovered and send documentation feedback back through chub.
- Searches for the matching doc with chub search
- Fetches the doc in your chosen language with chub get
- Writes code based on the fetched text rather than memorized API shapes
- Saves gotchas with chub annotate, which persist across sessions and appear on future chub get calls
- Sends documentation feedback with chub feedback, without secrets or source code
Install the get-api-docs skill
Download the ZIP for this skill from this page. Then choose one of the following methods.
For Claude Code, unzip the file into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder if you want the skill limited to one project.
In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Install the chub CLI the skill depends on
The skill calls the chub command-line tool. The skill's first step is to run chub --help. If chub is missing, the skill tells the agent to install it, but only if the environment has Node.js, npm, network access and permission to run a global package install.
Install it yourself beforehand if you prefer to control the install.
- Requires Node.js and npm
- Requires network access to fetch documentation
- Requires permission for a global npm install
npm install -g @aisuite/chubHow do you trigger the skill with natural requests?
You do not need to name the skill. The description covers requests such as asking to use the OpenAI API, call the Stripe API, use the Anthropic SDK or query Pinecone, and any time you ask for code against an external service where current API reference matters.
You can also trigger it explicitly by asking for the latest docs or latest API behavior, or by mentioning chub or Context Hub.
- "Use the OpenAI API to create a chat completion in Python."
- "Call the Stripe API to create a checkout session. Use the latest docs."
- "Query Pinecone for nearest neighbours in TypeScript. Check chub."
- "What's the latest behavior of the Anthropic SDK streaming call?"
What the agent runs under the hood
The skill walks the agent through a fixed sequence. It checks chub with chub --help, searches with a keyword query, then fetches the chosen doc. Pass the language with --lang. The skill names py, js and ts as options.
The skill also says the output of chub --help overrides its own instructions if they conflict, so the live tool guidance takes priority.
- chub --help to confirm the tool and read current instructions
- chub search "<keywords>" --json to find the best id, such as openai/chat, anthropic/sdk or stripe/api
- chub get <id> --lang py (or --lang js, --lang ts) to fetch the doc
- chub annotate <id> "note" to save a gotcha
- chub feedback to report doc problems
chub search "<keywords>" --json
chub get <id> --lang py # or --lang js, --lang ts
chub annotate <id> "Webhook verification requires raw body — do not parse before verifying"Safety notes: scripts and network access
This skill runs scripts and uses the network. The skill itself can install a global npm package and run chub commands that fetch documentation over the network. If your environment forbids global installs or outbound network commands, the skill will fail or need a workaround.
Annotations and feedback are the other area to think about. Annotations are stored locally. Feedback goes back through chub. The skill tells the agent not to include secrets, source code or private architecture details, but that instruction cannot fully prevent a leak, so review what the agent writes before it is sent.
- Do not use the skill where global npm installs or network commands are restricted
- Review annotation and feedback text before it is saved or sent
- Keep secrets, source code and private architecture out of feedback comments
Tips for getting good results
Name the language you want in your request, because the fetch step uses --lang. Use specific service names so the search finds the right doc. If the first search returns nothing, the skill says to try broader terms.
Keep annotations short and actionable. The skill asks the agent not to repeat what the doc already says, so a note should record only what the doc missed.
- State the language, for example Python or TypeScript
- Name the exact service or SDK
- Try broader search terms if nothing matches
- Keep annotations to one actionable gotcha each
What people use it for
- Writing a chat completion call against the OpenAI API in Python using current docs
- Creating a Stripe checkout flow in TypeScript with the latest API reference
- Querying a Pinecone index from JavaScript with up-to-date SDK documentation
- Saving a webhook gotcha as an annotation so future sessions start with it
Frequently asked questions
How do I install the get-api-docs skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
What do I need to run get-api-docs?
You need Node.js and npm so the agent can install the @aisuite/chub CLI if it is missing, network access to fetch docs, and permission for a global npm install. The skill also runs scripts and uses the network.
Is get-api-docs free and what is its licence?
The source for this skill is listed under the MIT licence. The source does not mention pricing, so check the chub package and Context Hub for any terms of their own.
Why does the agent fetch docs instead of using what it already knows?
The skill says the model's pre-trained knowledge may be outdated because APIs change. Fetching the current doc with chub gives the agent the up-to-date API shapes to write code from.
Can I use this skill without the chub CLI?
The skill is built around chub commands such as chub search and chub get. If chub is not installed and cannot be installed, the skill will fail or need a workaround, so install chub first.
Is there an alternative to get-api-docs?
The skill says fetching docs with chub is a better way to find documentation than a web search. The source does not compare it with other tools, so you would need to evaluate other options yourself.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you write code against fast-changing APIs and want the agent to read current docs instead of relying on training memory, and you already use or can install the chub CLI. Skip it for tasks that do not involve external APIs, or in environments that block global npm installs or network commands, since it will fail or need workarounds there.
Download the skill