/sumsec-skills:skill-optimizerfrom sumsec-skills
Analyzes, diagnoses, and restructures SKILL.md files. Use when skills don't trigger, need quality review, or require refactoring with user confirmation.
Ships in sumsec-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| 路径 | 行为 | 典型触发 |
|---|---|---|
| A — 结构化改写 | 读目标 skill → 诊断与计划 → 用户确认后才改 SKILL.md / references / scripts | 用户附着或指定路径、说「改 description」「拆 references」「加确认步骤」 |
| B — 会话审计 | 扫描本机 skill 目录与历史会话 jsonl,只输出报告,绝不写 skill 文件 | /optimize-skill、/skill-audit、「分析我所有 skills」「skill 从不触发」「只审计不要改」 |
判定: 用户明确「只分析 / 只出报告 / 不要改」→ B。用户点名要改某 skill 且未禁止写文件 → A(无确认仍不得改)。「先看全局再改」→ 先做 B,再在用户要求下对单项切 A。
N/A — insufficient session data。${CLAUDE_SKILL_DIR}: 任何「读 / 写 / 引用本 skill 资源」的动作(含脚本、Bash、Read、Write、WebFetch 后落盘)都使用 ${CLAUDE_SKILL_DIR}/... 形式,不写死绝对路径,不写仓库相对路径。当目标 skill 在 Step 2 Review 中被判定为 Pipeline(主模式或次模式),或满足 ≥3 个 workflow-skill-creator 适用信号(≥3 顺序步骤 / 跨步骤状态传递 / 需脚本辅助 / 需进度文件 / 强制顺序、跳步导致失败),按以下规则叠加评审基准:
${CLAUDE_SKILL_DIR}/../workflow-skill-creator/references/architecture_patterns.md(六大架构模式)与 quality_checklist.md(七维自检)review-checklist.md 之上叠加 workflow-skill-creator 的 quality_checklist;针对编排专门规范遇冲突时以 workflow-skill-creator 为准agents-dev plugin,故用 ${CLAUDE_SKILL_DIR}/../workflow-skill-creator/... 引用;若日后被拆到不同 plugin,需改为目标 plugin 的解析路径${CLAUDE_SKILL_DIR}/references/official-spec-fetch.md 缓存。/optimize-skill 全量,或 /optimize-skill a b 指定多个 name。复制并跟踪进度:
优化进度:
- [ ] 步骤 0:Fetch Spec(拉取并阅读最新官方规范,必要时落盘缓存)
- [ ] 步骤 1:Scope(确定范围)
- [ ] 步骤 2:Review(审查目标 skill)
- [ ] 步骤 3:Plan(输出优化计划并等待确认)
- [ ] 步骤 4:Implement(确认后实施)
- [ ] 步骤 5:Verify(校验结果)
按以下顺序执行,并在最终报告/汇报里写明走到了哪一支:
WebFetch,URL = https://proxy.sumsec.me/https://code.claude.com/docs/en/skills.md;若代理失败,再尝试直连 WebFetch https://code.claude.com/docs/en/skills.md。prompt 要求按官方原文返回完整 markdown(重点保留 frontmatter 字段表、调用控制、动态上下文、subagent、可见性、分发、字符串替换 ${CLAUDE_SKILL_DIR} 等条款)。${CLAUDE_SKILL_DIR}/references/official-spec-fetch.md,并保留头部注释块(来源、fetched_at、method 字段)。本轮以「live」为基准。Read ${CLAUDE_SKILL_DIR}/references/official-spec-fetch.md,本轮以「cache」为基准;在最终汇报第一行用一句话标注:⚠️ 使用本地缓存基准(fetched_at: <时间>)。确认目标 skill 与优化范围;目标不明时只问一个最短问题。
先读目标 SKILL.md,再按需读其直接链接的 references/、scripts/、assets/。本 skill 自身的 references 一律通过 ${CLAUDE_SKILL_DIR}/references/<file> 定位(下面的 markdown 链接是相对路径展示,实际工具调用请用 ${CLAUDE_SKILL_DIR} 形式):
${CLAUDE_SKILL_DIR}/references/review-checklist.md(常规检查;面向 Claude Code 的 skill 默认覆盖新特性)${CLAUDE_SKILL_DIR}/references/skill-design-review-framework.md${CLAUDE_SKILL_DIR}/references/official-spec-fetch.md(Claude Code 官方规范缓存或 Step 0 live 抓取);checklist 用于补充执行细节,不替代官方规范${CLAUDE_SKILL_DIR}/references/claude-code-skills-checklist.md 了解检查维度,Step 5 Verify 时逐项核对${CLAUDE_SKILL_DIR}/../workflow-skill-creator/references/architecture_patterns.md 与 quality_checklist.md,作为 Step 3 Plan 与 Step 5 Verify 的叠加基准${CLAUDE_SKILL_DIR}/references/session-audit-dimensions.md 的 4.4 静态质量 表做 CSO / YAML / 长度检查(无会话也可做)Review 关注点保持与原 skill 一致:name、description、模式匹配、确认门槛、渐进披露、输出可执行性等。额外固定关注:被审查 skill 是否正确使用 ${CLAUDE_SKILL_DIR} 引用自身资源——动态上下文、Bash 命令、脚本路径、Read/Write 目标、缓存落盘位置都必须用该变量;写死 ~/.claude/skills/...、绝对路径、仓库相对路径属于反模式(详见 ${CLAUDE_SKILL_DIR}/references/claude-code-skills-checklist.md §7)。
先诊断再计划,不改文件。输出须包含「审查结论」(模式判断 + 高/中/低优先级问题)与「优化计划」(文件级变更、原因、是否用户指定方向),末句:请确认是否按以上计划执行。
用户确认后再改;小步、新增 reference 须在 SKILL.md 中直接链接。
description / 调用控制 / 动态上下文 / subagent / 分发等改动有据可循name 与目录一致;description 可独立表达触发条件;额外字段均有明确意图${CLAUDE_SKILL_DIR}/references/official-spec-fetch.md(或 Step 0 live 抓取摘要)校验技能位置、命令兼容、扩展 frontmatter、调用控制、动态上下文、subagent、可见性覆盖、分发要求与简洁性 / 渐进披露 / 命名 / description 等基础项review-checklist.md 已覆盖 Claude Code 新特性;必要时按 ${CLAUDE_SKILL_DIR}/references/claude-code-skills-checklist.md 细查${CLAUDE_SKILL_DIR}/../workflow-skill-creator/references/quality_checklist.md 七维(结构 / 进度文件 / 执行规范 / 前置门槛 / 依赖 / 触发 / 输出)自检;六大架构模式(进度文件驱动、步骤框架分离、三阶段执行、脚本自动化、资源分层、路径一致性)改造结果可追溯到 architecture_patterns.md: 时 YAML 用双引号包裹等${CLAUDE_SKILL_DIR}/...,不写死本机绝对路径汇报:已改文件、已落实方向、本轮基准来源(live fetched_at 或 cache fetched_at)、残留风险。
会话八维、评分与报告模板与 xget 镜像的 SKILL.md 对齐,并压缩进 references/session-audit-dimensions.md 以降低 Tier2 体积。
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (summersec/sumsec-skills) — no native marketplace selected
npx claudepluginhub p/summersec-sumsec20 skills in this plugin
/agent-chat-history按 YYYY-MM-DD 在 Windows/macOS/Linux 检索本机聊天与 Agent 会话历史(Claude Code 项目 jsonl、Codex CLI history.jsonl、Cursor workspaceStorage 与 state.vscdb);可只导出用户提示词。用户要查看或导出某日记录、按天筛 jsonl/SQLite、只抽提示词、排查历史丢失或做只读审计时使用。/claude-agents-symlink将项目根目录的 Claude 记忆文件统一为指向根目录 AGENTS 文件的软链接。用于用户要求把 `CLAUDE.md` 或 `claude.md` 指向 `AGENTS.md` 或 `agents.md`、希望批量统一多个项目的根目录记忆文件,或需要兼容 Windows、macOS、Linux 的跨平台软链接处理流程时。/context7-cliUse the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent./context7-mcpThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc./eli5-zh按指定听众的背景、词汇和兴趣,把任意主题、代码、概念或报错讲清楚。 用户说 ELI5、eli5、讲人话、说人话、通俗解释、用小学生能听懂的方式、给五岁小孩讲、 讲给我妈听、跟老板解释、解释给经理、讲给非技术人员听、dumb it down、explain like I am、 explain this to my、break this down for、simplify this for 时使用本 skill。 给特定角色或关系解释时也要触发:领导、老板、产品经理、设计师、工程师、父母、对象、 同事、客户、面试官、大学生、初中生、高中生。即便只是「跟我老婆解释一下」或「告诉老板」也应触发。
/find-docsRetrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service — even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates.
Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage.
Use even when you think you know the answer — do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details.2 plugins in one repository ship this exact skill · first indexed Jul 20, 2026