Context Hub for OpenClaw
by @victorlin-houzz
Use Context Hub (chub) to fetch versioned API docs/skills before coding, then persist learnings with annotations.
clawhub install context-hub-openclawπ About This Skill
name: context-hub-openclaw description: Use Context Hub (chub) to fetch versioned API docs/skills before coding, then persist learnings with annotations. homepage: https://github.com/andrewyng/context-hub metadata: {"clawdbot":{"emoji":"π§ ","requires":{"bins":["chub"]},"install":[{"id":"node","kind":"node","package":"@aisuite/chub","bins":["chub"],"label":"Install Context Hub CLI (npm)"}]}}
Context Hub for OpenClaw
Use this skill whenever implementation depends on third-party APIs/SDKs or fast-changing tools.
When to use
Trigger this skill when the user asks to:
Do not rely only on memorized API shapes. Fetch current docs first.
OpenClaw trigger heuristics (explicit)
Use this decision rule before coding:
openai, anthropic, stripe, supabase, etc.)
- Task includes auth, webhooks, function calling, streaming, uploads, pagination, or retries
- User asks for production-ready integration code/tests400 invalid param, schema mismatch, deprecated endpoint)
- Add features across multiple languages/runtimes where SDK behavior may differFast OpenClaw checklist
If 2+ of these are true, run chub first:
1. External API/SDK involved
2. Version-specific behavior likely
3. Endpoint/schema uncertainty exists
4. Failure cost is high (payments/auth/data integrity)
5. Existing code recently broke after dependency updates
Concrete trigger examples by provider
Stripe β trigger Context Hub first when:
Example:
chub search "stripe webhooks" --json
chub get stripe/api --lang js --json
OpenAI β trigger Context Hub first when:
Example:
chub search "openai chat responses function calling" --json
chub get openai/chat --lang js --json
Core workflow (doc-first coding)
1) Search candidates
chub search "" --json
2) Fetch the best match (pin language/version when available)
chub get --lang js --json
or
chub get --lang py --version --json
3) Pull only needed references to reduce token noise
chub get --file references/errors.md
or
chub get --full
4) Implement against fetched docs, not assumptions.
5) Persist new learnings (only non-obvious, high-value findings)
chub annotate ""
6) Optional quality feedback (ask user before sending)
chub feedback up
chub feedback down --label outdated --label wrong-examples
Annotation quality standard
Good annotation format:
Example:
chub annotate stripe/api "Webhook signature failed in Next.js route handlers; use raw request body before JSON parse. Verified on stripe-node 17.x."
Avoid annotations that just restate obvious doc text.
OpenClaw integration pattern
mkdir -p .context
chub get --lang js -o .context/.md
shared//context-notes.md ) and keep chub annotations concise.Useful commands
chub update
chub cache status
chub search "stripe webhooks"
chub get stripe/api --lang js
chub annotate --list --json
chub feedback --status
Safety + ops notes
--json for machine parsing in agent flows.--version) when package major versions differ.