github-stars-organizer

Organize GitHub Star repositories: reuse existing lists and assign uncategorized starred repositories into appropriate lists, only adding new categories without deleting or modifying existing ones. Supports full reorganization and targeted additions.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "github-stars-organizer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-75bf51ff0a37525c93791c530e13b3676959ed0cd12cfe9db0658b7f608270e9. Verify the upstream source and version against https://skillhub.cn/skills/user_d684b111/github-stars-organizer before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Organize GitHub Star repositories: reuse existing lists and assign uncategorized starred repositories into appropriate lists, only adding new categories without deleting or modifying existing ones. Supports full reorganization and targeted additions.

0 Downloads

Introduction source: third_party · user_d684b111 · 3.1.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: github-stars-organizer
description: |
  整理 GitHub Star 仓库:复用已有列表,将未分类的仓库分配合适的列表。 仅添加新分类,不删除或修改已有分类。支持全量整理和定向添加。
slug: github-stars-organizer
displayName: GitHub Stars 分类整理
metadata:
  type: instruction
  tags:
  - github
  - stars
  - lists
  - organization
version: 3.1.0

GitHub Stars 分类整理

当用户说"整理我的 Star"、"分类我的收藏"、"整理 GitHub Stars"、"把某个仓库加到列表"时,按以下流程执行。

核心原则

  1. 只读不删:不删除、不修改用户已有的任何列表和分配
  2. 复用优先:先匹配用户已有的列表,不够才创建新列表
  3. 分类有据:根据仓库的 topics、description、项目类型综合判断
  4. 保守写入:拿不准的仓库留给用户自己决定
  5. 32 上限:GitHub 限制 32 个列表,创建前必须检查

执行流程

第 1 步:获取 Star 仓库

gh api user/starred --paginate --jq '.[] | {full_name: .full_name, node_id: .node_id, topics: .topics, description: (.description // "")}'

第 2 步:查询现有列表

gh api graphql -f query='query { viewer { lists(first: 50) { nodes { id name slug } } } }' --jq '.data.viewer.lists.nodes'

记录每个列表的 id、name、slug。这些就是用户已有的分类体系。

第 3 步:逐仓库分类

对每个未分类的仓库:

  1. 看 topics:仓库的 topics 数组中的话题标签
  2. 看 description:仓库的简短描述
  3. 看项目类型:是框架、工具、学习资源还是应用
  4. 匹配已有列表:判断它能归入哪个已有的列表
  5. 如有多个匹配:取最具体的那个
  6. 都不匹配:先搁置,等第 5 步统一创建新列表

分类规则:

  • topic 明确匹配 → 高置信度
  • topic 不明确但 description 匹配 → 中等置信度
  • 仅凭推测 → 低置信度,留给用户判断
  • 不要按编程语言分类(Python 不一定就是 AI 项目)
  • 不要把所有带 UI 的都归为"前端"

第 4 步:检查 32 上限

gh api graphql -f query='query { viewer { lists(first: 50) { nodes { id } } } }' --jq '.data.viewer.lists.nodes | length'

如果已达 32,跳过创建步骤,仅用已有列表分配。

第 5 步:创建新列表

对搁置的仓库,按主题聚类。如果某个主题有至少 3 个仓库,考虑创建新列表:

gh api graphql -f query='mutation { createUserList(input: { name: "<分类名>", description: "<分类描述>", isPrivate: true }) { list { id name } } }' --jq '.data.createUserList.list.id'

每次间隔 300ms。超过 5 个新列表时暂停 2s。

新列表命名原则:

  • 单一职责:一个列表名只代表一个检索概念
  • 避免复合名:不要 前端与UX、后端与架构,应拆为独立列表
  • 宽泛但要可检索:能容纳多个仓库,但不能空洞

第 6 步:分配仓库到列表

gh api graphql -f query='mutation { updateUserListsForItem(input: { itemId: "<NODE_ID>", listIds: ["<LIST_ID>"] }) { clientMutationId } }'

每次间隔 200ms,每 20 个暂停 1s。HTTP 429/403 立即停 60s。

第 7 步:输出结果

OK: <数量> repos -> <类别数> lists
ERROR: <数量> repos 分配失败
搁置: <数量> repos 置信度低,留给用户判断

定向添加模式

用户指定"把 XX 仓库加到 XX 列表"时使用:

# 获取仓库 node_id
gh api repos/owner/repo --jq '.node_id'

# 查找列表 ID
gh api graphql -f query='query { viewer { lists(first: 50) { nodes { id name } } } }' --jq '.data.viewer.lists.nodes[] | select(.name == "<列表名>") | .id'

# 没有则创建(检查 32 上限)
gh api graphql -f query='mutation { createUserList(input: { name: "<列表名>", description: "<列表名>", isPrivate: true }) { list { id name } } }' --jq '.data.createUserList.list.id'

# 添加到列表
gh api graphql -f query='mutation { updateUserListsForItem(input: { itemId: "<NODE_ID>", listIds: ["<LIST_ID>"] }) { clientMutationId } }'

前置条件

  • gh CLI 已登录(gh auth status),token 含 user scope
  • Windows 设置 PYTHONIOENCODING=utf-8

错误处理

错误 处理方式
HTTP 429/403 限流 停止,gh api rate_limit --jq '.rate' 查状态,等待 reset
32 列表上限 跳过创建,仅用已有列表分配
Token 权限不足 gh auth refresh -s user
网络超时 重新运行(幂等)

辅助资源

  • scripts/classify.py — 分类辅助脚本(根据已有列表动态分类,不硬编码分类体系)
  • references/categories.md — 示例分类体系参考(非强制,用户可自定义)

Current listing version

3.1.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决 GitHub 用户 Star 仓库管理的实际痛点
  • 提供完整自动化整理流程,显著提升效率
  • 支持全量整理和定向添加两种模式
Trigger Precision80/100

Areas to improve

  • 触发词可进一步补充变体 Reported severity: Minor

    当前触发词覆盖主要场景,但可补充如"管理我的 stars"、"整理收藏夹"等常见表达

    Recommendation: 在 skill_body 开头补充更多触发词变体,提升触发覆盖率

Highlights

  • 触发词边界清晰,不易与其他 Skill 重叠
  • 覆盖"整理"和"定向添加"两种核心使用场景
Structure and Standards95/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档结构完整,但缺少显式的 When to Use 章节标题

    Recommendation: 在 skill_body 开头添加显式的 When to Use 章节,提升可读性

Highlights

  • Phase/步骤清晰(7个执行步骤)
  • 包含端到端命令示例和错误处理
  • frontmatter 完整,文档结构规范
Execution Reliability90/100

Areas to improve

  • 辅助资源说明不够详细 Reported severity: Minor

    提到了 scripts/classify.py 和 references/categories.md 但未说明具体内容和用法

    Recommendation: 补充辅助资源的具体功能说明和使用方法

Highlights

  • 工具来源明确(gh CLI),参数正确
  • 覆盖主要异常场景并有相应处理机制
  • 包含限流处理和重试机制
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.