janitor-value
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Value Report
Skill价值报告
Show whether each installed skill is earning the context-window tokens it costs.
展示每个已安装的Skill是否物有所值,即其消耗的上下文窗口token成本是否匹配其价值。
Overview
概述
Combine token cost and usage tracking into a single view of every installed skill, sorted with the heaviest unused skills at the top. The report splits each skill's cost into what is permanently loaded (the description) and what only loads on demand (the body), then cross-references recent invocations so the user can see which skills are dead weight.
Replaces the v1.2 split between (cost only) and (usage only).
/janitor-tokens/janitor-usage将token成本与使用情况追踪整合为一个视图,展示所有已安装的Skill,并按未使用程度从高到低排序。该报告将每个Skill的成本分为永久加载部分(描述内容)和按需加载部分(主体内容),然后结合近期调用记录,让用户可以清楚看到哪些Skill是无用累赘。
替代了v1.2版本中(仅展示成本)和(仅展示使用情况)的拆分功能。
/janitor-tokens/janitor-usagePrerequisites
前提条件
- Claude Code with the skills-janitor plugin installed (provides )
scripts/value.sh - bash 3.2+ (the stock macOS bash works; no external dependencies)
- Read access to ,
~/.claude/skills, and local Claude Code session history~/.claude/agents - No authentication or API keys required — the script reads local files only
- 安装了skills-janitor插件的Claude Code(提供脚本)
scripts/value.sh - bash 3.2及以上版本(macOS自带的bash即可;无需外部依赖)
- 拥有、
~/.claude/skills及本地Claude Code会话历史的读取权限~/.claude/agents - 无需认证或API密钥——脚本仅读取本地文件
Instructions
操作步骤
Step 1: Run the value script
步骤1:运行价值分析脚本
bash
bash ~/.claude/skills/skills-janitor/scripts/value.sh [--weeks N] [--budget N] [--json]- — usage lookback window (default: 4)
--weeks N - — context window size for % calculations (default: 200000)
--budget N - — emit raw JSON
--json
bash
bash ~/.claude/skills/skills-janitor/scripts/value.sh [--weeks N] [--budget N] [--json]- —— 使用情况回溯窗口(默认:4周)
--weeks N - —— 用于百分比计算的上下文窗口大小(默认:200000)
--budget N - —— 输出原始JSON格式数据
--json
Step 2: Present the results
步骤2:展示结果
Show the table and summary to the user. When explaining results, do NOT describe body tokens as permanent context cost — only descriptions are always loaded. Plugin-namespaced skills appear with their full invocation name (e.g., , ).
marketing-skills:imagefigma:figma-use向用户展示表格和摘要。解释结果时,请勿将主体token描述为永久上下文成本——只有描述内容会始终加载。插件命名空间的Skill会显示完整调用名称(例如:、)。
marketing-skills:imagefigma:figma-useStep 3: Suggest action when waste is high
步骤3:高浪费情况的行动建议
If "unused skill cost" exceeds 20% of the budget, recommend the user run for a full health check or (in v1.4+) to triage interactively.
/janitor-report/janitor-swipe如果“未使用Skill成本”超过预算的20%,建议用户运行进行全面健康检查,或(v1.4及以上版本)运行进行交互式筛选。
/janitor-report/janitor-swipeOutput
输出内容
A table of every installed skill with:
- Always — description tokens, permanently in the system prompt (the real context rent)
- Body — the rest of SKILL.md, loaded only when the skill triggers (progressive disclosure)
- Used? — if invoked in the lookback window, else
yesNO - Last Used — date of most recent invocation
Followed by a summary:
- Total tokens loaded into context (the always-loaded TOTAL includes skills plus subagent descriptions from , reported as % of budget)
~/.claude/agents - Active vs. unused split
- Top wasters: heavy skills with zero usage
一张包含所有已安装Skill的表格,包含以下列:
- Always —— 描述内容的token数,永久加载在系统提示中(真正的上下文“租金”)
- Body —— SKILL.md的剩余内容,仅在Skill触发时加载(渐进式披露)
- Used? —— 如果在回溯窗口内被调用则显示,否则显示
yesNO - Last Used —— 最近一次调用的日期
表格后附有摘要:
- 加载到上下文中的总token数(始终加载的总token数包括Skill以及中的子Agent描述,以占预算的百分比形式呈现)
~/.claude/agents - 活跃Skill与未使用Skill的占比
- 顶级浪费者:零使用的高token消耗Skill
Error Handling
错误处理
-
Error:Solution: The plugin is installed under a different root. Locate it with
value.sh: No such file or directoryor check the plugin cache, then run the script from its actual location.ls ~/.claude/skills -
Error: Every skill showsin the Used? column Solution: The lookback window may be too short or session history is empty. Re-run with a longer window, e.g.
NO.--weeks 12 -
Error: A skill shows 0 tokens Solution: Its SKILL.md is missing or unreadable. Runto surface broken skills, then
/janitor-reportto clean them up./janitor-fix --prune -
Error: Percentages look wrong for a non-default model Solution: Pass the correct context size explicitly, e.g..
--budget 500000
-
错误:解决方案:插件安装在不同的根目录下。使用
value.sh: No such file or directory定位插件或检查插件缓存,然后从实际位置运行脚本。ls ~/.claude/skills -
错误:所有Skill的Used?列均显示解决方案:回溯窗口可能过短或会话历史为空。使用更长的窗口重新运行,例如
NO。--weeks 12 -
错误:某个Skill显示0 token 解决方案:其SKILL.md文件缺失或无法读取。运行找出损坏的Skill,然后运行
/janitor-report清理它们。/janitor-fix --prune -
错误:非默认模型的百分比显示异常 解决方案:明确传入正确的上下文大小,例如。
--budget 500000
Examples
示例
Example 1: Standard value check
示例1:标准价值检查
Input: "Are my skills worth their token cost?"
Output: Run , then present the table sorted by waste and the summary line, e.g. "Always-loaded total: 8,420 tokens (4.2% of 200k budget). 6 of 31 skills unused in 4 weeks; top waster: (1,900 tokens, never used)."
bash ~/.claude/skills/skills-janitor/scripts/value.shheavy-skill输入:"我的Skill是否值得其token成本?"
输出:运行,然后展示按浪费程度排序的表格和摘要行,例如:"始终加载的总token数:8,420个(占20万预算的4.2%)。31个Skill中有6个在4周内未使用;顶级浪费者:(1,900个token,从未使用)。"
bash ~/.claude/skills/skills-janitor/scripts/value.shheavy-skillExample 2: Longer lookback, custom budget
示例2:更长回溯窗口与自定义预算
Input: "Check skill usage over the last quarter against a 500k window."
Output: Run and present the same table with the adjusted lookback and percentages.
bash ~/.claude/skills/skills-janitor/scripts/value.sh --weeks 12 --budget 500000输入:"检查过去一个季度的Skill使用情况,对照50万token的上下文窗口。"
输出:运行,并展示调整回溯窗口和百分比后的相同表格。
bash ~/.claude/skills/skills-janitor/scripts/value.sh --weeks 12 --budget 500000Example 3: Machine-readable output
示例3:机器可读输出
Input: "Give me the raw skill value data."
Output: Run the script with and return the JSON payload unmodified.
--json输入:"给我原始的Skill价值数据。"
输出:运行带参数的脚本,并返回未修改的JSON payload。
--jsonResources
资源
- Report script (plugin-relative):
{baseDir}/../../scripts/value.sh - — full health check including duplicates and broken skills
/janitor-report - — remove broken symlinks and empty skill dirs
/janitor-fix --prune - — find new skills or check one before installing
/janitor-discover
- 报告脚本(插件相对路径):
{baseDir}/../../scripts/value.sh - —— 全面健康检查,包括重复和损坏的Skill
/janitor-report - —— 移除损坏的符号链接和空Skill目录
/janitor-fix --prune - —— 查找新Skill或在安装前检查某个Skill
/janitor-discover