Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

skill-optimizer技能优化器

Agent Skill

skill-optimizer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

603

周安装

17

GitHub Stars

22

下载量

140
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:skill-optimizer(技能优化器)
来源仓库:https://github.com/crystian/skills
仓库路径:skills/skill-optimizer
安装命令:
npx skills add https://github.com/crystian/skills --skill skill-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/crystian/skills --skill skill-optimizer

简介

诊断 AI 代理技能性能问题并提出改进建议,源自实际生产环境反馈。

  • 追踪根因、记录教训并自动升级高频问题的优先级。
  • 适用于持续优化 SKILL.md 文档质量与执行效率。
  • 安装需通过 npx 添加指定仓库,进入监听模式后仅输出单一响应。
  • skill-optimizer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Skill Optimizer

Born from real-world production usage across multiple projects. Every diagnostic category, every proposal flow, and every guardrail exists because it solved a real problem in a real skill.

Kaizen (改善) for AI agent skills. Observe how a skill performed, find what went wrong or could be better, and propose concrete changes to its SKILL.md.

Diagnoses root causes and proposes improvements — you decide each one. Tracks recurrence in LESSONS.md with automatic importance escalation.

Execution

1. Resolve target

  • /skill-optimizer (default) — enter listening mode. Output ONLY this single line: "skill-optimizer is observing the conversation, waiting for a skill to complete..." Nothing else — no explanations, no additional context, no prompts. Be silent. Then wait — do not prompt or block. The user will manually invoke /skill-optimizer --review when ready to analyze. This is the ideal scenario — the optimizer observes the skill in real time.
  • /skill-optimizer <name> — target a specific skill by name
  • /skill-optimizer --diagnose or /skill-optimizer <name> --diagnose — run static diagnostic directly on the SKILL.md without prior observation. Skips conversation friction and file diffs — uses static diagnostic + user feedback only. If no target can be resolved, ask the user: "Which skill do you want to diagnose? Provide the name or path."
  • /skill-optimizer --review — skip to accumulated lessons (no skill execution needed). If no target can be resolved (no name, no prior skill in conversation), ask the user: "Which skill do you want to review? Provide the name or path." If multiple skills were executed in this conversation, ask the user: "Multiple skills detected — which one do you want to review?" If no LESSONS.md exists, inform the user: "No accumulated lessons found — static diagnostic and user feedback will still run. Run /skill-optimizer after a skill execution to start collecting lessons."
  • /skill-optimizer <name> --review — review accumulated lessons for the named skill. Combines target resolution with --review mode. If no LESSONS.md exists, apply the same fallback: inform the user and offer a static diagnostic.

Argument order does not matter — --review <name> is equivalent to <name> --review. --diagnose and --review are mutually exclusive — if both are provided, inform the user: "Cannot use --diagnose and --review together. Pick one." and stop.

Once resolved, read the target's SKILL.md and LESSONS.md (if exists).

Skill resolution: Search for <name>/SKILL.md in these paths (first match wins):

  1. .claude/skills/
  2. .agents/skills/
  3. The parent directory of the skill that invoked the optimizer (peer skills are expected as sibling folders — e.g., ../other-skill/SKILL.md)
  4. Current working directory

If not found in any path, tell the user: "Could not find <name>/SKILL.md. Check the skill name or provide the full path." Do not guess or search outside these paths.

Path input: If <name> contains / (e.g., ./my-skill, ../other-skill, or an absolute path), treat it as a direct path — read <name>/SKILL.md (or <name> if it already ends in SKILL.md). Skip the 4-path search. If the file does not exist, report: "File not found at <path>. Check the path and try again."

Extra arguments: Any arguments beyond <name>, --review, or --diagnose are ignored. Inform the user: "Extra arguments ignored: [args]."

Self-optimization: The default mode is observation (conversation friction + file diffs), but when the target is skill-optimizer itself, self-observation is unreliable — skip conversation friction and file diffs, fall back to static diagnostic + user feedback instead.

