🔍 GitHub Intelligence
Analyze any GitHub repository in AI-friendly format. Convert repos to markdown, generate architecture diagrams, understand structure and patterns.
Features
- - Analyze repo structure — file tree, README, language breakdown, recent activity
- Generate architecture diagrams — Mermaid flowcharts from codebase structure
- Convert repo to markdown — entire repository as a single AI-readable document
- Inspect language breakdown — percentage by language with file counts
- Track recent activity — latest commits, contributors, release history
- GitHub URL tricks — hidden features, API shortcuts, search operators
- Control analysis depth — configurable directory traversal depth
- Limit file count — cap files for large repos
- Read-only guarantee — never executes code from repositories
- Public API access — no token needed (optional token for higher rate limits)
Requirements
| Variable | Required | Description |
|---|
| INLINECODE0 | ❌ | Optional — increases rate limit from 60 to 5000 req/hr. Get from GitHub Settings |
Quick Start
CODEBLOCK0
Commands
Repo Analyzer
CODEBLOCK1
Repo to Markdown
CODEBLOCK2
Output Format (Analyzer)
CODEBLOCK3
References
| File | Description |
|---|
| INLINECODE1 | URL hacks, API shortcuts, search operators |
Script Reference
| Script | Description |
|---|
| INLINECODE2 | Full repository analysis with diagrams |
| INLINECODE3 |
Convert repo to single markdown document |
⚠️ Security
This tool is READ-ONLY. It NEVER:
- - Executes code from repositories
- Runs scripts, makefiles, or build commands
- Evaluates any content from repos
- Writes to any repository
All analysis is static file reading only.
Data Policy
This skill fetches public data from GitHub's API. No data is stored locally beyond the analysis output.
Built by
M. Abidi
LinkedIn · YouTube · GitHub · Book a Call
🔍 GitHub 智能分析
以AI友好格式分析任意GitHub仓库。将仓库转换为Markdown,生成架构图,理解结构与模式。
功能特性
- - 分析仓库结构 — 文件树、README、语言分布、近期活动
- 生成架构图 — 基于代码库结构的Mermaid流程图
- 仓库转Markdown — 将整个仓库转换为单一AI可读文档
- 检查语言分布 — 按语言统计百分比及文件数量
- 追踪近期活动 — 最新提交、贡献者、发布历史
- GitHub URL技巧 — 隐藏功能、API快捷方式、搜索运算符
- 控制分析深度 — 可配置的目录遍历深度
- 限制文件数量 — 为大仓库设置文件上限
- 只读保障 — 绝不执行仓库中的代码
- 公共API访问 — 无需令牌(可选令牌获取更高速率限制)
环境要求
| 变量 | 必需 | 说明 |
|---|
| GITHUBTOKEN | ❌ | 可选 — 将速率限制从60次/小时提升至5000次/小时。从GitHub设置获取 |
快速开始
bash
PY=~/.openclaw/workspace/.venv/bin/python3
分析仓库
$PY skills/github-intel/scripts/repo_analyzer.py https://github.com/anthropics/claude-code
将仓库转换为单一Markdown文件
$PY skills/github-intel/scripts/repo
tomarkdown.py https://github.com/openai/openai-python
深度分析
$PY skills/github-intel/scripts/repo_analyzer.py https://github.com/user/repo --depth 3
命令
仓库分析器
bash
基础分析
$PY scripts/repo_analyzer.py https://github.com/owner/repo
深度目录遍历
$PY scripts/repo_analyzer.py https://github.com/owner/repo --depth 3
使用身份验证获取更高速率限制
GITHUB
TOKEN=ghpxxx $PY scripts/repo_analyzer.py https://github.com/owner/repo
仓库转Markdown
bash
转换完整仓库
$PY scripts/repo
tomarkdown.py https://github.com/owner/repo
为大仓库限制文件数量
$PY scripts/repo
tomarkdown.py https://github.com/owner/repo --max-files 50
输出到文件
$PY scripts/repo
tomarkdown.py https://github.com/owner/repo > repo.md
输出格式(分析器)
仓库: owner/repo
结构
├── src/
│ ├── index.ts
│ └── ...
├── README.md
└── package.json
README
[完整README内容]
语言分布
- - TypeScript: 78.2%
- JavaScript: 15.1%
- Shell: 6.7%
架构(Mermaid)
graph TD
A[CLI入口] --> B[命令解析器]
...
近期活动
- - 2天前: feat: 添加流式支持
- 5天前: fix: 处理超时错误
参考资料
| 文件 | 说明 |
|---|
| references/github-tricks.md | URL技巧、API快捷方式、搜索运算符 |
脚本参考
| 脚本 | 说明 |
|---|
| {baseDir}/scripts/repoanalyzer.py | 带图表的完整仓库分析 |
| {baseDir}/scripts/repoto_markdown.py |
将仓库转换为单一Markdown文档 |
⚠️ 安全说明
此工具为只读工具。它绝不:
- - 执行仓库中的代码
- 运行脚本、Makefile或构建命令
- 评估仓库中的任何内容
- 向任何仓库写入数据
所有分析仅基于静态文件读取。
数据政策
本技能从GitHub API获取公共数据。除分析输出外,不会在本地存储任何数据。
由
M. Abidi 构建
LinkedIn · YouTube · GitHub · 预约通话