GitHub Stars Organizer
Use AI reasoning to categorize starred repos into GitHub Lists. The agent examines each repo's name, description, and topics to understand what it IS, then assigns the best-fit category.
CRITICAL: Never use regex rules as primary classifier. The agent MUST reason about each repo individually. Regex is only acceptable as a fast first-pass bulk pre-sort if the user has 500+ repos and doesn't want to wait.
Prerequisites
Verify gh auth status. If user scope missing: gh auth refresh -h github.com -s user
Core Principle: Agent Reasoning Per Repo
For every repo, the agent reads nameWithOwner, description, language, and topics, then asks itself: "What is this project?" — not "what keywords match?"
- A repo named
anthropics/claude-code with desc "agentic coding tool" → 🤖 AI-Agents
- A repo named
fatedier/frp with desc "reverse proxy to expose local server" → 🏠 Self-Hosted
- A repo named
harry0703/MoneyPrinterTurbo with desc "一键生成短视频" → ⚡ Automation
- A repo named
torvalds/linux → 🔧 Dev-Tools (infrastructure, not a library)
Workflow
1. Discovery
Pull existing lists:
query { viewer { lists(first: 30) { nodes { id name } } } }
2. Fetch repos (small batches: 30-50 per batch)
GraphQL pull (from starred list or a specific list):
query {
viewer {
starredRepositories(first: 50, orderBy: {field: STARRED_AT, direction: DESC}, after: null) {
pageInfo { hasNextPage endCursor }
edges {
node {
id
nameWithOwner
description
primaryLanguage { name }
repositoryTopics(first: 5) { nodes { topic { name } } }
}
}
}
}
}
Querying a specific list (MUST use ... on Repository — items is union type):
query {
node(id: "UL_xxx") {
... on UserList {
items(first: 100, after: null) {
pageInfo { hasNextPage endCursor }
edges { node { ... on Repository { id nameWithOwner description primaryLanguage { name } repositoryTopics(first: 5) { nodes { topic { name } } } } } }
}
}
}
}
3. AI classifies each batch
For each batch of 30-50 repos:
- Read all repo metadata (name, desc, lang, topics)
- For each repo, reason about its category — understand what the project IS
- Assign the best matching existing list, or create a new one
- Execute mutations immediately (don't batch all to the end)
Category guide (reason, don't regex-match):
- 🤖 AI-Agents: agent frameworks, MCP, tool-use, agentic systems, AI assistants
- 🌐 AI-Gateways: LLM API proxies, model routers, provider aggregators
- 🐟 AstrBot: QQ bots, OneBot, NapCat, mirai, QQ group tools
- 🛠️ Coding-Tools: CLI tools, editors, formatters, terminal utilities, shell plugins
- 📋 LLM-Skills: agent skills, SKILL.md repos, prompt templates, cursorrules
- ⚡ Automation: scrapers, automation scripts, n8n, data pipelines, 自动化工具
- 🏠 Self-Hosted: Docker compose stacks, self-hosted services, NAS tools, proxy tools (frp)
- 📦 Libraries-SDKs: SDKs, API wrappers, npm/pypi packages, language bindings
- 🔧 Dev-Tools: Git tools, CI/CD, build systems, devops, debuggers, system tools
- 🎨 Frontend-UI: UI component libraries, CSS frameworks, design systems
- 🧠 AI-ML-Research: papers, benchmarks, datasets, research code
- 📱 Apps-Clients: Desktop/mobile apps, browser extensions, GUI tools, user-facing software
- 💾 Data-Storage: databases, cache systems, storage engines
- 🎮 Game-Dev: game engines, mods, game development tools
- 📚 Docs-Learning: tutorials, awesome lists, documentation, learning resources
- 🎨 ComfyUI: ComfyUI nodes and workflows
- 🧠 BCI-Neuro: brain-computer interfaces, neuroscience
- 🤖 LLMs-Models: model weights, TTS, diffusion models, 3D/video generation, training repos
4. Mutations
Create list:
mutation { createUserList(input: {name: "🤖 AI-Agents", description: "...", isPrivate: false}) { list { id } } }
Assign (one call moves a repo between lists):
mutation { updateUserListsForItem(input: {itemId: "R_xxx", listIds: ["UL_xxx"]}) { clientMutationId } }
5. Review pass (MANDATORY after initial classification)
After all repos are classified, check each list for obvious misclassifications. Particularly:
- Any list with 200+ repos likely has false positives — pull its contents and re-examine 30 at a time
- Lists with single-digit counts may be too granular — consider merging
6. Report
query { viewer { lists(first: 30) { nodes { name items: items(first: 1) { totalCount } } } } }
Execution Strategy
- Small batches: 30-50 repos per AI reasoning batch. Large batches cause context issues and timeout
- Mutations inline: assign each repo as you classify it, don't queue all to the end
- 0.15s delay between mutations to avoid rate limiting
- Use execute_code, not delegate_task — subagents time out on this workload
- If context fills mid-classification, pause, report progress, and ask to continue
Correction
User says "X doesn't belong in Y":
- Find the repo ID from the list contents
updateUserListsForItem(itemId: "ID", listIds: ["TARGET_LIST_ID"]) — replaces previous assignment
Troubleshooting
| Problem |
Fix |
| INSUFFICIENT_SCOPES |
gh auth refresh -h github.com -s user |
| List too large after pass 1 |
Run Pass 2 AI reclassification of that list |
| Subagent timeouts |
Use execute_code directly, 30-50 per batch |
| Rate limited |
sleep(0.15) between mutations |
... on Repository required |
items field is union type, must query via inline fragment |
1---2name: gh-stars-organizer3description: Organize starred repos into GitHub Lists with AI reasoning — agent examines each repo individually, never regex rules.4metadata:5 source: https://skillmd.com/skills/publieople/gh-stars-organizer6---78# GitHub Stars Organizer910Use AI reasoning to categorize starred repos into GitHub Lists. The agent examines each repo's name, description, and topics to understand what it IS, then assigns the best-fit category.1112**CRITICAL: Never use regex rules as primary classifier.** The agent MUST reason about each repo individually. Regex is only acceptable as a fast first-pass bulk pre-sort if the user has 500+ repos and doesn't want to wait.1314## Prerequisites1516Verify `gh auth status`. If `user` scope missing: `gh auth refresh -h github.com -s user`1718## Core Principle: Agent Reasoning Per Repo1920For every repo, the agent reads `nameWithOwner`, `description`, `language`, and `topics`, then asks itself: **"What is this project?"** — not "what keywords match?"2122- A repo named `anthropics/claude-code` with desc "agentic coding tool" → 🤖 AI-Agents23- A repo named `fatedier/frp` with desc "reverse proxy to expose local server" → 🏠 Self-Hosted 24- A repo named `harry0703/MoneyPrinterTurbo` with desc "一键生成短视频" → ⚡ Automation25- A repo named `torvalds/linux` → 🔧 Dev-Tools (infrastructure, not a library)2627## Workflow2829### 1. Discovery3031Pull existing lists:32```graphql33query { viewer { lists(first: 30) { nodes { id name } } } }34```3536### 2. Fetch repos (small batches: 30-50 per batch)3738GraphQL pull (from starred list or a specific list):39```graphql40query {41 viewer {42 starredRepositories(first: 50, orderBy: {field: STARRED_AT, direction: DESC}, after: null) {43 pageInfo { hasNextPage endCursor }44 edges {45 node {46 id47 nameWithOwner48 description49 primaryLanguage { name }50 repositoryTopics(first: 5) { nodes { topic { name } } }51 }52 }53 }54 }55}56```5758Querying a specific list (MUST use `... on Repository` — items is union type):59```graphql60query {61 node(id: "UL_xxx") {62 ... on UserList {63 items(first: 100, after: null) {64 pageInfo { hasNextPage endCursor }65 edges { node { ... on Repository { id nameWithOwner description primaryLanguage { name } repositoryTopics(first: 5) { nodes { topic { name } } } } } }66 }67 }68 }69}70```7172### 3. AI classifies each batch7374For each batch of 30-50 repos:751. Read all repo metadata (name, desc, lang, topics)762. For each repo, reason about its category — understand what the project IS773. Assign the best matching existing list, or create a new one784. Execute mutations immediately (don't batch all to the end)7980**Category guide (reason, don't regex-match):**81- 🤖 **AI-Agents**: agent frameworks, MCP, tool-use, agentic systems, AI assistants82- 🌐 **AI-Gateways**: LLM API proxies, model routers, provider aggregators83- 🐟 **AstrBot**: QQ bots, OneBot, NapCat, mirai, QQ group tools84- 🛠️ **Coding-Tools**: CLI tools, editors, formatters, terminal utilities, shell plugins85- 📋 **LLM-Skills**: agent skills, SKILL.md repos, prompt templates, cursorrules86- ⚡ **Automation**: scrapers, automation scripts, n8n, data pipelines, 自动化工具87- 🏠 **Self-Hosted**: Docker compose stacks, self-hosted services, NAS tools, proxy tools (frp)88- 📦 **Libraries-SDKs**: SDKs, API wrappers, npm/pypi packages, language bindings89- 🔧 **Dev-Tools**: Git tools, CI/CD, build systems, devops, debuggers, system tools90- 🎨 **Frontend-UI**: UI component libraries, CSS frameworks, design systems91- 🧠 **AI-ML-Research**: papers, benchmarks, datasets, research code92- 📱 **Apps-Clients**: Desktop/mobile apps, browser extensions, GUI tools, user-facing software93- 💾 **Data-Storage**: databases, cache systems, storage engines94- 🎮 **Game-Dev**: game engines, mods, game development tools95- 📚 **Docs-Learning**: tutorials, awesome lists, documentation, learning resources96- 🎨 **ComfyUI**: ComfyUI nodes and workflows97- 🧠 **BCI-Neuro**: brain-computer interfaces, neuroscience98- 🤖 **LLMs-Models**: model weights, TTS, diffusion models, 3D/video generation, training repos99100### 4. Mutations101102Create list:103```graphql104mutation { createUserList(input: {name: "🤖 AI-Agents", description: "...", isPrivate: false}) { list { id } } }105```106107Assign (one call moves a repo between lists):108```graphql109mutation { updateUserListsForItem(input: {itemId: "R_xxx", listIds: ["UL_xxx"]}) { clientMutationId } }110```111112### 5. Review pass (MANDATORY after initial classification)113114After all repos are classified, check each list for obvious misclassifications. Particularly:115- Any list with 200+ repos likely has false positives — pull its contents and re-examine 30 at a time116- Lists with single-digit counts may be too granular — consider merging117118### 6. Report119120```graphql121query { viewer { lists(first: 30) { nodes { name items: items(first: 1) { totalCount } } } } }122```123124## Execution Strategy125126- **Small batches**: 30-50 repos per AI reasoning batch. Large batches cause context issues and timeout127- **Mutations inline**: assign each repo as you classify it, don't queue all to the end128- **0.15s delay** between mutations to avoid rate limiting129- **Use execute_code**, not delegate_task — subagents time out on this workload130- If context fills mid-classification, pause, report progress, and ask to continue131132## Correction133134User says "X doesn't belong in Y":1351. Find the repo ID from the list contents1362. `updateUserListsForItem(itemId: "ID", listIds: ["TARGET_LIST_ID"])` — replaces previous assignment137138## Troubleshooting139140| Problem | Fix |141|---------|-----|142| INSUFFICIENT_SCOPES | `gh auth refresh -h github.com -s user` |143| List too large after pass 1 | Run Pass 2 AI reclassification of that list |144| Subagent timeouts | Use execute_code directly, 30-50 per batch |145| Rate limited | sleep(0.15) between mutations |146| `... on Repository` required | items field is union type, must query via inline fragment |