Fallback without prior run: If the target skill was not executed in this conversation (e.g., /skill-optimizer <name> without prior run), fall back to static diagnostic + user feedback. State this to the user before proceeding.

2. Gather

Collect findings from the appropriate source:

Sources: conversation friction, file diffs, user feedback, static diagnostic

  • Default — enters listening mode; analysis deferred to --review
  • <name> without prior run — static diagnostic, user feedback
  • <name> with prior run — conversation, diffs, static diagnostic, user feedback
  • --diagnose — static diagnostic, user feedback
  • --review — conversation, diffs, existing LESSONS.md entries, static diagnostic, user feedback

Conversation friction:

  • Errors or exceptions during skill execution
  • User corrections ("no, not that", "I meant...", "undo that")
  • Retries or repeated attempts at the same step
  • Manual interventions the user had to make
  • Confusion about what the skill was supposed to do
  • Steps the skill skipped or did in the wrong order

File diffs: Use git diff (or git diff --cached) to inspect changes made during the skill's execution. If not in a git repo, compare file contents against the SKILL.md's expected output. Look for:

  • Files the skill created or modified — do they match what was expected?
  • Changes the user had to make after the skill ran (post-corrections)
  • Incomplete implementations (TODOs, placeholders, missing pieces)
  • Patterns that deviate from what the SKILL.md prescribed

User feedback: After gathering findings, ask the user: "Want to add anything, or should we review the findings?"

