据 AlphaMoat 统计,截至 2026-09,GitHub Knowledge Base 累计下载 4,025 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 2,538 位,在「开发编程」分类(577 个)中排名第 333 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 123 | 3,693 | 2 | - |
| SkillHub ↗ | 122 | 4,025 | 3 | — |
各平台的计数口径不同,统计时间不一致。
主文要求先配置 GITHUB_KB_PATH,可选通过 GITHUB_TOKEN 访问私有仓库;克隆项目后可更新本地 GITHUB_KB.md 目录。令牌可能拥有较广仓库权限,本地知识库也可能累积私有或不可信仓库,因此应使用最小权限凭证、限定存储路径并审查持久化内容。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 4,025 | — | 3 |
| 2026-08 | 3,642 | +4.4% | 3 |
| 2026-07 | 3,488 | +6.6% | 3 |
| 2026-06 | 3,273 | +4.7% | 3 |
| 2026-05 | 3,125 | — | 2 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- 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. --- # GitHub Knowledge Base 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. ## Configuration
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:
```bash
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.
## GitHub CLI (gh)
**Requirement:** GitHub CLI must be installed and authenticated.
**Installation:**
- **macOS:** `brew install gh`
- **Linux:** `apt install gh` or see [official install guide](https://github.com/cli/cli/blob/trunk/docs/install_linux.md)
- **Windows:** `winget install GitHub.cli`
**Authentication:**
```bash
# 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.
### Searching Repos
```bash
# 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:<lang>` - Filter by programming language
- `stars:<n>` or `stars:><n>` - Filter by star count
- `topic:<name>` - Filter by topic
- `user:<owner>` - Search within a user's repos
- `org:<org>` - Search within an organization
### Searching Issues
```bash
gh 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:<owner/repo>` - Search in specific repository
- `state:open|closed` - Filter by issue state
- `author:<username>` - Filter by author
- `label:<name>` - Filter by label
- `language:<lang>` - Filter by repo language
- `comments:<n>` or `comments:><n>` - Filter by comment count
### Searching Pull Requests
```bash
# 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:<owner/repo>` - Search in specific repository
- `state:open|closed|merged` - Filter by PR state
- `author:<username>` - Filter by author
- `label:<name>` - Filter by label
- `language:<lang>` - Filter by repo language
- `is:merged|unmerged` - Filter by merge status
### Viewing PR/Issue Details
```bash
# 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
```
## Local Knowledge Base Workflow
### Querying About a Repo in KB
1. Read GITHUB_KB.md to understand what projects exist
2. Locate the project directory under ${GITHUB_KB_PATH:-/home/node/clawd/github-kb}/
### Cloning a New Repo to KB
1. Search GitHub if the full repo name is not known
2. Clone to KB directory:
```bash
git clone https://github.com/<owner>/<name>.git ${GITHUB_KB_PATH:-/home/node/clawd/github-kb}/<name>
```
3. Generate project description: Read README or key files to understand the project
4. Update GITHUB_KB.md: Add entry for the new repo following the existing format:
```markdown
### [<name>](/<name>)
Brief one-line description of what the project does. Additional context if useful (key features, tech stack, etc.).
```
5. Confirm completion: Tell user the repo was cloned and where to find it
### Default Clone Location
If user says "clone X" without specifying a directory, default to ${GITHUB_KB_PATH:-/home/node/clawd/github-kb}/.
## GITHUB_KB.md Format
The catalog file follows this structure:
```markdown
# 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.
用 gh 命令行工具查看 GitHub 上的 PR 检查、工作流运行与 API 查询的技能。
聚合 16 个搜索引擎、无需 API Key 的检索技能。
用命令行直接列出、配置、授权并调用 MCP 服务与工具。
根据文字描述生成 Mermaid 图表代码。
用受管 OAuth 访问 YouTube Data API,检索视频并管理频道内容。
通过受管的 OAuth 连接访问 GitHub REST API。
覆盖规划、实现、验证与测试的编码工作流技能。
整理 Docker 常用命令与容器工作流的技能。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。