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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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
Bình luận
- …
Thêm skill từ kho mã này
bloc-cubit
14kDạy agent của bạn cách quản lý trạng thái ứng dụng Flutter bằng Bloc hoặc Cubit, gồm khi nào chọn loại nào và thiết lập mặc định an toàn để test.
riverpod
14kDạy agent của bạn quản lý trạng thái Flutter bằng Riverpod: provider, dữ liệu bất đồng bộ và kiểm thử, với mặc định hợp lý cho từng trường hợp.
document-extraction
14kGiúp agent của bạn đọc PDF, hình ảnh và bảng tính, chuyển thành văn bản sạch và lấy các trường như tổng hóa đơn bằng dịch vụ ADE của LandingAI.
document-workflows
14kGiúp agent của bạn xây dựng các quy trình lặp lại để xử lý nhiều tài liệu cùng lúc, chuẩn bị cho công cụ tìm kiếm và nạp kết quả vào cơ sở dữ liệu.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.