---
name: obtener-docs-api
description: Fetches la documentacion actualizada de APIs, SDKs y librerias de terceros usando la CLI chub, garantizando que el codigo se escribe contra la referencia mas reciente en lugar de datos de entrenamiento potencialmente obsoletos.
license: Apache-2.0
metadata:
  id: 4db58467
  slug: obtener-docs-api
  titulo: "Obtener Documentacion de APIs con chub"
  servicio: Web
  categoria_recurso: Web-Desarrollo
  tipo: referencia
  nivel: intermedio
  idioma: es
  idioma_original: en
  acceso: gratis
  precio_eur: 0
  plataformas: [Node.js, npm, CLI]
  dependencias: [@aisuite/chub]
  licencia: { spdx: Apache-2.0, redistribuible: true, uso_comercial: true }
  fuente:
    repo: mxyhi/ok-skills
    url: https://github.com/mxyhi/ok-skills/tree/main/get-api-docs
    commit: ee29738
    autor: mxyhi
    nombre_original: get-api-docs
    duplicados_en: []
  seguridad: { veredicto: seguro, riesgo: bajo, escaneado: "2026-06-14", motor: "grep-estatico+auditor-llm" }
  ficha:
    que_hace: "Recupera documentacion en tiempo real de cualquier API o SDK de terceros antes de escribir codigo contra ella."
    como_lo_hace: "Instala y ejecuta chub CLI para buscar y descargar la referencia oficial actualizada, con soporte para anotaciones locales persistentes entre sesiones."
  content_hash: "4db58467ec0b96dbc4349f9a41ba4e24b2f628a24180eb1a841b855383290ec2"
  version: 1.0.0
---

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