一个从 GitHub 仓库生成 Skill 的 skill:搜索、分析、生成模板
装好之后怎么用
什么时候会用上它:Search GitHub repositories and generate Claude Skills from them. Use this skill when users want to create a new skill based on an existing GitHub repository, need to find high-quality libraries for skill development, or want to transform a GitHub project into a reusable Claude capability. Supports repository search, quality filtering, and skill template generation.
怎么用:在 AI 工具里直接描述任务即可自动触发。显式调用的写法各端不同:Claude Code / Cursor 等用 /github-to-skill,Codex 用 $github-to-skill,Kimi Code 用 /skill:github-to-skill,ZCODE 用 $github-to-skill,Gemini CLI 以自动激活为主。
一个从 GitHub 仓库生成 Claude Skill 的 skill。
它解决的是:想基于一个 GitHub 仓库创建一个 Skill,但不知道怎么搜、怎么分析、怎么生成模板。
它的工作流:
- Phase 1:仓库搜索与推荐:理解需求 → 搜索 GitHub → 展示 TOP 5-10 选项
- Phase 2:Skill 模板生成:分析仓库 → 审查生成结构 → 定制 Skill → 测试和打包
质量筛选标准:
- 6 个月内更新
- 100+ star
- 清晰 API
- 宽松许可证(MIT、Apache、BSD)
它还有:
- 具体脚本:search_github_repos.py、generate_skill_template.py
- 使用示例:用户知道要什么、用户需要引导、没找到合适仓库
- 最佳实践:搜索策略、仓库评估、Skill 设计原则
- 故障排查:没找到仓库、GitHub API 限流、生成的 skill 不工作
适合谁:
- 想基于 GitHub 仓库创建 Skill 的科研小组成员
- 需要快速找到高质量库并生成 Skill 模板的人
- 想学“仓库搜索 + 模板生成”流程的人
用法: 把 SKILL.md 内容复制到你的 AI 工具里,描述你的需求或指定仓库就行。
技能内容
SKILL.md版本与文件 ›GitHub to Skill Creator
Automatically discover GitHub repositories and convert them into Claude Skills.
Overview
Transforms any GitHub repository into a reusable Claude Skill by:
- Searching GitHub for high-quality, active repositories
- Analyzing repository structure and documentation
- Generating skill templates with proper structure
- Packaging ready-to-use skills
Workflow Decision Tree
User Request
↓
Does user have a specific repo in mind?
├─ YES → Generate skill template directly
│ (use generate_skill_template.py)
│
└─ NO → Search GitHub first
1. Ask clarifying questions
2. Run repository search
3. Present TOP 5-10 options
4. User selects repo
5. Generate skill templatePhase 1: Repository Search & Recommendation
Step 1: Understand Requirements
Ask the user:
- What functionality do you need?
- Any preferred programming language?
- Specific requirements (license, activity level)?
Step 2: Search GitHub
Use the search script with appropriate filters:
# Basic search
python3 scripts/search_github_repos.py "PDF processing"
# With language filter
python3 scripts/search_github_repos.py "image manipulation" --language python
# High quality, recently updated
python3 scripts/search_github_repos.py "REST API" --min-stars 500 --sort updated
# Save results for analysis
python3 scripts/search_github_repos.py "data processing" --output results.jsonStep 3: Present Results
Display results in a clear table format:
| # | Repository | Stars | Updated | Language | Description | Recommendation |
|---|---|---|---|---|---|---|
| 1 | owner/repo | 2500 | 2024-01 | Python | Brief desc | ⭐ High quality, active |
Quality Criteria
When recommending repositories, ensure:
- ✅ Active maintenance: Updated within 6 months
- ✅ Quality indicators: 100+ stars, good documentation
- ✅ Clear API: Well-defined interfaces and examples
- ✅ License: Permissive license (MIT, Apache, BSD)
Phase 2: Skill Template Generation
Step 1: Analyze Repository
After user selects a repository:
# Generate skill template
python3 scripts/generate_skill_template.py owner/repository
# Custom output directory
python3 scripts/generate_skill_template.py owner/repository --output ./skillsStep 2: Review Generated Structure
The generator creates:
skill-name/
├── SKILL.md # Ready to customize
├── scripts/
│ └── example.py # Starter code
└── references/ # For additional docsStep 3: Customize the Skill
Update SKILL.md:
- Edit frontmatter description (be specific about when to use)
- Replace [TODO] items with actual content
- Add clear usage examples
- Document configuration options
Implement Core Logic:
- Write wrapper scripts in
scripts/ - Handle errors gracefully
- Add logging and user feedback
Add References:
- API documentation
- Configuration examples
- Troubleshooting guides
Step 4: Test & Package
# Test the skill
# [Manual testing steps]
# Package the skill
cd ../skill-creator
python3 scripts/package_skill.py ../skill-nameUsage Examples
Example 1: User Knows What They Want
User: "Create a skill from pdfplumber repository"
Action:
python3 scripts/generate_skill_template.py jsvine/pdfplumberExample 2: User Needs Guidance
User: "I want to add PDF processing capabilities"
Action:
- Ask: "What type of PDF processing? (extraction, manipulation, form filling)"
- Search:
python3 scripts/search_github_repos.py "PDF extraction" --language python - Present TOP 5 options with pros/cons
- Guide selection and generate template
Example 3: No Suitable Repository Found
User: "I need quantum computing simulation"
Action:
- Search reveals limited/old repositories
- Suggest alternatives:
- Combine multiple smaller libraries
- Create from scratch with skill-creator
- Use web APIs instead
Best Practices
Search Strategy
- Start broad: Use general terms ("PDF processing")
- Narrow down: Add filters (--language, --min-stars)
- Try variations: "PDF extract", "PDF parse", "document processing"
Repository Evaluation
Check these before recommending:
- Last commit: Within 6 months
- Issues ratio: Low open/closed ratio indicates good maintenance
- Documentation: README, examples, API docs
- License: Prefer MIT/Apache for permissive use
Skill Design Principles
- Keep it focused: One primary purpose per skill
- Minimal dependencies: Prefer widely-used libraries
- Clear error messages: Help users troubleshoot
- Test thoroughly: Verify before packaging
Troubleshooting
No repositories found
- Broaden search terms
- Reduce minimum stars threshold
- Try different programming languages
GitHub API rate limit
- Create GitHub token: https://github.com/settings/tokens
- Set
GITHUB_TOKENenvironment variable - Or use
--tokenparameter
Generated skill doesn't work
- Verify repository has clear API/usage patterns
- Check dependencies are installable
- Review error messages in scripts
Dependencies
pip install requestsOptional (for GitHub API rate limits):
- GitHub personal access token
Related Skills
- skill-creator: Create skills from scratch
- pdf-to-ppt: Example of a generated skill
Resources
- GitHub Search: https://github.com/search
- GitHub API Docs: https://docs.github.com/en/rest
- Skill Creation Guide: Available in skill-creator references/
评论 0
更多
登录后可点赞、收藏、评论和举报。
还没有评论,先发起一个具体问题。