get-api-docs

$npx mdskill add mxyhi/ok-skills/get-api-docs

Fetch API documentation using chub to ensure accuracy

  • Resolve user requests for external APIs by fetching up-to-date documentation.
  • Depends on `chub` CLI tool for fetching API documentation.
  • Uses latest instructions provided by `chub --help` command.
  • Delivers fetched documentation directly to the user or agent.

SKILL.md

.github/skills/get-api-docsView on GitHub ↗
---
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.

More from mxyhi/ok-skills

SkillDescription
ai-elementsBuild AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
better-iconsUse when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search <query>` to find icons, `better-icons get <id>` to get SVG. Also available as MCP server for AI agents.
browser-traceCapture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network/console/DOM activity, attach a trace to an in-progress session, or feed structured per-page summaries back into an agent loop so its next iteration learns from the last one.
codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
find-docs>-
gpt-tasteElite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.
grillingGrill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
imagegen-frontend-webElite frontend image-direction skill for generating premium, conversion-aware website design references. CRITICAL OUTPUT RULE — generate ONE separate horizontal image FOR EVERY section. A landing page with 8 sections produces 8 images. Never compress multiple sections into one image. Enforces composition variety (not always left-text / right-image), background-image freedom, varied CTAs, varied hero scales (giant / mid / mini minimalist), narrative concept spine, second-read moments, and a single consistent palette across all images. Optimized for landing pages, marketing sites, and product comps that developers or coding models can accurately recreate.
karpathy-guidelinesBehavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.