Skip to content

feat: add Kilo CLI (KiloCode) as fully supported platform#146

Open
Exc1D wants to merge 4 commits intotirth8205:mainfrom
Exc1D:feat/kilocode-support
Open

feat: add Kilo CLI (KiloCode) as fully supported platform#146
Exc1D wants to merge 4 commits intotirth8205:mainfrom
Exc1D:feat/kilocode-support

Conversation

@Exc1D
Copy link
Copy Markdown

@Exc1D Exc1D commented Apr 8, 2026

Summary

Adds Kilo CLI (KiloCode) as a first-class supported platform — MCP config, auto-detection, platform instructions, AND Kilo-native skill files.

Changes

code_review_graph/skills.py

1. MCP config: kilocode platform entry

Added kilocode to the PLATFORMS dict:

  • config_path: .opencode/opencode.jsonc (Kilo stores config inside .opencode/ dir — the only structural difference from OpenCode)
  • detect: checks for .opencode/opencode.jsonc existence
  • format, key, needs_type: identical to OpenCode

2. Skill files: generate_kilo_skills()

New function that generates 4 skill files to .kilocode/skills/:

Skill file Purpose
explore-codebase.md Navigate codebase using graph tools
review-changes.md Risk-scored code review workflow
debug-issue.md Graph-powered systematic debugging
refactor-safely.md Dependency-aware refactoring

Each skill mirrors the Claude Code .claude/skills/ versions — same body, same frontmatter, just in Kilo's skill directory.

code_review_graph/cli.py

  • Added generate_kilo_skills to imports
  • init now calls both generate_skills() and generate_kilo_skills()
  • Print output distinguishes Claude Code vs Kilo skills

docs/USAGE.md

  • Added Kilo CLI to the supported platforms table
  • Fixed OpenCode's config path (was incorrectly listed as .opencode/config.json)

Platform comparison

What gets installed Claude Code OpenCode Kilo CLI Cursor Windsurf
MCP server config .mcp.json .opencode.json .opencode/opencode.jsonc .cursor/mcp.json ~/.codeium/...
AGENTS.md (graph instructions) ✓ (inherits)
Platform skill files .claude/skills/ .kilocode/skills/

Testing

# Auto-detect all platforms including Kilo CLI
code-review-graph install

# Init Claude Code + Kilo CLI skill files
code-review-graph init

# Preview Kilo MCP config
code-review-graph install --platform kilocode --dry-run

Note

The README's diagram8_supported_platforms.png shows supported platforms visually and will need to be regenerated to include Kilo CLI. Left unchanged since it requires the maintainer's design tools.

Exc1D added 2 commits April 8, 2026 12:09
Kilo CLI is a fork of OpenCode and uses the same MCP server format.
It stores its config at .opencode/opencode.jsonc (vs OpenCode's
.opencode.json at repo root), so a separate platform entry is needed.

Changes:
- Add 'kilocode' platform entry to PLATFORMS dict in skills.py
  - config_path: repo/.opencode/opencode.jsonc
  - detect: checks for .opencode/opencode.jsonc existence
  - format/object/needs_type: same as OpenCode
- Add 'kilocode' to --platform choices in both install and init
  subcommands in cli.py
- Update docs/USAGE.md platform table with Kilo CLI entry and
  fix OpenCode config path (.opencode/config.json -> .opencode.json)
Adds generate_kilo_skills() which writes 4 skill files to .kilocode/skills/:
- explore-codebase.md
- review-changes.md
- debug-issue.md
- refactor-safely.md

Each skill has identical body to Claude Code versions but lives in
.kilocode/skills/ so Kilo CLI agents can discover and use them.

Also updated CLI to call generate_kilo_skills() during init and
made the print message distinguish Claude Code vs Kilo skills.
@Exc1D Exc1D changed the title feat: add Kilo CLI (KiloCode) as supported platform feat: add Kilo CLI (KiloCode) as fully supported platform Apr 8, 2026
Exc1D added 2 commits April 8, 2026 12:31
Kilo skills must be a directory containing SKILL.md, not flat .md files.
Fixes: .kilocode/skills/explore-codebase/SKILL.md (not .md directly)
Copy link
Copy Markdown
Owner

@tirth8205 tirth8205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding Kilo CLI support! The platform entry follows our patterns well. A few things to address:

  1. No tests. Every other platform has tests in test_skills.py (see TestPlatformInstall). Please add tests for generate_kilo_skills() and the kilocode platform config.

  2. JSONC parsing issue. The config path is .opencode/opencode.jsonc — JSONC allows comments, but our install_platform_configs reads with json.loads() which will crash on commented files. This would silently destroy the user's config (caught by the try/except, but the file gets overwritten). Consider using a JSONC-tolerant reader or documenting this limitation.

  3. Kilo skills generated unconditionally. init calls generate_kilo_skills() regardless of whether Kilo is installed. This creates a .kilocode/ directory in every repo. Should this be gated behind detection or --platform kilocode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants