Agent skill

Get API Docs with chub

by andrewyng in andrewyng/context-hub

Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

MITAuto-check passedDevelopment

Install Get API Docs with chub

skills CLI
$ npx skills add andrewyng/context-hub --skill get-api-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install andrewyng/context-hub get-api-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli/skills/get-api-docs .claude/skills/get-api-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
get-api-docs
GitHub stars
14k
Used in
2 other repos
Token cost
~775 tokens
SKILL.md length
301 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

  • Works in 4 steps: Ensure chub exists and get the latest… → Find the right documents → Fetch the docs → …
  • Writing code against the OpenAI, Stripe or Anthropic APIs and needing current reference
  • SKILL.md covers Step 1 - Ensure chub exists…, Step 2 — Find the right…, Step 3 — Fetch the docs and Step 4 — Use the docs and…
  • Calls npm

What it does

Before writing code against a third-party API, SDK or library, the agent fetches current documentation with the `chub` CLI (Context Hub) instead of relying on training data, which may predate API changes. It runs `chub --help` first, installs the tool globally through npm when it is missing and the environment allows it, and treats the help output as the latest guidance whenever that conflicts with the skill.

The flow is to search with `chub search` and a keyword query to get document ids such as openai/chat, anthropic/sdk or stripe/api, then fetch one with `chub get`, always passing a language flag (py, js or ts). After finishing, the agent can save a gotcha or version quirk with `chub annotate`; annotations are local, persist across sessions and appear on later fetches. It can also send feedback on the documentation with `chub feedback`, and must keep secrets, source code and private architecture details out of that feedback.

When your agent uses it

  • Writing code against the OpenAI, Stripe or Anthropic APIs and needing current reference
  • Looking up the latest behavior of a third-party SDK
  • Saving a project-specific API gotcha for future sessions

Example prompts

  • “Use the Stripe API to create a checkout session. Get the current docs first.”
  • “Write a Python script that queries Pinecone, using the latest docs from chub.”
  • “Add a note to the Stripe webhook docs that signature checks need the raw body.”

Requirements

  • The chub CLI (npm install -g @aisuite/chub), which needs Node.js, npm and network access

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Ensure chub exists and get the latest instructions for using it
  2. Find the right documents
  3. Fetch the docs
  4. Use the docs and leave feedback

What it can do on your machine

Read from SKILL.md and the folder at commit 67dcbeb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Get API Docs with chub loads about 775 tokens when it runs. Until then it costs about 217 tokens; SKILL.md has 301 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~217
When it runs · the whole SKILL.md, loaded when a task matches
~775

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from andrewyng/context-hub at commit 67dcbeb, republished under its MIT licence (© andrewyng). 301 words, ~775 tokens.

