skill-optimizer
它能做什么
这个工具会根据过去的对话,分析你的技能(即给 AI 的指令)的表现。它会检查技能是否被正确触发,以及是否帮助 AI 做到了你想要的效果。
适用场景
- ✓当某个技能看起来没有按预期工作时。
- ✓想提升技能质量时。
- ✓想了解哪些技能使用不足,或者不必要地浪费了 AI 资源时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/skill-optimizer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析一下我的技能,告诉我哪些需要改进。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会读取你的技能文件以及之前对话的数据。它会将应该发生的情况与实际发生的情况进行比较,找出问题并提出改进建议。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
When to Use This Skill
- Use when skills are not triggering as expected or seem broken
- Use when you want to audit and improve your skill library's quality
- Use when you want to understand which skills are underperforming or wasting context tokens
Rules
- Read-only: never modify skill files. Only output report.
- All 8 dimensions: do not skip any. If data is insufficient, report "N/A — insufficient session data" rather than omitting.
- Quantify: "you had 12 research tasks last week but the skill never triggered" beats "you often do research".
- Suggest, don't prescribe: give specific wording suggestions for description improvements, but frame as suggestions.
- Show evidence: for undertrigger claims, quote the actual user message that should have triggered the skill.
- Evidence-based suggestions: when suggesting description rewrites, cite the specific research finding that motivates the change (e.g., "front-load trigger keywords — MCP study shows 3.6x selection rate improvement").
Overview
Analyze skills using historical session data + static quality checks, output a diagnostic report with P0/P1/P2 prioritized fixes. Scores each skill on a 5-point composite scale across 8 dimensions.
CSO (Claude/Agent Search Optimization) = writing skill descriptions so agents select the right skill at the right time. This skill checks for CSO violations.
Usage
/optimize-skill→ scan all skills/optimize-skill my-skill→ single skill/optimize-skill skill-a skill-b→ multiple specified skills
Data Sources
Auto-detect the current agent platform and scan the corresponding paths:
| Source | Claude Code | Codex | Shared |
|---|---|---|---|
| Session transcripts | ~/.claude/projects/**/*.jsonl |
~/.codex/sessions/**/*.jsonl |
— |
| Skill files | ~/.claude/skills/*/SKILL.md |
~/.codex/skills/*/SKILL.md |
~/.agents/skills/*/SKILL.md |
Platform detection: Check which directories exist. Scan all available sources — a user may have both Claude Code and Codex installed.
Workflow
Identify target skills
↓
Collect session data (python3 scripts scan JSONL transcripts)
↓
Run 8 analysis dimensions
↓
Compute composite scores
↓
Output report with P0/P1/P2
Step 1: Identify Target Skills
Scan skill directories in order: ~/.claude/skills/, ~/.codex/skills/, ~/.agents/skills/. Deduplicate by skill name (same name in multiple locations = same skill). For each, read SKILL.md and extract:
- name, description (from YAML frontmatter)
- trigger keywords (from description field)
- defined workflow steps (Step 1/2/3... or ### sections under Workflow)
- word count
If user specified skill names, filter to only those.
Step 2: Collect Session Data
Use python3 scripts via Bash to scan session JSONL files. Extract:
Claude Code sessions (~/.claude/projects/**/*.jsonl):
Skilltool_use calls (which skills were invoked)- User messages (full text)
- Assistant messages after skill invocation (for workflow tracking)
- User messages after skill invocation (for reaction analysis)
Codex sessions (~/.codex/sessions/**/*.jsonl):
session_metaevents → extractbase_instructionsfor skill loading evidenceresponse_itemevents → assistant outputs (workflow tracking)event_msgevents → tool execution and skill-related events- User messages from
turn_contextevents (for reaction analysis)
Note: Codex injects skills via context rather than explicit Skill tool calls. Skill loading (present in base_instructions) does NOT equal active invocation. To detect actual use, search for skill-specific workflow markers (step headers, output formats) in response_item content within that session. A skill is "invoked" only if the agent produced output following the skill's defined workflow.
Aggregated:
- Per-skill: invocation count, trigger keyword match count
- Per-skill: user reaction sentiment after invocation
- Per-skill: workflow step completion markers
Step 3: Run 8 Analysis Dimensions
You MUST run ALL 8 dimensions. The baseline behavior without this skill is to skip dimensions 4.2, 4.3, 4.5b, and 4.8. These are the most valuable dimensions — do not skip them.
4.1 Trigger Rate
Count how many times each skill was actually invoked vs how many times its trigger keywords appeared in user messages.
Claude Code: count Skill tool_use calls in transcripts.
…
常见问题
这个工具会修改我的技能吗?
不会,它只做分析并提出改进建议,不会修改你的技能文件。
什么是“维度”?
维度是工具用来评估技能质量的不同方面,例如技能被使用的频率,以及用户对结果是否满意。
“CSO”是什么意思?
CSO 代表 Claude/Agent Search Optimization(Claude/智能体搜索优化)。它指的是编写技能描述,让 AI 能在正确的时机选择正确的技能。
详情
作者的原始描述
Diagnose and optimize Agent Skills (SKILL.md) with real session data and research-backed static analysis. Works with Claude Code, Codex, and any Agent Skills-compatible agent.
热度
- GitHub 星标
- 48k
- 排名
- #6298
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。