Manage a local GitHub knowledge base and provide GitHub search capabilities via gh CLI. Use when users ask about repos, PRs, issues, request to clone GitHub repositories, explore codebases, or need information about GitHub projects. Supports searching GitHub via gh CLI and managing local KB with GITHUB_KB.md catalog. Configure via GITHUB_TOKEN and GITHUB_KB_PATH environment variables.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install github-kb或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install github-kb⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/github-kb/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: github-kb description: Manage a local GitHub knowledge base and provide GitHub search capabilities via gh CLI. Use when users ask about repos, PRs, issues, request to clone GitHub repositories, explore codebases, or need information about GitHub projects. Supports searching GitHub via gh CLI and managing local KB with GITHUB_KB.md catalog. Configure via GITHUB_TOKEN and GITHUB_KB_PATH environment variables. ---
Manage a local GitHub knowledge base and provide GitHub search capabilities via gh CLI. Key file: GITHUB_KB.md at the root of the KB directory catalogs all projects with brief descriptions.
Set environment variables before use:
GITHUB_TOKEN - GitHub Personal Access Token (optional, for private repos)GITHUB_KB_PATH - Path to local KB directory (default: /home/node/clawd/github-kb)Example:
export GITHUB_TOKEN="ghp_xxxx..."
export GITHUB_KB_PATH="/your/path/github-kb"
Token Privacy: Never hardcode tokens. Inject via environment variables or container secrets.
Requirement: GitHub CLI must be installed and authenticated.
Installation:
brew install ghapt install gh or see official install guidewinget install GitHub.cliAuthentication:
# Interactive login
gh auth login
# Or use token from GITHUB_TOKEN env var
gh auth login --with-token <(echo "$GITHUB_TOKEN")
Verify: gh auth status
If gh is not installed or not authenticated, skip search operations and use only local KB features.
# Search repos by keyword
gh search repos <query> [--limit <n>]
# Examples:
gh search repos "typescript cli" --limit 10
gh search repos "language:python stars:>1000" --limit 20
gh search repos "topic:mcp" --limit 15
Search qualifiers:
language: - Filter by programming languagestars: or stars:> - Filter by star counttopic: - Filter by topicuser: - Search within a user's reposorg: - Search within an organizationgh search issues "react hooks bug" --limit 20
gh search issues "repo:facebook/react state:open" --limit 30
gh search issues "language:typescript label:bug" --limit 15
Search qualifiers:
repo: - Search in specific repositorystate:open|closed - Filter by issue stateauthor: - Filter by authorlabel: - Filter by labellanguage: - Filter by repo languagecomments: or comments:> - Filter by comment count# Search PRs
gh search prs <query> [--limit <n>]
# Examples:
gh search prs "repo:vercel/next.js state:open" --limit 30
gh search prs "language:go is:merged" --limit 15
Search qualifiers:
repo: - Search in specific repositorystate:open|closed|merged - Filter by PR stateauthor: - Filter by authorlabel: - Filter by labellanguage: - Filter by repo languageis:merged|unmerged - Filter by merge status# View issue/PR details
gh issue view <number> --repo <owner/repo>
gh pr view <number> --repo <owner/repo>
# View with comments
gh issue view <number> --repo <owner/repo> --comments
gh pr view <number> --repo <owner/repo> --comments
```bash git clone https://github.com/
```markdown ###
If user says "clone X" without specifying a directory, default to ${GITHUB_KB_PATH:-/home/node/clawd/github-kb}/.
The catalog file follows this structure:
# GitHub Knowledge Base
This directory contains X GitHub projects covering various domains.
---
## Category Name
### [project-name](/project-name)
Brief description of the project.
Maintain categorization and consistent formatting when updating.
安装 GitHub Knowledge Base 后,可以对 AI 说这些话来触发它
Help me get started with GitHub Knowledge Base
Explains what GitHub Knowledge Base does, walks through the setup, and runs a quick demo based on your current project
Use GitHub Knowledge Base to manage a local GitHub knowledge base and provide GitHub search capa...
Invokes GitHub Knowledge Base with the right parameters and returns the result directly in the conversation
What can I do with GitHub Knowledge Base in my developer & devops workflow?
Lists the top use cases for GitHub Knowledge Base, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/github-kb/ 目录(个人级,所有项目可用),或 .claude/skills/github-kb/(项目级)。重启 AI 客户端后,用 /github-kb 主动调用,或让 AI 根据上下文自动发现并使用。
GitHub Knowledge Base 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
GitHub Knowledge Base 可免费安装使用。请查阅仓库了解许可证信息。
Manage a local GitHub knowledge base and provide GitHub search capabilities via gh CLI. Use when users ask about repos, PRs, issues, request to clone GitHub repositories, explore codebases, or need information about GitHub projects. Supports searching GitHub via gh CLI and managing local KB with GITHUB_KB.md catalog. Configure via GITHUB_TOKEN and GITHUB_KB_PATH environment variables.
Automate my developer & devops tasks using GitHub Knowledge Base
Identifies repetitive steps in your workflow and sets up GitHub Knowledge Base to handle them automatically
GitHub Knowledge Base 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。