Static diagnostic (used in --review, --diagnose, and <name> without prior run): Validate against baseline rules:

  • Frontmatter must have name and description (required)
  • Description max 1024 characters, third person, with specific trigger phrases
  • Body should be under 500 lines and under 5k tokens — use references/ for overflow. Token count is the primary constraint; line count is a quick heuristic.
  • Name: lowercase, hyphens only, 1-64 characters
  • Progressive disclosure: metadata (~100 tokens) → body → resources (as needed)
  • Check for: dead content (unreferenced sections, commented-out blocks, instructions that no longer match the skill's actual behavior), scope creep (sections that belong in a different skill or exceed the stated purpose), trigger quality (description contains specific verbs and contexts that help the harness match user intent — not just generic terms), token efficiency (redundant paragraphs, verbose phrasing that could be tightened without losing meaning), completeness (all stated flows have matching instructions — no "TODO" or undocumented branches), task trackability (skill defines sequential steps or phases but does not instruct the agent to track progress via harness task tools)
  • When recommending references/: this is a subdirectory alongside SKILL.md that holds supporting material (tables, examples, templates) the agent loads on demand. Files should be markdown, named descriptively (e.g., references/diagnostic-tables.md), and referenced from the body with explicit load instructions (e.g., "Read references/diagnostic-tables.md for the full list").
  • If the target SKILL.md is missing frontmatter or required fields (name, description), report it as a high finding and propose adding the missing structure — infer values from the body content.
  • Task discovery: Scan the skill's execution flow for numbered steps, phases, or sequential tasks (e.g., ### 1., Step N:, Phase N, ordered markdown lists within execution sections). If found, enumerate them in the diagnostic output: Tasks detected (N): 1. [step title or summary] 2. [step title or summary]... Then check: does the skill instruct the agent to report progress per step? If not, and the harness provides task management tools (e.g., TaskCreate/ TaskUpdate in Claude Code), propose adding an instruction like: "Create a task per step at the start of execution and update each task's status as it completes, so the user can track progress." Importance: medium. Diagnostic: missing instruction.

Cross-reference against the SKILL.md. Read references/diagnostic-tables.md (relative to this skill's own directory, NOT the project CWD) for the category and root-cause lookup tables.

Static diagnostic output: Present results as a single unified checklist before proposals:

  • One line per baseline rule: ✅ for pass, ❌ for findings (include importance + short description)
  • Cross-reference findings go in the same list with ❌ — no separate section, no numbering
  • End with finding count: "Found N findings." or "No issues found."

Importance: high (breaks output, errors) · medium (suboptimal, friction) · low (style, preferences)

Recurrence: Same pattern in LESSONS.md? Increment Hits instead of duplicating. Hits >= 3 escalates: lowmedium, mediumhigh.

context7 (optional): If the target skill references a specific library or framework (e.g., Angular, NestJS, React), use context7 to verify that code patterns, API calls, or config examples in the SKILL.md match current docs. Report mismatches as findings with diagnostic outdated content. If the skill does not reference any library, skip — the baseline rules are sufficient. If context7 is not available in the environment, skip this step — the baseline rules are sufficient.

3. Propose

If no findings were identified, report: "No issues found. The skill looks solid." If user feedback was not yet collected (e.g., --review mode), ask for it now. If the user has none, end with no proposals.

Before the first proposal, show the sources legend listing only the sources actually used in the current run (e.g., Sources: static diagnostic, user feedback).

Present findings one at a time, ordered by importance. For --review findings from LESSONS.md, verify the root cause still exists in the current SKILL.md before proposing. If resolved, mark as (resolved) and recommend rejecting to clean up the entry. If there are more than 15 findings, present the top 15 (by importance) and offer to log the rest to LESSONS.md: "There are [N] more remaining findings — want me to log them to LESSONS.md for later review?" If the user declines, discard the remaining findings.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  PROPOSAL [N/total] — [importance]
  Source: [conversation | diff | user | lessons | diagnostic]

  Finding: [what was observed]
  Root cause: [diagnostic] — [which line/section and why]
  Hits: [N — omit if first occurrence]

  Proposed change: [what to add/modify/remove]
  Preview:
  - [old line]
  + [new line]
  For additions, show only `+` lines with surrounding context.
  For removals, show only `-` lines.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use the question tool (e.g., AskUserQuestion in Claude Code) to ask the user for their decision:

Default mode:

  • question: "Proposal [N/total] — [importance]: [one-line finding summary]"
  • header: "Proposal [N/total]"
  • options:

- label: "Accept", description: "Apply the edit to the SKILL.md" - label: "Postpone", description: "Save to LESSONS.md for later" - label: "Reject", description: "Discard this finding" - label: "Don't", description: "Add a permanent negative rule to SKILL.md"

--review mode:

  • Same as above but replace "Postpone" with:

- label: "Keep", description: "Leave in LESSONS.md for later review"

Actions:

  • Accept → apply the edit
  • Postpone → save to LESSONS.md
  • Reject → discard (in review: remove from LESSONS.md)
  • Keep (only in --review):

- Existing LESSONS.md entry → leave it for later - New finding (from diagnostic or user feedback) → add to LESSONS.md

  • Don't → ask "This will add a permanent negative rule. Confirm? (y/n)", then on y, append a negative rule at the end of the target's SKILL.md Guardrails section (create one if absent — place it as the last section before any footer like ---) using the format: - **Never [action].** [reason from the finding]

If the user selects "Other" and types "skip all", write current and all remaining findings to LESSONS.md and end.

Summary: Done. [N] accepted, [N] postponed, [N] rejected, [N] don'ts.

LESSONS.md Format

Lives alongside the target's SKILL.md. Read references/lessons-format.md (relative to this skill's own directory, NOT the project CWD) for the full format and rules.

Guardrails

  • Never edit without confirmation. Show the diff, wait for explicit approval. No exceptions. The user owns the skill.
  • Never expose secrets. Redact API keys, tokens, passwords, credentials (sk-..., ghp_..., Bearer...) with [REDACTED] in all output and LESSONS.md.
  • Read before proposing. Read SKILL.md + LESSONS.md first to avoid duplicates.
  • Never invent. Zero findings is a valid outcome. Never fabricate findings or fill gaps with guesses — if you don't know, say "I don't know".
  • One at a time. Present, decide, move on.
  • Respect structure. Match existing style when inserting content.
  • Don'ts need double confirmation. Negative rules are impactful — always confirm.
  • Never bump versions. Version management is the user's responsibility — do not modify version fields in frontmatter.

Made with <3 by Crystian

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.81%
按下载量换算49

Claude

30.02%
按下载量换算42

Cursor

20.2%
按下载量换算28

Gemini CLI

9.06%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills