janitor-discover

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Discovery & Pre-Install Check

Skill 发现与安装前检查

Combined entry point for finding skills on GitHub and for evaluating a specific skill (URL or local path) before installing it.
这是在GitHub上查找Skill以及在安装前评估特定Skill(URL或本地路径)的综合入口。

Overview

概述

Replaces the v1.2 split between
/janitor-search
and
/janitor-precheck
. The dispatcher picks the right mode from the argument shape. Search results are relevance-gated (a repo must carry a skill signal in its name/description/topics) and ranked by relevance before stars, so generic mega-repos don't crowd out actual skills.
ArgumentModeWhat runs
Keyword(s) like
seo
or
n8n workflows
Discovery
search.sh
— find matching skills on GitHub
--compare <skill-name>
Comparison
search.sh --compare
— find alternatives to a local skill
Full URL:
https://github.com/user/skill
Pre-install check
precheck.sh
— analyze before installing
Short repo:
user/skill
Pre-install check
precheck.sh
(auto-expanded to URL)
Local path:
~/path/to/skill
Pre-install check
precheck.sh
(local folder)
替代了v1.2版本中
/janitor-search
/janitor-precheck
的拆分设计。调度器会根据参数形式选择合适的模式。搜索结果会经过相关性筛选(仓库必须在名称/描述/主题中带有Skill标识),并按相关性优先、星级次之的顺序排序,避免通用大型仓库挤占真正的Skill仓库。
参数模式执行内容
关键词(如
seo
n8n workflows
发现模式
search.sh
— 在GitHub上查找匹配的Skill
--compare <skill-name>
对比模式
search.sh --compare
— 查找本地Skill的替代选项
完整URL:
https://github.com/user/skill
安装前检查模式
precheck.sh
— 安装前分析
短仓库名:
user/skill
安装前检查模式
precheck.sh
(自动扩展为完整URL)
本地路径:
~/path/to/skill
安装前检查模式
precheck.sh
(本地文件夹)

Prerequisites

前置条件

  • Claude Code with the skills-janitor plugin installed (provides
    scripts/discover.sh
    ,
    search.sh
    ,
    precheck.sh
    ,
    compare.sh
    )
  • bash 3.2+ and
    curl
  • Network access to
    api.github.com
    (anonymous OK; set
    GITHUB_TOKEN
    for higher rate limits and code search)
  • 安装了skills-janitor插件的Claude Code(提供
    scripts/discover.sh
    search.sh
    precheck.sh
    compare.sh
  • bash 3.2+ 和
    curl
  • 可访问
    api.github.com
    的网络权限(匿名访问即可;设置
    GITHUB_TOKEN
    可获得更高的速率限制和代码搜索权限)

Instructions

使用说明

Step 1: Dispatch on argument shape

步骤1:根据参数形式调度

bash
bash ~/.claude/skills/skills-janitor/scripts/discover.sh <query-or-url> [options]
Examples:
  • discover.sh seo
    — search for SEO-related skills
  • discover.sh n8n --limit 20
    — top 20 n8n skills
  • discover.sh --compare marketing-seo-audit
    — alternatives to a local skill
  • discover.sh https://github.com/user/my-skill
    — check before installing
  • discover.sh user/my-skill
    — same, short form
bash
bash ~/.claude/skills/skills-janitor/scripts/discover.sh <query-or-url> [options]
示例:
  • discover.sh seo
    — 搜索SEO相关的Skill
  • discover.sh n8n --limit 20
    — 排名前20的n8n Skill
  • discover.sh --compare marketing-seo-audit
    — 查找本地Skill的替代选项
  • discover.sh https://github.com/user/my-skill
    — 安装前检查
  • discover.sh user/my-skill
    — 同上,短格式写法

Step 2: Present results per mode

步骤2:按模式展示结果

Discovery mode — ranked list of GitHub repos with skill name, description, stars, last updated, and a one-line verdict.
Pre-install mode — overlap analysis: which of the user's existing skills (including plugin skills) overlap with the candidate by description, and a recommendation to install / skip / replace.
发现模式 — 按排名展示GitHub仓库列表,包含Skill名称、描述、星级、最后更新时间,以及一行简短评估。
安装前检查模式 — 重叠分析:用户现有Skill(包括插件Skill)中哪些与候选Skill在描述上存在重叠,并给出安装/跳过/替换的建议。

Output

输出

Discovery: a numbered table (repository, stars, updated, INSTALLED/AVAILABLE status). Pre-install: overlap buckets (HIGH ≥60%, MODERATE 30–59%, LOW <30%) with shared keywords and a final verdict line (
HIGH_OVERLAP
/
MODERATE_OVERLAP
/
SAFE
).
发现模式:带编号的表格(仓库、星级、更新时间、已安装/可用状态)。安装前检查模式:重叠分类(高重叠≥60%、中等重叠30–59%、低重叠<30%),包含共享关键词,以及最终评估结果(
HIGH_OVERLAP
/
MODERATE_OVERLAP
/
SAFE
)。

Error Handling

错误处理

  1. Error:
    GitHub API rate limit exceeded
    Solution: Set the
    GITHUB_TOKEN
    environment variable (any classic token, no scopes needed) and re-run; anonymous search allows only a few requests per minute.
  2. Error:
    Could not fetch SKILL.md from <url>
    Solution: The repo keeps its SKILL.md at a non-standard path — pass a direct URL to the SKILL.md file, or a local clone path instead.
  3. Error: No results for a valid topic Solution: The relevance gate drops repos without any skill signal. Broaden the keyword (e.g.
    n8n skill
    n8n
    ) or check the cached results note — results are cached for 24h in
    data/search-cache.json
    .
  1. 错误
    GitHub API rate limit exceeded
    解决方案:设置
    GITHUB_TOKEN
    环境变量(任意经典令牌,无需权限范围)后重新运行;匿名搜索每分钟仅允许少量请求。
  2. 错误
    Could not fetch SKILL.md from <url>
    解决方案:该仓库的SKILL.md文件位于非标准路径 — 传入SKILL.md文件的直接URL,或使用本地克隆路径。
  3. 错误:有效主题无结果 解决方案:相关性筛选会过滤掉没有Skill标识的仓库。放宽关键词(例如
    n8n skill
    n8n
    ),或查看缓存结果说明 — 结果会在
    data/search-cache.json
    中缓存24小时。

Examples

示例

Example 1: Find skills by topic

示例1:按主题查找Skill

Input: "Find me an n8n skill."
Output: Run
discover.sh n8n
, present the ranked table, and flag any result already installed.
输入:"帮我找一个n8n Skill。"
输出:运行
discover.sh n8n
,展示排名表格,并标记已安装的结果。

Example 2: Check before installing

示例2:安装前检查

Input: "Is github.com/user/seo-helper worth installing?"
Output: Run
discover.sh https://github.com/user/seo-helper
, then summarize: overlap with existing skills, the verdict (e.g. "MODERATE_OVERLAP — 45% with marketing-skills:seo-audit"), and a recommendation.
输入:"github.com/user/seo-helper值得安装吗?"
输出:运行
discover.sh https://github.com/user/seo-helper
,然后总结:与现有Skill的重叠情况、评估结果(例如"中等重叠 — 与marketing-skills:seo-audit重叠45%"),以及建议。

Resources

资源

  • Dispatcher (plugin-relative):
    {baseDir}/../../scripts/discover.sh
  • Search cache:
    data/search-cache.json
    (24h TTL)
  • /janitor-report
    — health check of currently installed skills
  • /janitor-value
    — are existing skills earning their context cost
  • /janitor-fix
    — fix issues with installed skills
  • 调度器(插件相对路径):
    {baseDir}/../../scripts/discover.sh
  • 搜索缓存:
    data/search-cache.json
    (24小时有效期)
  • /janitor-report
    — 当前已安装Skill的健康检查
  • /janitor-value
    — 现有Skill是否值得占用上下文成本
  • /janitor-fix
    — 修复已安装Skill的问题