跳到正文
cccskills
免费在 GitHub 公开

kilocode-merge-minimizer

Keep Kilo-specific changes small in files shared with upstream OpenCode. The skill guides where to place custom logic and tests, how to mark changes, and how to check annotations while preserving behavior.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Use when changing shared upstream-owned files to add Kilo-specific behavior, editing `kilocode_change` markers in shared code, or moving additive behavior out of shared code to reduce upstream merge conflicts. Do not use for changes confined to Kilo-owned paths such as `packages/kilo-vscode/` or `packages/kilo-ui/`.

实测评分 未实测

查看安装方法

适用场景

  • Add Kilo-specific features to shared upstream code
  • Move additive logic into Kilo-owned files
  • Clean up outdated or overly broad change markers
  • Check annotations after editing shared files

包含的文件(1)

  • SKILL.md6.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Kilo Merge Minimizer

Use this skill whenever a normal development task touches shared upstream-owned code and includes Kilo-specific behavior, especially for marker cleanup, extraction work, or kilocode_change annotations.

Do not use this skill when all changes are confined to Kilo-owned paths, including packages/kilo-vscode/, packages/kilo-ui/, and paths with kilocode in their name. Those files are not merged from upstream and do not need merge-minimization guidance. If a task also touches shared upstream-owned code, use this skill for the shared portion only.

Do not use this as the primary guide for upstream merge resolution. Upstream merges have their own instructions and should not duplicate that workflow here.

Goal

Minimize Kilo's long-term diff against upstream OpenCode while preserving behavior.

Prefer this shape for Kilo-specific additions:

  1. Shared upstream file contains only a minimal hook, import, call, registration, or config entry.
  2. Kilo-specific behavior lives in Kilo-owned code.
  3. Unavoidable shared-file changes have narrow kilocode_change markers.
  4. The annotation checker passes.

For changes to existing upstream behavior, prefer the smallest in-place shared-file diff with narrow markers. Do not move changed upstream logic into Kilo-owned code just to avoid textual conflicts, because that can create harder semantic merge conflicts.

Core Rules

  • Use script/check-opencode-annotations.ts as the source of truth for current shared scopes and exempt paths.
  • Use script/upstream/fix-kilocode-markers.ts for stale or broad markers, inspecting --dry-run output before applying changes.
  • Treat upstream-owned files as shared unless the checker or repo ownership rules exempt them.
  • Put Kilo-owned UI, CLI, runtime logic, and tests in Kilo-owned paths where practical.
  • Avoid adding Kilo business logic directly to shared files.
  • Keep shared-file edits as close as possible to upstream shape.
  • Do not change shared files unless the change is required for Kilo functionality, fixes a Kilo bug, or is a minimal targeted upstream-quality fix.
  • Do not create a large Kilo-only fork for a general upstream-quality improvement. Prefer a minimal targeted fix, or leave the broader change for upstream.
  • Do not duplicate upstream logic unless there is a concrete reason. If duplication is unavoidable, isolate the Kilo delta and keep the upstream dependency obvious.

Shared File Structure

  • Do not refactor, rename, split files, or extract helpers in shared files just to improve readability or make Kilo extraction cleaner.
  • Avoid structural changes that make upstream behavior harder to compare or hide semantic dependency on upstream code.

Shared File Style

  • Preserve upstream formatting and import style in shared files, even when it differs from Kilo style.
  • Put Kilo-only imports on separate marked lines instead of reorganizing upstream imports.

Decision Rules

Extract Kilo logic when:

  • The change is an additive Kilo feature or integration, not a modification of existing upstream behavior.
  • The shared-file change has meaningful Kilo-owned behavior, not just a tiny condition, import, registration, or field.
  • The code has loops, branching, error handling, async workflows, storage access, network calls, UI rendering, or telemetry.
  • The shared file can become a small orchestrator that calls Kilo helpers.
  • The Kilo code is independent enough that extraction will not hide future upstream fixes or behavior changes.

Keep the change inline when:

  • The Kilo delta is a single field, import, call, simple condition, or small registry entry.
  • Extraction would reshape upstream code more than the Kilo change itself.
  • The change modifies an upstream algorithm, ordering, heuristic, control flow, or bug fix.
  • Extraction would duplicate upstream logic or hide semantic dependency on upstream behavior.
  • The Kilo helper closes over upstream-local state. Keep closure-scoped helpers inline and contiguous in one narrow marker block.
  • The shared file owns the only route table, enum, schema, switch, or registry where the hook must exist.
  • The change restores upstream shape or removes a stale Kilo divergence.

