AC

andrewyng/context-hub

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1.4万 stars 质量 67 趋势 36MIT

编码代理会幻觉API内容,忘记会话中学到的内容。Context Hub为他们提供精心策划的版本文档,并能让每个任务变得更聪明。

概览

编码代理会幻觉API,忘记会话中学到的内容。Context Hub为他们提供经过策划的版本化文档,并让它们在每项任务中变得更智能。所有内容都以markdown形式开放维护——你可以检查代理读取的内容,并贡献回来。 Chub 是为你的编码代理设计的(不是给你自己用的!)。你可以提示你的代理使用它(例如,“使用 CLI 命令 chub 获取调用 OpenAI 的最新 API 文档。运行'chub help'来理解它是如何工作的。”)或者创建一个代理技能来使用 Chub,SKILL.md,理想情况下提示你的代理记住使用这个技能。(如果你用的是 Claude Code,创建目录 ~/.claude/skills/get-api-docs,并 SKILL.md 在那里。) ,它可以在本地为下一次进行注释: —— chub 反馈条纹/API 上调或下调 —— 对文档进行赞成或反对投票,以便随着时间推移对所有人都更好。 版本化,语言特定。“需要知道的事。

概述(AI 翻译)

编码代理会幻觉API,忘记会话中学到的内容。Context Hub为他们提供经过策划的版本化文档,并让它们在每项任务中变得更智能。所有内容都以markdown形式开放维护——你可以检查代理读取的内容,并贡献回来。

快速启动

工作原理

Chub 是为你的编码代理设计的(不是给你自己用的!)。你可以提示你的代理使用它(例如,“使用 CLI 命令 chub 获取调用 OpenAI 的最新 API 文档。运行’chub help’来理解它是如何工作的。”)或者创建一个代理技能来使用 Chub,SKILL.md,理想情况下提示你的代理记住使用这个技能。(如果你用的是 Claude Code,创建目录 ~/.claude/skills/get-api-docs,并 SKILL.md 在那里。)

大多数时候,很简单——搜索、取物、使用:

当代理发现缺口时,可以为下一次在本地进行注释:

反馈会流回作者 — chub feedback stripe/api up 或 [down] ——投票支持或反对文档,以便随着时间推移让文档变得更好。

内容类型

版本化,语言特定。“需要知道什么。”

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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

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:

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:

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.”

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.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add andrewyng/context-hub
新手?先看 mcpskill.org 教程 →