← 返回
数据分析 Key 中文

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.
管理本地 GitHub 知识库,提供 gh CLI 搜索功能。用户询问仓库、PR、Issue、克隆、代码库或项目信息时使用。支持 gh CLI 搜索并通过 GITHUB_KB.md 管理本地 KB。配置依赖 GITHUB_TOKEN 和 GITHUB_KB_PATH 环境变量。
jameschan21
数据分析 clawhub v1.0.1 1 版本 99844.2 Key: 需要
★ 2
Stars
📥 3,164
下载
💾 17
安装
1
版本
#latest

概述

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:

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:

Authentication:

# 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

# 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 language
  • stars: or stars:> - Filter by star count
  • topic: - Filter by topic
  • user: - Search within a user's repos
  • org: - Search within an organization

Searching Issues

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: - Search in specific repository
  • state:open|closed - Filter by issue state
  • author: - Filter by author
  • label: - Filter by label
  • language: - Filter by repo language
  • comments: or comments:> - Filter by comment count

Searching Pull Requests

# 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 repository
  • state:open|closed|merged - Filter by PR state
  • author: - Filter by author
  • label: - Filter by label
  • language: - Filter by repo language
  • is:merged|unmerged - Filter by merge status

Viewing PR/Issue Details

# 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//.git ${GITHUB_KB_PATH:-/home/node/clawd/github-kb}/

```

  1. Generate project description: Read README or key files to understand the project
  2. Update GITHUB_KB.md: Add entry for the new repo following the existing format:

```markdown

###

Brief one-line description of what the project does. Additional context if useful (key features, tech stack, etc.).

```

  1. 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:

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

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 12:53 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,978
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,127
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,480