Always preserve upstream behavior order unless the Kilo behavior change is intentional and tested.

Marker Rules

  • Mark only Kilo-specific diff lines in shared upstream files.
  • Prefer inline markers for single-line changes: const value = 42 // kilocode_change.
  • Use block markers only for adjacent Kilo-specific lines:
// kilocode_change start
registerKiloFeature(app)
// kilocode_change end
  • Use the file's native comment style, including JSX block comments inside JSX and # comments for YAML, TOML, and shell.
  • Do not add markers in checker-exempt Kilo-owned paths.
  • Remove stale markers when upstream already contains the behavior or when touching Kilo-owned files that still have old markers.
  • Use // kilocode_change - new file only for unavoidable new Kilo-specific files inside shared upstream paths.

Tests

  • Put Kilo-specific CLI/runtime tests in Kilo-owned test paths.
  • Move tests out of shared upstream test paths when the behavior under test is Kilo-specific.
  • Tests should cover the real failing path, not private or unstable APIs chosen only for convenience.
  • Do not add skip gates for required regression coverage.

Verification

After editing shared files or marker comments, run:

bun run script/check-opencode-annotations.ts --worktree

If checking committed PR changes against a non-default comparison base, pass the correct base ref without --worktree:

bun run script/check-opencode-annotations.ts --base <base-ref>

For stale or broad markers in one shared file, inspect the dry run before applying:

bun run script/upstream/fix-kilocode-markers.ts <repo-relative-file> --dry-run

Before finishing, confirm:

  • Shared files contain minimal integration points only.
  • Kilo logic and tests live in Kilo-owned paths where practical.
  • Markers are narrow.
  • Stale markers are removed.
  • The annotation checker passed, or the reason it could not run is reported.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

chart

免费

Creates charts from numerical data using the chart tool and Chart.js v4. Supports bars, lines, pies, scatter plots, and other formats to show comparisons, trends, proportions, and relationships, with options for dataset colors and mixed charts.

中文简介正在准备中。当前显示英语简介。

  • Comparing values across categories with a bar chart
  • Showing monthly changes with a line chart
  • Displaying proportions with a pie or doughnut chart
Kilo-Org/kilocode2.8万2026年10月23日 更新

effect

免费

Develop TypeScript services and workflows with Effect v4 by checking its source and existing project examples. Guides data schemas, typed errors, explicit dependencies, and tests that follow the project's established patterns.

中文简介正在准备中。当前显示英语简介。

  • Implementing services with Effect v4
  • Defining data schemas and typed errors
  • Organizing dependencies and HTTP handlers
Kilo-Org/kilocode2.8万2026年10月23日 更新

gh-issues

免费

Create and manage GitHub issues for the Kilo VS Code extension or JetBrains plugin using gh, GitHub's command-line tool. Guides template selection, clear titles, required project board assignment, and authentication permissions.

中文简介正在准备中。当前显示英语简介。

  • Reporting a bug in the VS Code extension
  • Requesting a feature for the JetBrains plugin
  • Filing usage or design questions
Kilo-Org/kilocode2.8万2026年10月23日 更新

Create and review SVG icons for IntelliJ New UI. Choose sizes by interface role, prepare matching light and dark versions, refine shapes and strokes, and place the assets in the plugin’s resource folders.

中文简介正在准备中。当前显示英语简介。

  • Creating icons for actions and tool windows
  • Preparing matching light and dark SVG versions
  • Adapting existing icons to a 16×16 canvas
Kilo-Org/kilocode2.8万2026年10月23日 更新

Create and review icons for Kilo’s VS Code extension and webviews, the extension’s embedded interface panels. Choose existing icons or suitable SVG assets, register them correctly, and check theme appearance and accessible button names.

中文简介正在准备中。当前显示英语简介。

  • Choosing icons for commands, menus, and view containers
  • Adding icons to webview registries
  • Rescaling SVGs while preserving visual weight
Kilo-Org/kilocode2.8万2026年10月23日 更新

Guides development across the Kilo JetBrains plugin’s shared, frontend, and backend modules. Explains remote calls between modules, UI thread rules, dependency packaging, and testing practices, including serialization failures that require checks in a running IDE.

中文简介正在准备中。当前显示英语简介。

  • Placing new code in the appropriate plugin module
  • Defining frontend and backend communication
  • Reviewing UI threading and coroutine usage
Kilo-Org/kilocode2.8万2026年10月23日 更新

查看 Kilo-Org 的全部技能

报告此技能的问题