get-api-docs
避免凭训练数据猜测,能确保引用最新接口与用法。
依赖 chub CLI,运行时会调用本地/远程可执行文件。
使用 chub CLI 获取第三方 API/库的最新文档与用法示例。
在写调用外部服务的代码前,用 chub CLI 拉取最新的第三方 API/SDK 文档,而不是凭记忆或随便搜,能拿到最准确的用法和示例。要接入 OpenAI、Stripe、Anthropic、Pinecone 等服务时先跑 chub,确认接口与示例再实现,避免被过时文档坑到。
▸ 展开 SKILL.md 英文原文
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.
帮我安装这个 skill:https://raw.githubusercontent.com/mxyhi/ok-skills/main/get-api-docs/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/mxyhi/ok-skills/main/get-api-docs/SKILL.md"# 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