Overview
This skill can automatically extract GitHub repository references from various content sources and star them on your GitHub account.
Supported trigger methods:
- "Analyze this article and star the projects in it"
- "Find GitHub projects in this screenshot and star them"
- "Star all GitHub projects mentioned in [content]"
- Set up automated scheduled tasks
Dependencies
System dependencies
| Dependencies | Installation method |
|---|---|
| GitHub CLI (gh) | macOS: brew install ghLinux: sudo apt install gh |
Environment variables
| Variable | Description | Configuration method |
|---|---|---|
GITHUB_TOKEN |
GitHub Personal Access Token (optional, logging in with gh CLI is recommended) | Copy config/.env.example to config/.env and fill in the actual values |
Prerequisites
GitHub authentication must be configured before using this skill. For configuration steps, see github-config.md。
Workflow
Step 1: Content extraction and context analysis
Extract content and context information from the provided source:
Text/URL:
- Use WebFetch to retrieve the article content
- Parse GitHub URLs (github.com/owner/repo)
- Identify project names, library names, and tool names
- Extract context: article topic, technical domain, feature description
Screenshots/Images:
- Use the image analysis MCP (provided by the user)
- Extract text and identify project references
- Analyze the image context:
- Identify the technical domain (e.g., databases, AI Agents, frontend frameworks, DevOps, etc.)
- Extract feature descriptions and characteristic keywords
- Understand the project's use case scenarios
- Identify the relevant tech stack
Step 2: Repository discovery and intelligent matching
For each identified project, perform intelligent matching based on context:
-
Direct match: a complete GitHub URL found in the content, use it directly
-
Search by name(when only the project name is available):
gh search repos "项目名" --limit 10 -
Context relevance verification(key step):
When multiple projects with the same or similar names exist, matching must be based on context:
-
Domain match: check whether the repository's topics and description are consistent with the technical domain in the content
- Example: if the content mentions "AI Agent", prioritize repositories whose topics include
ai、agent、llmExample: if the content mentions "AI Agent", prioritize repositories whose topics include ai, agent, llm - Example: if the content mentions "database tools", prioritize repositories whose topics include
database、sqlExample: if the content mentions "database tools", prioritize repositories whose topics include database, sql
- Example: if the content mentions "AI Agent", prioritize repositories whose topics include
-
Feature keyword match: compare the repository description with the feature description in the content
- Extract feature keywords from the content
- Match them against the repository's description and README
-
Tech stack match: Check the repository's primary language and tech stack
- Language information:
gh repo view owner/repo --json primaryLanguage - Dependency analysis: check package.json, requirements.txt, etc.
- Language information:
-
Popularity and activity reference(as auxiliary):
- Star count, last update time, Fork count
-
-
Matching decision:
- High-confidence match: star directly
- Medium confidence: show the candidate list to the user and request confirmation
- Low confidence: skip and record, mark "needs manual confirmation" in the report
Step 3: Check whether already starred
Before starring, verify whether the repository has already been starred:
gh api user/starred/owner/repo 2>/dev/null && echo "已 star" || echo "未 star"
Step 4: Star the repository
Perform the star operation:
gh repo star owner/repo
Step 5: Generate report
Create a star report, including:
- List of newly starred repositories
- Already starred repositories (skipped)
- Repositories needing manual confirmation (multiple candidates or insufficient confidence)
- Repositories not found/failed
Output format
Provide a summary report:
## Star 报告
### 新 Star (3)
- [owner/repo](url) - 描述(匹配依据:领域/功能/技术栈)
### 已 Star (2)
- owner/repo
### 需人工确认 (1)
- 项目名
- 候选 1: [owner1/repo](url) - 描述 ⭐ 推荐(匹配度:高)
- 候选 2: [owner2/repo](url) - 描述
- 上下文提示:内容提到 AI Agent 开发,推荐选择候选 1
### 未找到 (1)
- 项目名(在 GitHub 上找不到匹配项)
Scheduled task configuration
Implement automated execution via hooks, configured in settings.json:
{
"hooks": {
"Prompt": [
{
"matcher": "star",
"hooks": ["auto-star"]
}
]
}
}
Users can configure custom scheduled task sources:
- RSS feed URL
- Blog URLs to monitor
- Execution frequency (e.g., every 2 hours)
Reference materials
- GitHub configuration guide - Token setup instructions
Notes
- GitHub API limits: about 60 requests/hour unauthenticated, 5000 requests/hour after authenticating via gh
- Consider adding delays between star operations
- Always verify repository relevance before starring