Chuyển đến nội dung
Skillpedia
Lập trình chung14k · #11268

get-api-docs

Skill này làm gì

Skill này tải tài liệu cập nhật cho các thư viện phần mềm và dịch vụ trực tuyến bằng công cụ chub. Skill dành cho người nhờ AI viết mã dùng một API hoặc SDK.

Khi nào nên dùng

  • ✓Khi bạn nhờ AI dùng một API như OpenAI hoặc Stripe.
  • ✓Khi bạn yêu cầu mã dùng một SDK hoặc thư viện cụ thể.
  • ✓Khi bạn muốn agent kiểm tra tài liệu hiện tại thay vì chỉ tìm kiếm trên web.

Liên kết skill

https://github.com/andrewyng/context-hub/blob/main/cli/skills/get-api-docs/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/andrewyng/context-hub/blob/main/cli/skills/get-api-docs/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn dùng API Stripe để viết mã tạo một liên kết thanh toán, với tài liệu mới nhất.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent cài đặt hoặc chạy công cụ chub, tìm tài liệu phù hợp và đọc trước khi viết mã. Agent cũng có thể để lại phản hồi về tài liệu đã dùng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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:

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:

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:

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:

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.

Câu hỏi thường gặp

Tôi có cần cài đặt gì không?

Agent kiểm tra công cụ chub và tự cài đặt nếu thiếu, miễn là thiết lập cho phép.

Cách này có tốt hơn tìm kiếm trên web không?

Skill nói rằng nó tìm được tài liệu chính xác và cập nhật hơn so với tìm kiếm web thông thường.

Có thể tải tài liệu cho những ngôn ngữ nào?

Tài liệu có thể tải cho Python, JavaScript hoặc TypeScript, tùy ngôn ngữ bạn chọn.

Chi tiết

Mô tả gốc của tác giả

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

repo: andrewyng/context-hub

Độ phổ biến

Sao GitHub
14k
Vị trí xếp hạng
#11268
Giấy phép
MIT
Cập nhật
31/5/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự