npx skills add zhangyanxs/repo2skillREADME
🤖 repo2skill - Repository to Skill Converter
⚡ Convert any open-source repository into a comprehensive OpenCode/Claude Code Skill with one command
You found an amazing open-source project and want AI to help you understand and work with it, but faced these problems: Too much code for AI to read? Complicated configuration AI can't handle? Manual copy-paste exhausting?
repo2skill is here to solve these problems! It's like a "skill converter" that can transform any GitHub/GitLab/Gitee repository into a comprehensive skill package that AI assistants (OpenCode/Claude Code) can directly understand and use. You don't need to manually download code, configure complex environments, or provide API keys. Just provide a link, and it handles everything!
✨ Key Features
🎯 What It Does
- 🤖 AI-Powered Analysis: Uses your configured LLM in OpenCode/Claude Code to analyze repositories intelligently
- 🌐 Multi-Platform Support: Supports GitHub, GitLab, and Gitee - one tool for all
- ⚡ Intelligent Mirror Rotation: Built-in 10+ GitHub mirrors with automatic failover and rate limit handling
- 📦 Zero Dependencies: No npm install, no API keys, no external packages - works out of the box
- 🔄 Batch Conversion: Convert multiple repositories simultaneously with parallel processing
- 📖 Complete Documentation: Generates comprehensive 18+ section skills covering installation, usage, API, FAQ, and more
- 🛡️ Smart Retry Logic: Exponential backoff (1s, 2s, 4s, 8s) with automatic mirror switching
- ✅ Ready to Use: Generated skills work immediately in OpenCode and Claude Code
⚡ Quick Start
Installation (30 seconds)
Simply copy the skill to your skills directory:
# Option 1: Global (recommended for all projects)
mkdir -p ~/.config/opencode/skills
cp -r repo2skill ~/.config/opencode/skills/
# Option 2: Claude-compatible
mkdir -p ~/.claude/skills
cp -r repo2skill ~/.claude/skills/
# Option 3: Project-specific
mkdir -p your-project/.opencode/skills
cp -r repo2skill your-project/.opencode/skills/
That's it! No npm install, no API keys needed. 🎉
Usage (One Command)
Start OpenCode or Claude Code and say:
帮我把这个仓库转成技能:https://github.com/vercel/next.js
The skill will automatically:
- ✅ Parse repository URL and detect platform
- 🔍 Fetch data from multiple mirror endpoints
- 📖 Use your configured LLM to analyze the repository
- 📝 Generate a complete SKILL.md with 18+ sections
- 💾 Ask you where to save the generated skill
🌐 Supported Platforms
GitHub ✅
Supported URLs:
https://github.com/owner/repohttps://www.github.com/owner/repogithub.com/owner/repo(short form)
Features:
- 8 API mirrors with automatic rotation
- 5 Raw content mirrors
- 60 requests/hour without token, 5000/hour with token
- Comprehensive analysis of projects
Example:
帮我把这个 GitHub 仓库转成技能:https://github.com/anthropics/anthropic-sdk-typescript
GitLab ✅
Supported URLs:
https://gitlab.com/owner/repohttps://www.gitlab.com/owner/repogitlab.com/owner/repo
Features:
- Official API + proxy support
- URL-encoded project paths
- ~60 requests/minute unauthenticated
- Full repository structure analysis
Example:
帮我把这个 GitLab 仓库转成技能:https://gitlab.com/gitlab-org/gitlab
Gitee ✅
Supported URLs:
https://gitee.com/owner/repohttps://www.gitee.com/owner/repogitee.com/owner/repo
Features:
- Native Chinese platform - fast access in China
- No mirror rotation needed (native speed)
- API v5 support
- ~5000 requests/hour authenticated, ~100/hour unauthenticated
Example:
帮我把这个 Gitee 仓库转成技能:https://gitee.com/mindspore/docs
🛠️ How It Works
Architecture Overview
Repository URL
↓
1. Parse Platform (GitHub/GitLab/Gitee)
↓
2. Mirror Rotation API Calls
- Metadata (stars, forks, language)
- README content
- File tree structure
- Key documentation files
↓
3. AI Analysis (Your Configured LLM)
- Project overview and features
- Installation guides
- Usage examples
- API reference
- Troubleshooting
↓
4. Generate SKILL.md
- YAML frontmatter
- 18+ comprehensive sections
- Real-world examples
↓
5. Sav
...