skills-sync
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkills Sync
Skills Sync
A skill for using the CLI tool, which is used to manage and sync AI agent skills.
skills_sync用于使用 CLI工具的技能,该工具可管理和同步AI agent技能。
skills_syncContext
上下文
The tool reads a configuration file and synchronizes the user's local skills directory (typically ) with remote repositories.
skills_sync~/.agents/skillsConfiguration Precedence:
- Project-specific:
./skills.yaml - Global:
~/.config/skills_sync/skills.yaml
Crucial Note: When another skill (like ) modifies the configuration, those changes are NOT automatically applied. You MUST run to download new skills, remove deleted ones, and apply exclusions.
skills-optimizerskills.yamlskills_sync syncskills_sync~/.agents/skills配置优先级:
- 项目专属:
./skills.yaml - 全局:
~/.config/skills_sync/skills.yaml
重要提示:当其他技能(例如)修改配置时,这些变更不会自动生效。你必须运行来下载新技能、移除已删除的技能并应用排除规则。
skills-optimizerskills.yamlskills_sync syncCommands
命令
Here are the primary commands for :
skills_sync以下是的核心命令:
skills_syncskills_sync sync
skills_sync syncskills_sync sync
skills_sync syncSynchronizes the skills based on the configuration file.
- When to use: Immediately after any modifications to or when the user requests to update their skills.
~/.config/skills_sync/skills.yaml - Action: It fetches repositories, applies includes/excludes, and ensures locally installed skills match the configuration.
根据配置文件同步技能。
- 适用场景:在修改后立即执行,或当用户请求更新其技能时执行。
~/.config/skills_sync/skills.yaml - 执行动作:拉取仓库、应用包含/排除规则,确保本地安装的技能与配置一致。
skills_sync list
skills_sync listskills_sync list
skills_sync listLists the current configuration and locally installed skills.
- When to use: To verify what is currently configured vs. what is actually installed, or to show the user their current setup.
列出当前配置和本地已安装的技能。
- 适用场景:用于校验当前配置与实际安装内容的差异,或向用户展示其当前的设置。
skills_sync config
skills_sync configskills_sync config
skills_sync configOpens the configuration file in the user's default editor (or the editor specified by ).
skills.yaml$EDITOR- When to use: When the user wants to manually edit their configuration rather than having the AI do it.
在用户默认编辑器(或环境变量指定的编辑器)中打开配置文件。
$EDITORskills.yaml- 适用场景:当用户想要手动编辑配置而非由AI完成编辑时使用。
skills_sync init
skills_sync initskills_sync init
skills_sync initGenerates the default global configuration file () if it does not exist.
~/.config/skills_sync/skills.yaml- When to use: Usually only necessary for first-time setup if the file is missing.
如果默认全局配置文件()不存在,则生成该文件。
~/.config/skills_sync/skills.yaml- 适用场景:通常仅在首次设置时需要,用于补全缺失的配置文件。
skills.yaml
Specification
skills.yamlskills.yaml
规范
skills.yamlThe file defines which skills are installed and where.
skills.yamlskills.yamlTarget Directories (Root Keys)
目标目录(根键)
- : Skills listed here are installed globally to
global.~/.agents/skills - (e.g.,
<path>): Skills listed here are installed locally to~/Git/my-projectwithin the specified project directory. If the referenced path does not exist on the user's filesystem,.agents/skillswill skip it without error.skills_sync
- :此处列出的技能会被全局安装到
global。~/.agents/skills - (例如
<路径>):此处列出的技能会被安装到指定项目目录下的~/Git/my-project中。如果引用的路径在用户文件系统中不存在,.agents/skills会跳过该路径且不会报错。skills_sync
Skill Sources
技能来源
Under each target directory, you define the sources to fetch skills from:
- : A shorthand for a GitHub repository.
owner/repo - : A specific branch or folder in a repository.
https://github.com/owner/repo/tree/branch - : A local directory containing skills.
/local/path/to/skills
在每个目标目录下,你需要定义拉取技能的来源:
- :GitHub仓库的简写形式。
owner/repo - :仓库中的特定分支或文件夹。
https://github.com/owner/repo/tree/branch - :包含技能的本地目录。
/local/path/to/skills
Skill Selection (Filters)
技能选择(过滤器)
For each source, you can specify a list of filters to determine which skills to install:
- Empty / Null: If no filters are provided (just an empty key), all skills from the source are installed.
- Specific Names: Provide the exact name of the skill (e.g., ).
flutter-expert - Wildcards (): Use wildcards to match multiple skills (e.g.,
*installs all skills starting withflutter-*).flutter- - Exclusions (): Prefix a pattern with
!to exclude matching skills (e.g.,!skips skills ending in!*-legacy). Exclusions take precedence over inclusions.-legacy
对于每个来源,你可以指定过滤器列表来决定要安装的技能:
- 空/Null:如果未提供过滤器(仅为空键),则安装来源中的所有技能。
- 指定名称:提供技能的精确名称(例如)。
flutter-expert - 通配符():使用通配符匹配多个技能(例如
*会安装所有以flutter-*开头的技能)。flutter- - 排除规则():在模式前添加
!前缀以排除匹配的技能(例如!会跳过所有以!*-legacy结尾的技能)。排除规则优先级高于包含规则。-legacy
Workflow Integration (e.g., with skills-optimizer
)
skills-optimizer工作流集成(例如与skills-optimizer
集成)
skills-optimizerIf you are modifying the user's (e.g., adding or removing skills):
skills.yaml- Identify the config file: Check if a project-local exists. If not, use the global
skills.yaml.~/.config/skills_sync/skills.yaml - Modify the configuration: Edit the identified file according to the user's instructions or your optimization logic.
skills.yaml - Apply the changes: Execute via the command line to ensure the changes take effect.
skills_sync sync - Verify: Optionally, run to confirm the installation matches expectations.
skills_sync list
如果你要修改用户的(例如添加或移除技能):
skills.yaml- 识别配置文件:检查是否存在项目本地的,如果不存在,则使用全局的
skills.yaml。~/.config/skills_sync/skills.yaml - 修改配置:根据用户指令或你的优化逻辑编辑识别到的文件。
skills.yaml - 应用变更:通过命令行执行以确保变更生效。
skills_sync sync - 校验:可选步骤,运行确认安装结果符合预期。
skills_sync list
Best Practices
最佳实践
- Do not execute automatically: NEVER run
syncwithout explicit user permission. Always ask the user if they want to apply the changes after you have modified the configuration.skills_sync sync - Transparency in Configuration: Do not modify silently. Clearly explain which skills you are adding or removing and why, ensuring the user maintains full awareness of their installed skills at all times.
skills.yaml - Do not guess file paths: Always rely on the tool to handle the installation logic, cloning, and copying. Don't try to manually download zip files or clone repos with
skills_synctogitunless specifically requested to bypass the tool.~/.agents/skills - Wait for completion: might take a moment if it needs to download large repositories. Allow the command to finish.
skills_sync sync - Dry runs are not currently supported: If you change the yaml and run sync, it will make destructive changes (deleting unlisted skills). Be sure of the user's intent before syncing after a configuration removal.
- 不要自动执行命令:切勿在未获得用户明确许可的情况下运行
sync。修改配置后,务必询问用户是否要应用变更。skills_sync sync - 配置修改透明化:不要静默修改。要清晰解释你正在添加或移除的技能及其原因,确保用户始终完全了解其已安装的技能情况。
skills.yaml - 不要猜测文件路径:始终依赖工具处理安装逻辑、克隆和复制操作。除非明确要求绕过该工具,否则不要尝试手动下载zip文件或使用
skills_sync将仓库克隆到git。~/.agents/skills - 等待执行完成:如果需要下载大型仓库,可能需要一定时间,请等待命令执行完毕。
skills_sync sync - 当前不支持试运行:如果你修改了yaml文件并运行sync命令,会执行破坏性变更(删除未列出的技能)。在移除配置后执行同步前,请务必确认用户的意图。