Download SKILL.mdSave it as .claude/skills/get-api-docs/SKILL.md (or your agent's skills folder).
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

bash
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:

bash
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:

bash
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:

bash
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:

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

© andrewyng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in cli/skills/get-api-docs of andrewyng/context-hub.

Open the folder on GitHubat commit 67dcbeb

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in andrewyng/context-hub, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Get API Docs with chub next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Get API Docs with chub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Get API Docs with chub this skillandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Get API Docssudomakes/backroad162—~1kAutomated safety check: PassMIT
Quota Provider Adapter Noteskunchenguid/quota-axi144—~4.1kAutomated safety check: PassMIT
Readme Updateralirezarezvani/claude-code-tresor777—~1.5kAutomated safety check: PassMIT
DeepChat Provider IntegrationThinkInAIXYZ/deepchat6.4k1 repos~1.2kAutomated safety check: PassApache-2.0
Create SkillHyk260/PureChat5461 repos~823Automated safety check: PassMIT

Similar skills

  • Get API Docs

    sudomakes/backroad

    A skill your agent uses when you need documentation for a third-party library, SDK, or API before writing code that uses it — for example, "use the OpenAI API", "call the Stripe API", "use the…

    162 GitHub stars~1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Quota Provider Adapter Notes

    kunchenguid/quota-axi

    Reference of credential sources, quota windows, endpoint shapes, error recovery and quirks for each provider supported by the quota-axi tool.

    144 GitHub stars~4.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Readme Updater

    alirezarezvani/claude-code-tresor

    Keep README files current with project changes. An agent skill from alirezarezvani/claude-code-tresor.

    777 GitHub stars~1.5k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • DeepChat Provider Integration

    ThinkInAIXYZ/deepchat

    Guides adding an LLM provider to DeepChat through explicit source changes: collect the provider details, pick a transport path and add registry entries and tests.

    6.4k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Create Skill

    Hyk260/PureChat

    Create a new skill in the current repository. An agent skill from Hyk260/PureChat.

    546 GitHub starsUsed in 1 repo~823 tokens
    DevelopmentAuto-check passed
  • Genie API Service Docs

    qualcomm/qai-appbuilder

    GenieAPIService technical documentation retrieval. An agent skill from qualcomm/qai-appbuilder.

    246 GitHub stars~840 tokensUpdated today
    DevelopmentAuto-check passed

More from andrewyng/context-hub

All 8 skills in this repo
  • Tavily Search API Integration

    andrewyng/context-hub

    Guides building Tavily integrations for web search, URL extraction, site crawling and AI-assisted research in Python or JavaScript agent and RAG projects.

    14k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Flutter Bloc and Cubit

    andrewyng/context-hub

    Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.

    14k GitHub stars~998 tokensUpdated 4 mo ago
    Auto-check passed
  • Sequences parts-mcp tool calls for finding, pricing and checking availability of electronic components, including BOM processing and datasheet navigation.

    14k GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Olakai Monitoring Integration

    andrewyng/context-hub

    Adds Olakai monitoring to an existing LLM application with minimal code changes, then configures custom KPIs so the dashboard tracks business outcomes instead of just token counts.

    14k GitHub stars~4.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Playwright Login Flows

    andrewyng/context-hub

    Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.

    14k GitHub stars~715 tokensUpdated 4 mo ago
    Auto-check passed
  • Olakai Agent Project Setup

    andrewyng/context-hub

    Builds a new AI agent with Olakai monitoring from the start: CLI login, SDK integration, per-agent KPI configuration and an end-to-end check that data flows.

    14k GitHub stars~5k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Get API Docs with chub

What does Get API Docs with chub do?

Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes. Before writing code against a third-party API, SDK or library, the agent fetches current documentation with the `chub` CLI (Context Hub) instead of relying on training data, which may predate API changes. It runs `chub --help` first, installs the tool globally through npm when it is missing and the environment allows it, and treats the help output as the latest guidance whenever that conflicts with the skill.

When should I use Get API Docs with chub?

Get API Docs with chub fits situations like: writing code against the OpenAI, Stripe or Anthropic APIs and needing current reference; looking up the latest behavior of a third-party SDK; saving a project-specific API gotcha for future sessions.

How do I install Get API Docs with chub in Claude Code?

Run `npx skills add andrewyng/context-hub --skill get-api-docs -a claude-code`. Or copy the skill folder (cli/skills/get-api-docs in andrewyng/context-hub) into .claude/skills/get-api-docs in your project. Claude Code loads it when a task matches its description.

How do I install Get API Docs with chub in Codex?

Run `npx skills add andrewyng/context-hub --skill get-api-docs -a codex`. Or copy the skill folder (cli/skills/get-api-docs in andrewyng/context-hub) into .agents/skills/get-api-docs in your project. Codex loads it when a task matches its description.

Can I use Get API Docs with chub in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add andrewyng/context-hub --skill get-api-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/get-api-docs, .gemini/skills/get-api-docs, .github/skills/get-api-docs and .opencode/skills/get-api-docs in your project.

What does Get API Docs with chub need to run?

Going by SKILL.md and its folder, Get API Docs with chub needs the command-line tools its instructions call (npm). Our summary lists: The chub CLI (npm install -g @aisuite/chub), which needs Node.js, npm and network access.

Does Get API Docs with chub access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Get API Docs with chub safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Get API Docs with chub use?

Get API Docs with chub is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Get API Docs with chub use?

About 775 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Get API Docs with chub?

Skills that share tags, products or a category with Get API Docs with chub: Get API Docs (sudomakes/backroad, 162 stars), Quota Provider Adapter Notes (kunchenguid/quota-axi, 144 stars), Readme Updater (alirezarezvani/claude-code-tresor, 777 stars) and DeepChat Provider Integration (ThinkInAIXYZ/deepchat, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Get API Docs with chub?

andrewyng (a GitHub user) maintains it in andrewyng/context-hub, which has 13,976 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 31, 2026.

Source: andrewyng/context-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.