Community程式設計與開發github.com

MoonshotAI/consolidate

套用已核准的子技能分組,將使用者指定的技能移動到父級組合包中,並對每個修改的目錄建立含時間戳記的備份。

consolidate 是什麼?

這個技能(`sub-skill.consolidate`)負責執行技能重組的具體搬移作業,將使用者指定的子技能目錄移動到一個父級組合包中,形成階層式結構。它通常搭配 `sub-skill.review` 使用,只有在使用者核准分組提案後才會啟動。在移動任何目錄前,系統會先為每個受影響的技能目錄建立時間戳記備份(例如 `skill-name.20250315-143022.bak`),確保資料安全。接著,它會建立或更新父級組合包的 SKILL.md,確保 frontmatter 包含 `has-sub-skill: true`,然後將子技能完整目錄(包含所有文件、參考資料、範例和資產)搬入父級目錄下。搬移完成後,它會重新驗證每個 SKILL.md 的必要 frontmatter,檢查文件目錄對齊與相對連結是否正確,最後向使用者報告搬移摘要與備份位置。此技能支援所有遵循標準技能目錄結構的 AI agent 平台(如 Claude Code、Cursor、Codex),但目前不支援 Windows 環境,主要用於 macOS 或 Linux 系統。

相容平台✓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,並在 frontmatter 中加入 has-sub-skill: true。
    • 若父級組合包已存在,請確保其 frontmatter 包含 has-sub-skill: true。
  4. 將子技能移動至父級組合包。 將每個子技能的整個目錄移至父級組合包下。
    • 範例:web-search/ → web-research/web-search/
  5. 保持文件目錄對齊。 在搬移文件、參考資料、範例、資產或其他承載目錄時,請與新的技能目錄佈局對齊。
    • 保留 SKILL.md 中指向 references/、assets/、examples/ 或範本等檔案的相對連結。
    • 若子技能從 <root>/<child>/ 移至 <root>/<parent>/<child>/,其文件承載應隨該子技能一同移動,除非核准的計畫另有規定。
    • 請勿將文件遺留在舊位置,也不應將不相關的文件目錄合併在一起。
  6. 驗證結果。 列出新的目錄結構,確認每個被移動的技能仍有有效的 SKILL.md,且包含必要的 frontmatter(name 與 description)。檢查移動後的文件目錄對齊與相對連結。
  7. 報告變更。 總結移動的內容、新的結構、是否移動了文件目錄,以及備份的位置。

注意事項

  • 絕不在備份前移動技能。
  • 切勿覆蓋現有的備份 — 務必使用新的時間戳記後綴。
  • 搬移時請勿遺漏 frontmatter 或承載檔案 — 必須保留整個目錄。
  • 請勿破壞文件目錄對齊 — 參考資料、資產、範例和範本必須與使用它們的技能目錄保持一致。
  • 請勿建立過深的巢狀層級(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).

相關技能