Context Hub for OpenClaw
/install context-hub-openclaw
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:
- integrate with OpenAI/Anthropic/Stripe/etc.
- write SDK/API code where versions matter
- debug integration failures likely caused by doc drift
- create reusable internal implementation playbooks
Do not rely only on memorized API shapes. Fetch current docs first.
OpenClaw trigger heuristics (explicit)
Use this decision rule before coding:
-
HIGH confidence trigger (use Context Hub immediately):
- Request mentions an external API/SDK by name (
openai,anthropic,stripe,supabase, etc.) - Task includes auth, webhooks, function calling, streaming, uploads, pagination, or retries
- User asks for production-ready integration code/tests
- Request mentions an external API/SDK by name (
-
MEDIUM confidence trigger (use Context Hub unless local repo docs are clearly authoritative and current):
- Refactor/migrate API client code
- Fix runtime errors that look like contract drift (
400 invalid param, schema mismatch, deprecated endpoint) - Add features across multiple languages/runtimes where SDK behavior may differ
-
LOW confidence trigger (Context Hub optional):
- Pure business logic with no third-party integration
- Trivial formatting/renaming changes
- Internal-only modules with stable local docs
Fast OpenClaw checklist
If 2+ of these are true, run chub first:
- External API/SDK involved
- Version-specific behavior likely
- Endpoint/schema uncertainty exists
- Failure cost is high (payments/auth/data integrity)
- Existing code recently broke after dependency updates
Concrete trigger examples by provider
Stripe — trigger Context Hub first when:
- Implementing or fixing webhook signature verification
- Creating subscription/payment-intent flows with idempotency requirements
- Handling API version mismatch errors or changed field semantics
Example:
chub search "stripe webhooks" --json
chub get stripe/api --lang js --json
OpenAI — trigger Context Hub first when:
- Implementing chat/responses APIs with tool/function calling
- Streaming responses or migrating from older endpoints/SDK patterns
- Debugging model parameter mismatches, structured output schemas, or file/tool workflows
Example:
chub search "openai chat responses function calling" --json
chub get openai/chat --lang js --json
Core workflow (doc-first coding)
- Search candidates
chub search "\x3Cvendor api or sdk>" --json
- Fetch the best match (pin language/version when available)
chub get \x3Cid> --lang js --json
# or
chub get \x3Cid> --lang py --version \x3Csdk-version> --json
- Pull only needed references to reduce token noise
chub get \x3Cid> --file references/errors.md
# or
chub get \x3Cid> --full
-
Implement against fetched docs, not assumptions.
-
Persist new learnings (only non-obvious, high-value findings)
chub annotate \x3Cid> "\x3Cgotcha + fix + context>"
- Optional quality feedback (ask user before sending)
chub feedback \x3Cid> up
chub feedback \x3Cid> down --label outdated --label wrong-examples
Annotation quality standard
Good annotation format:
- Symptom: what broke
- Cause: why docs/code failed in practice
- Fix: exact change that worked
- Scope: version/environment constraints
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
- Treat Context Hub as first source for coding accuracy.
- Save references to project files when useful:
mkdir -p .context
chub get \x3Cid> --lang js -o .context/\x3Cid>.md
- For repeated workflows, maintain a compact project playbook (e.g.,
shared/\x3Cproject>/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
- Prefer
--jsonfor machine parsing in agent flows. - Keep annotation volume low and signal high.
- If docs conflict with runtime behavior, annotate locally and continue with verified behavior.
- Use version targeting (
--version) when package major versions differ.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install context-hub-openclaw - 安装完成后,直接呼叫该 Skill 的名称或使用
/context-hub-openclaw触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Context Hub for OpenClaw 是什么?
Use Context Hub (chub) to fetch versioned API docs/skills before coding, then persist learnings with annotations. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 215 次。
如何安装 Context Hub for OpenClaw?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-hub-openclaw」即可一键安装,无需额外配置。
Context Hub for OpenClaw 是免费的吗?
是的,Context Hub for OpenClaw 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Context Hub for OpenClaw 支持哪些平台?
Context Hub for OpenClaw 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Context Hub for OpenClaw?
由 swissashley(@victorlin-houzz)开发并维护,当前版本 v0.1.1。