skills-optimizer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skills Optimizer

Skill优化器

A dedicated skill for optimizing the
skills.yaml
file (global:
~/.config/skills_sync/skills.yaml
or project-local:
./skills.yaml
). It aims to streamline existing skills, suggest high-quality additions customized for the user's profile, and maintain a clean, secure environment.
一款专门用于优化
skills.yaml
文件的skill(全局路径:
~/.config/skills_sync/skills.yaml
,项目本地路径:
./skills.yaml
)。它的目标是精简现有skill,根据用户个人资料定制推荐高质量的新增skill,同时维护整洁安全的使用环境。

Context: Understanding User Setup

上下文:了解用户配置

Prior to proposing any optimizations, you must understand the user's primary technical stack, preferred architectures (libraries, etc.), and overall development style. Extract this context from provided profile information or conversation history. [IMPORTANT] If your understanding of the user's setup is insufficient (e.g., core technologies are unclear), you MUST ask the user for clarification before drafting optimization suggestions.
  • Objective: Balance beneficial skill additions with context window efficiency. While the impact of installed skills on the initial context is minimal (mostly names and descriptions), respect the user's preference for either maximum utility or minimal noise.
在提出任何优化建议之前,你必须先了解用户的核心技术栈、偏好的架构(库等)以及整体开发风格。 请从提供的个人资料信息或对话历史中提取上述上下文信息。 **【重要提示】**如果你对用户配置的了解不足(例如核心技术不明确),在起草优化建议之前必须先向用户询问澄清。
  • 目标:平衡有益的skill新增与上下文窗口效率。虽然已安装skill对初始上下文的影响极小(主要是名称和描述),但仍需要尊重用户的偏好,是追求最大化实用性还是最小化无关信息。

Workflow

工作流

Strictly follow these steps when this skill is invoked:
调用本skill时请严格遵循以下步骤:

1. Current State Analysis

1. 当前状态分析

Read the current
skills.yaml
. Note that project-local
./skills.yaml
takes precedence over global
~/.config/skills_sync/skills.yaml
. Analyze the installed repositories, wildcard installations (
*
), and excluded skills (
!
).
读取当前的
skills.yaml
文件,注意项目本地的
./skills.yaml
优先级高于全局的
~/.config/skills_sync/skills.yaml
。分析已安装的仓库、通配符安装(
*
)以及排除的skill(
!
)。

2. Identifying High-Quality Skills & Security Audit

2. 识别高质量Skill与安全审计

Recommend top-tier skills related to the user's tech stack (e.g., official repositories for Frameworks, Cloud providers, and tools the user prefers). Focus on skills that significantly enhance code quality and architectural alignment.
[TIP: Using find-skills] To discover high-quality skills across the ecosystem, you are encouraged to use the find-skills skill. It can help you search for and identify well-maintained skills that match the user's requirements.
[CRITICAL: Security and Quality Pre-Audit]
The
skills_sync
tool downloads configuration files from target repositories and lacks an inherent mechanism for deep security verification of the skill's logic itself. Therefore, before proposing new skills, you MUST research the target repository (reading SKILL.md and auditing files in scripts/, etc.) and verify the following:
  • Security Check: Ensure there are no unauthorized network communications (data leakage), destructive commands (excessive deletion permissions like
    rm -rf
    ), or suspicious obfuscated scripts.
  • Quality Check: Verify that the prompt instructions align with the user's high-quality, modern development standards. Assess risks of poor instructions or prompt injection flaws. Do not propose new skills to the user without completing this audit.
推荐与用户技术栈相关的顶级skill(例如用户偏好的框架、云服务商、工具的官方仓库),重点关注能显著提升代码质量、符合架构匹配度的skill。
【提示:使用find-skills】 为了在整个生态中发掘高质量skill,建议你使用**find-skills**这个skill。它可以帮助你搜索并识别符合用户需求、维护状况良好的skill。
【关键:安全与质量预审计】
skills_sync
工具会从目标仓库下载配置文件,本身没有对skill逻辑本身进行深度安全校验的机制。因此,在推荐新的skill之前,你必须调研目标仓库(阅读SKILL.md、审计scripts/目录下的文件等)并验证以下内容:
  • 安全检查:确保没有未授权的网络通信(数据泄露)、破坏性命令(如
    rm -rf
    这类过高的删除权限)或者可疑的混淆脚本。
  • 质量检查:验证prompt指令符合用户的高质量现代开发标准,评估指令质量差或者prompt注入漏洞的风险。 未完成该审计前请勿向用户推荐任何新skill。

3. Screening & User Verification

3. 筛选与用户确认

Identify skills that no longer fit the user's core tech stack.
  • NEVER delete skills automatically.
  • List skills as candidates for removal only if they are clearly redundant, completely irrelevant, or potentially harmful. Items kept "just in case" are generally fine to remain.
识别不再适配用户核心技术栈的skill。
  • 绝对不要自动删除skill。
  • 仅当skill明显冗余、完全不相关或者存在潜在风险时,才将其列为待移除候选。那些“以备不时之需”的skill通常可以保留。

4. Proposing the Optimization Plan

4. 提出优化方案

Present your analysis and audit results to the user:
  • Proposed Additions: List recommended new skills and explain why they suit the user's stack. Explicitly state that you have audited the sources and found no security risks.
  • Removal/Retention Confirmation: List skills considered "out-of-stack" and ask the user: "Would you like to keep these for occasional use, or remove them to save context? (If removed, they can always be re-added when needed.)"
  • Improvements: Suggest refinements for redundant skill entries or overly broad wildcard imports.
向用户展示你的分析和审计结果:
  • 推荐新增的skill:列出建议新增的skill,解释它们适配用户技术栈的原因。明确说明你已审计来源,未发现安全风险。
  • 移除/保留确认:列出被判定为“超出技术栈”的skill,并询问用户:“你希望保留这些skill供偶尔使用,还是删除它们以节省上下文空间?(如果删除,后续需要时随时可以重新添加。)”
  • 优化建议:针对冗余的skill条目或者范围过宽的通配符导入提出改进建议。

5. Applying Changes

5. 应用变更

Once the user provides their preference:
  1. Update
    skills.yaml
    based on the user's choices.
  2. Maintain the original structure of YAML comments and formatting.
  3. Ask for permission to apply changes: DO NOT run
    skills_sync sync
    automatically. Instead, ask the user if they would like to apply the configuration changes now.
  4. Execute
    skills_sync sync
    only after receiving explicit confirmation.
  5. Confirm successful synchronization with the user.
收到用户的偏好选择后:
  1. 根据用户的选择更新
    skills.yaml
  2. 保留YAML注释和格式的原有结构。
  3. 申请变更执行权限:不要自动运行
    skills_sync sync
    ,而是询问用户是否需要现在应用配置变更。
  4. 仅在收到明确确认后再执行
    skills_sync sync
  5. 向用户确认同步成功。

Best Practices

最佳实践

  • NEVER modify
    skills.yaml
    without explicit consent from the user.
  • Prefer Project-Local Config: If the user is working on a specific project, check if a project-local
    skills.yaml
    exists or should be created instead of modifying the global one.
  • Keep communication helpful, concise, and professional, adhering to any user-specific language or behavioral rules.
  • 未经用户明确同意,绝对不要修改
    skills.yaml
    文件。
  • 优先使用项目本地配置:如果用户正在开发特定项目,检查是否存在项目本地的
    skills.yaml
    ,或者是否应该创建项目本地配置而非修改全局配置。
  • 保持沟通友好、简洁、专业,遵守所有用户指定的语言或行为规则。