andrewyng /context-hub

★ 13,983⑂ 1,204
JavaScriptCreated 2025-10-30
13,983
stars
+-2+-1+10
1,204
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

Context Hub

Coding agents hallucinate APIs and forget what they learn in a session. Context Hub gives them curated, versioned docs, plus the ability to get smarter with every task. All content is open and maintained as markdown in this repo — you can inspect exactly what your agent reads, and contribute back. 





 Quick Start

bash
npm install -g @aisuite/chub
chub search openai                  find what's available
chub get openai/chat --lang py      fetch current docs (Python version) 


 How It Works

Chub is designed for your coding agent to use (not for you to use!). You can prompt your agent to use it (e.g., "Use the CLI command chub to get the latest API documentation for calling OpenAI. Run 'chub help' to understand how it works.") Or by creating an agent skill to use Chub using SKILL.md, and ideally prompting your agent to remember to use this skill. (If you are using Claude Code, create the directory ~/.claude/skills/get-api-docs and put SKILL.md there.) 

Most of the time, it's simple — search, fetch, use:

bash
chub search "stripe payments"         find relevant docs
chub get stripe/api --lang js         fetch the doc
 Agent reads the doc, writes correct code. Done.


When the agent discovers a gap, it can annotate locally for next time:

bash
chub annotate stripe/api "Needs raw body for webhook verification"

 Next session, chub get notes that an annotation exists. Pass --with-annotations
 to include it — annotations are treated as untrusted input by default.


Feedback flows back to authors — chub feedback stripe/api up or down — vote the docs up or down so they can get better for everyone over time.

 Content Types

Versioned, language-specific. "What to know."

bash
chub get openai/chat --lang py        Python variant
chub get openai/chat --lang js        JavaScript variant


More content types than API documentation (such as agent skills) are on the roadmap. 

 Commands

| Command | Purpose |
|---------|---------|
| chub search [query] | Search docs and skills (no query = list all) |
| chub get  [--lang py\|js] | Fetch docs or skills by ID |
| chub annotate   | Attach a note to a doc or skill |
| chub annotate  --clear | Remove annotations |
| chub annotate --list | List all annotations |
| chub feedback   | Upvote or downvote a doc (sent to maintainers) |

For the full list of commands, flags, and piping patterns, see the CLI Reference.

 Self-Improving Agents

Context Hub is designed for a loop where agents get better over time.

Annotations are local notes that agents attach to docs. They persist across sessions and can be included on future fetches with --with-annotations — so agents can learn from past experience while treating prior notes as untrusted input. See Feedback and Annotations.

Feedback (up/down ratings with optional labels) goes to doc authors, who update the content based on what's working and what isn't. The docs get better for everyone — not just your local annotations.


  Without Context Hub            

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON