context-hub
Original:🇺🇸 English
Translated
Fetch up-to-date third-party API/SDK docs via chub before writing or reviewing integration code — so method names, payload fields, and auth headers are always sourced from live docs, not stale training data. Don't use for first-party project docs, generic programming questions, or when the user only wants a conceptual answer rather than integration code.
4installs
Sourceluongnv89/skills
Added on
NPX Install
npx skill4agent add luongnv89/skills context-hubTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Context Hub
Use as the default source of truth for third-party API/SDK behavior.
chubWhen to Use
Trigger this skill whenever a task involves:
- Writing or reviewing code that calls an external API or SDK (OpenAI, Stripe, Anthropic, Pinecone, Twilio, etc.)
- Implementing webhooks, auth flows (OAuth, API keys, JWTs), or library-specific method calls
- Debugging integration errors where the root cause may be an outdated API contract
- Migrating to a new version of an SDK or third-party library
Even if the user does not explicitly ask for documentation — fetch first, code second.
Repo Sync Before Edits (mandatory)
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
bash
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"If the working tree is not clean, stash first, sync, then restore:
bash
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash popIf is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
origin1) Ensure chub
is ready
chubRun:
bash
chub help
chub updateIf is not installed and installation is allowed, run:
chubbash
npm install -g @aisuite/chubIf installation is blocked, tell the user and use official docs directly.
2) Identify target docs
Run:
bash
chub search "<library or API name>" --jsonChoose the best (, for example , ).
If results are weak, retry with broader keywords.
id<author>/<name>openai/chatstripe/api3) Fetch language-specific docs
Run:
bash
chub get <id> --lang pyUse the project language (, , ) when variants exist.
Omit when only one variant is available.
pyjsts--langPrefer focused fetches when possible:
bash
chub get <id> --file <reference-file>Use only when full package context is required.
--full4) Implement from fetched docs only
Write code and explanations from fetched docs.
Do not guess method names, payload fields, endpoint paths, or auth headers.
When uncertain, fetch again instead of inferring.
5) Capture durable learnings
If you discover a real gap (gotcha, workaround, version quirk), store it:
bash
chub annotate <id> "<concise actionable note>"Keep notes short, concrete, and non-duplicative.
6) Submit doc feedback only with user approval
Ask the user before sending feedback.
bash
chub feedback <id> up
chub feedback <id> down --label outdatedCommon labels:
, , , , , , , , , .
outdatedinaccurateincompletewrong-exampleswrong-versionpoorly-structuredaccuratewell-structuredhelpfulgood-examplesQuick commands
bash
chub search "stripe"
chub get stripe/api --lang js
chub annotate stripe/api "Webhook verification requires raw body"
chub annotate --listExpected Output
After a successful doc fetch, the skill provides:
- Confirmation of which doc ID was fetched, e.g.:
Fetched: stripe/api (Python) — 42 KB, last updated 2025-03-14 - Implementation — code written strictly from the fetched docs, with no guessed fields or method names
- Annotation (when a new gotcha is discovered):
Annotated stripe/api: "Webhook verification requires raw request body, not parsed JSON"
If is unavailable and installation is blocked, the skill falls back to the official docs URL and states this explicitly.
chubEdge Cases
| Scenario | Handling |
|---|---|
| Inform user; fetch docs directly from the official library website via |
| Retry with broader keywords; if still empty, use official docs URL directly |
| Fetched docs are clearly outdated | Annotate the issue; cross-reference with official changelog before coding |
| Multiple language variants available | Ask the user which language to fetch if not determinable from project context |
| Log the failure; continue with implementation; do not block on annotation errors |
| Skip update, use cached docs, and note that docs may not be the latest version |
Step Completion Reports
After completing each major step, output a status report in this format:
◆ [Step Name] ([step N of M] — [context])
··································································
[Check 1]: √ pass
[Check 2]: √ pass (note if relevant)
[Check 3]: × fail — [reason]
[Check 4]: √ pass
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIALAdapt the check names to match what the step actually validates. Use for pass, for fail, and to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.
√×—Skill-specific checks per phase
Phase: Tool Readiness — checks: ,
chub availabilitychub updatedPhase: Documentation Fetch — checks: ,
Doc identificationDoc fetch successPhase: Implementation — checks: ,
Implementation accuracyNo guessed fieldsPhase: Learning Capture — checks: ,
Annotation savedNote non-duplicative