Community编程与开发github.com

MoonshotAI/consolidate

应用已批准的子技能分组方案,将用户指定的技能移动到父包中,并对每个修改过的目录进行带时间戳的备份。

consolidate 是什么?

该技能用于执行AI代理技能的重组操作,将用户指定的多个技能目录移动到一个父包(bundle)下,形成子技能层次结构。它通常在用户批准了 `sub-skill.review` 的分组建议后使用,负责将独立的技能迁移到新的或现有的父技能包中。核心流程包括:先确认用户计划,再对所有将要修改的技能目录进行带时间戳的完整备份(使用 `cp -r` 命令,永不覆盖现有备份),然后创建或更新父包并添加上 `has-sub-skill: true` 的前置元数据,接着将子技能目录整体移动到父包下,并保持文档目录(如 `references/`、`assets/`、`examples/` 等)与技能目录的对齐。最后验证新目录结构、SKILL.md 的有效性和相对链接的正确性,并向用户报告移动结果和备份位置。该技能适用于支持子技能分层的AI代理平台(如Claude Code、Cursor等),能安全、可追溯地完成技能重组,避免数据丢失或结构混乱。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MoonshotAI/kimi-code/tree/main/packages/agent-core-v2/src/app/skillCatalog/builtin/sub-skill/consolidate

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

合并子技能(sub-skill.consolidate)

通过将用户指定的技能移动到一个父包中,形成子技能层次结构,执行重组操作。

何时使用

  • 用户已批准分组建议(通常来自 sub-skill.review)并希望应用该建议。
  • 将独立技能迁移到新的或现有的父包中。

流程

  1. 确认计划。 重述将要移动哪些技能以及移动到何处,并在进行任何文件更改之前请用户确认。
  2. 备份每个原始技能目录。 在移动任何内容之前,对每个将要修改的技能目录进行带时间戳的备份。
    • 对于位于 <root>/<skill-name>/SKILL.md 的技能,备份整个 <skill-name> 目录:
      cp -r <skill-name> "<skill-name>.$(date +%Y%m%d-%H%M%S).bak"
      
    • 保留所有备份;绝不要覆盖现有的备份文件。
  3. 创建或更新父包。
    • 如果父包不存在,则创建 <parent-name>/SKILL.md,并在前置元数据中添加 has-sub-skill: true。
    • 如果父包已存在,确保其前置元数据中包含 has-sub-skill: true。
  4. 将子技能移动到父包中。 将每个子技能的整个目录移动到父包下。
    • 示例:web-search/ → web-research/web-search/
  5. 保持文档目录对齐。 在移动文档、参考资料、示例、资源或其他内容目录时,使其与新的技能目录布局对齐。
    • 保留 SKILL.md 中指向 references/、assets/、examples/ 或模板等文件的相对链接。
    • 如果子技能从 <root>/<child>/ 移动到 <root>/<parent>/<child>/,其文档内容应随该子技能一起移动,除非已批准的计划另有规定。
    • 不要将文档遗留在旧位置,也不要将不相关的文档目录合并在一起。
  6. 验证结果。 列出新的目录结构,并确认每个移动后的技能仍然包含带有必需前置元数据(name 和 description)的有效 SKILL.md。移动后检查文档目录对齐和相对链接。
  7. 报告变更。 总结移动了哪些内容、新的结构、哪些文档目录已移动以及备份的位置。

禁止事项

  • 在未备份之前绝不要移动技能。
  • 绝不要覆盖现有的备份 — 始终使用新的时间戳后缀。
  • 移动过程中不要丢弃前置元数据或内容文件 — 必须保留整个目录。
  • 不要破坏文档目录对齐 — 参考资料、资源、示例和模板必须与使用它们的技能目录保持对齐。
  • 除非用户明确要求,否则不要创建深度嵌套的层次结构(3 层以上)。

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

