Claude-skill-registry code-explorer
Search and analyze code repositories on GitHub and Hugging Face (Models, Datasets, Spaces). This skill should be used when exploring open-source projects, finding implementation references, discovering ML models/datasets, or analyzing how others have solved similar problems.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/code-explorer" ~/.claude/skills/majiayu000-claude-skill-registry-code-explorer && rm -rf "$T"
skills/development/code-explorer/SKILL.mdCode Explorer
Overview
To search and analyze code repositories across GitHub and Hugging Face platforms, use this skill. It enables discovering implementation patterns, finding relevant ML models/datasets, and exploring demo applications (Spaces) for learning and reference.
Supported Platforms
| Platform | Search Targets | Tool |
|---|---|---|
| GitHub | Repositories, Code | CLI |
| Hugging Face | Models, Datasets, Spaces | CLI + API |
검색 품질 원칙 (필수)
1. 현재 날짜 확인
date +%Y-%m-%d
아래 예시의 연도는 참고용. 실제 검색 시 현재 연도 사용.
2. Long-tail Keywords 적용
예시의 Short-tail을 그대로 쓰지 말고 확장:
| 예시 (참고용) | 실제 검색 (Long-tail) |
|---|---|
| |
| |
| |
3. Multi-Query 적용
한 번에 찾기 어려우면 2-3개 관점으로 검색:
# 모델명 중심 gh search repos "qwen2-vl" --sort stars # 기능 중심 gh search repos "vision language open vocabulary detection" --sort stars # 구현 중심 gh search repos "vl model gradio demo inference" --sort stars
4. 필터 활용
# 최신 + 품질 필터 (현재 연도 적용) gh search repos "keyword" stars:>50 pushed:>{현재연도-1}-01-01 --language python
5. 검색 전 체크리스트
- 현재 날짜 확인했는가?
- Short-tail을 Long-tail로 변환했는가?
- 필요시 2-3개 변형 쿼리로 검색했는가?
- 적절한 필터(언어, 스타, 날짜) 적용했는가?
Workflow Decision Tree
User wants to explore code/resources | +-- Looking for code implementations? | +-- Use GitHub search | +-- scripts/search_github.py (or gh CLI directly) | +-- Analyze repo structure, README, key files | +-- Looking for ML resources? +-- Use Hugging Face search +-- scripts/search_huggingface.py (search via API) +-- uvx hf download (download files)
Scripts
Always run scripts with
first to see usage. These scripts handle common search workflows reliably.--help
Available Scripts
- GitHub repository search using gh CLIscripts/search_github.py
- Hugging Face search (models, datasets, spaces)scripts/search_huggingface.py
Quick Examples
# GitHub search python scripts/search_github.py "object detection" --limit 10 --help # Hugging Face search python scripts/search_huggingface.py "qwen vl" --type models --help
GitHub Search
Using gh CLI Directly
# Search repositories by keyword gh search repos "open vocabulary detection" --sort stars --limit 10 # Filter by language gh search repos "gradio app" --language python --limit 5 # View repository details gh repo view owner/repo # Search code within repositories gh search code "Qwen2VL" --extension py
Repository Analysis
To analyze a found repository:
- Review README.md for usage instructions
- Identify main entry points (app.py, main.py, inference.py)
- Check dependencies (requirements.txt, pyproject.toml)
- Study implementation patterns in source files
Hugging Face Search
Search (via script or Python API)
# Search models python scripts/search_huggingface.py "object detection" --type models --limit 10 # Search datasets python scripts/search_huggingface.py "coco" --type datasets --limit 5 # Search spaces (demos) python scripts/search_huggingface.py "gradio demo" --type spaces --limit 10 # Search all types python scripts/search_huggingface.py "qwen vl" --type all
Download (via uvx hf)
# Download space source code (use /tmp/ for temporary analysis) uvx hf download <space_id> --repo-type space --include "*.py" --local-dir /tmp/<space_name> # Download model files uvx hf download <repo_id> --include "*.json" --local-dir /tmp/<model_name> # Download to project directory (when needed permanently) uvx hf download <repo_id> --local-dir ./my-model
Note: Always use
--local-dir /tmp/ for temporary code analysis to avoid cluttering the project.
Common Search Patterns
# Find models for specific task python scripts/search_huggingface.py "open vocabulary detection" --type models python scripts/search_huggingface.py "qwen2 vl" --type models python scripts/search_huggingface.py "grounding dino" --type models # Find demo applications python scripts/search_huggingface.py "object detection demo" --type spaces python scripts/search_huggingface.py "gradio image" --type spaces
Analyzing a Space
To understand how a Space is implemented:
- Find the space:
python scripts/search_huggingface.py "keyword" --type spaces - Download source:
uvx hf download <space_id> --repo-type space --include "*.py" --include "requirements.txt" --local-dir /tmp/<space_name> - Or view online:
https://huggingface.co/spaces/{space_id}/tree/main - Focus on
for main logicapp.py - Check
for dependenciesrequirements.txt
Example Use Cases
Find Qwen3-VL Open Vocab Detection Code
# Search GitHub gh search repos "qwen vl object detection" --sort stars gh search code "Qwen2VL" --extension py # Search Hugging Face python scripts/search_huggingface.py "qwen2-vl" --type models python scripts/search_huggingface.py "qwen vl" --type spaces
Find Gradio Demo Patterns
# Search spaces using Gradio python scripts/search_huggingface.py "gradio object detection" --type spaces # Download a space to study uvx hf download username/space-name --repo-type space --include "*.py" --local-dir /tmp/space-name
Find Pre-trained Detection Models
python scripts/search_huggingface.py "object-detection" --type models --limit 20 python scripts/search_huggingface.py "grounding-dino" --type models python scripts/search_huggingface.py "yolo-world" --type models
Resources
scripts/
- GitHub repository search wrappersearch_github.py
- Hugging Face Hub search wrappersearch_huggingface.py
references/
- GitHub CLI detailed referencegithub_api.md
- Hugging Face Hub API and CLI referencehuggingface_api.md
Tips
- Start broad, then narrow: Begin with general keywords, then add filters
- Check stars/likes: Higher counts often indicate quality
- Review recent activity: Recently updated repos are better maintained
- Use --help first: Scripts have detailed usage information
- Download selectively: Use
to download only needed filesuvx hf download --include - Always cite sources: Include repository URLs, Space links, or model IDs you referenced