MoonshotAI/agent-core-dev

Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI dependencies, splitting a domain across scopes, owning or migrating a config section, gating behavior behind an experimental flag, raising coded errors, working on the permission system, writing DI/Scope tests, porting business logic from agent-core (v1) to v2, triaging a main-branch commit against v2, or exposing a v2 domain over server-v2 while keeping the /api/v1 wire contract compatible with released clients. Self-contained guide organized by development stage (orient → design → implement → test → verify) plus align workflows for v1→v2 migration, main-branch commit triage, and server-v2 wire exposure; each file carries the rules, examples, and red lines for its step.

MoonshotAI/agent-core-review

Use ONLY for code review and test write/review guidance in `packages/agent-core-v2` (the DI × Scope agent engine). Does NOT apply to the legacy `packages/agent-core` or to any other package — for those, do not load this skill. Groups the review and testing lenses used for agent-core-v2 — `slop` (single-level-of-abstraction / layered error-handling review, invoked only on explicit request) and `test` (contract-driven per-test rules for both authoring and reviewing tests). Apply the sub-skill that matches the task; do not apply `slop` unprompted.

MoonshotAI/gen-changesets

Use when generating changesets in the kimi-code repository, including package bump selection, internal package and CLI bundle handling, bump levels, major confirmation, and English changelog wording.

MoonshotAI/gen-docs

Update Kimi Code CLI user documentation after meaningful code changes that affect product behavior or user experience.

MoonshotAI/kimi-datasource

Universal data-source assistant. Use this skill when the user wants external structured data such as stocks, financial reports, technical indicators, A-share/HK/US markets, global macroeconomics, Chinese enterprise registry information, arXiv papers, Google Scholar results, or Chinese laws/regulations and judicial cases. This plugin exposes tools via MCP server `plugin-kimi-datasource_data`; call them in the flow `mcp__plugin-kimi-datasource_data__get_data_source_desc` → `mcp__plugin-kimi-datasource_data__call_data_source_tool`.

MoonshotAI/pre-changelog

Use before merging a kimi-code release PR to preview the user-facing CLI changelog in Chinese. Reads the changelog that changesets pre-generated in the release PR, then reuses sync-changelog's strip / classify / translate logic to render a Chinese preview. Writes no files.

MoonshotAI/review

Analyze the available skill set and recommend candidate groups that could be consolidated into sub-skill bundles. Read-only — proposes a plan, does not move files.

MoonshotAI/slop

Invoke only when the user explicitly asks to review code through the "single level of abstraction / layered error handling" lens — a function does only its own layer's business logic while errors are handled above or below. The agent reports detections, raw-count measurements, and move directions. Apply only when the user explicitly requests this lens.

MoonshotAI/sub-skill

Discover and reorganize the skill inventory into hierarchical sub-skill bundles. Use when the user asks to review, group, or consolidate skills into a parent bundle.

MoonshotAI/sync-changelog

Use after a release succeeds, when maintainers need to sync apps/kimi-code/CHANGELOG.md into docs/en/release-notes/changelog.md and docs/zh/release-notes/changelog.md, then open a PR on a dedicated branch.

MoonshotAI/test

Use when writing or reviewing tests, or when asked how to write a good single test. Encodes the per-test rules behind the "test the contract / responsibility, not the implementation" principle — name and structure one behavior per `it`, drive through the public surface, stub only true external boundaries, control time and config via documented knobs, and keep tests clear, isolated, and refactor-resilient. The same rules drive both authoring (write mode) and auditing existing tests (review mode).

MoonshotAI/translate-docs

Translate and sync bilingual user documentation between docs/zh/ and docs/en/ following the source-of-truth rules in docs/AGENTS.md.

MoonshotAI/write-tui

Use when writing or modifying the kimi-code terminal UI in apps/kimi-code/src/tui — components, dialogs/selectors, slash commands, themes, streaming render, or the KimiTUI controllers. Covers the architecture, where new features go, test placement, the theme system mechanics, and the dialog interaction/visual spec (DESIGN.md).

相关技能