feat: add Kimi Code CLI support - #17
Merged
Merged
Conversation
Kimi Code (https://www.kimi.com/code) ships a `kimi` CLI with the same user-level Agent Skills mechanism Codex and Copilot use, so it slots into the existing generate/install pipeline: - tools/generate derives .kimi-code/skills/<name>/SKILL.md alongside the other harnesses; setup installs them to $KIMI_CODE_HOME/skills (default ~/.kimi-code/skills), where Kimi invokes them as /skill:<name> - setup detects `kimi`, offers it in tool selection, and configures MCP servers by writing ~/.kimi-code/mcp.json directly — Kimi has no `mcp add` subcommand, only the interactive /mcp-config TUI editor - review loops accept `kimi` as an --editor/--reviewer agent, running it as `kimi -p <prompt>`; non-interactive mode already uses auto permission mode and rejects --yolo/--auto alongside --prompt The gh agent skill and Impeccable steps skip Kimi: neither has an identifier for it. Its permission rules live in config.toml as a [[permission.rules]] array of tables rather than a JSON allow-list, so setup leaves MCP auto-approval to the user, as it does for Codex.
Greptile SummaryAdds Kimi Code CLI as a supported harness.
|
| Filename | Overview |
|---|---|
| setup | Adds Kimi discovery, skill installation, KIMI_CODE_HOME handling, and MCP JSON configuration without an identified defect. |
| lib/lib-review-loop | Registers Kimi as an editor or reviewer and dispatches non-interactive prompts through kimi -p. |
| tools/generate | Extends the existing deterministic skill-generation pipeline to the Kimi output directory. |
| test/smoke | Includes installed Kimi clients in the existing editor and reviewer smoke-test flow. |
| README.md | Documents Kimi installation, skill invocation, MCP behavior, review-loop support, limitations, and removal. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Claude command sources] --> B[tools/generate]
B --> C[.kimi-code/skills]
C --> D[setup]
D --> E[$KIMI_CODE_HOME/skills]
D --> F[$KIMI_CODE_HOME/mcp.json]
G[Review loops] --> H[lib-review-loop]
H --> I[kimi -p prompt]
Reviews (1): Last reviewed commit: "feat: add Kimi Code CLI support" | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Kimi Code (the
kimiCLI) as a fifth supported harness.Kimi discovers user-level Agent Skills as
SKILL.mddirectories, the same mechanism Codex and Copilot use, so it slots into the existing generate → install pipeline without a new command format.Changes
tools/generate— derives.kimi-code/skills/<name>/SKILL.mdalongside the Codex/Copilot/Antigravity skills, from the same.claude/commands/*.mdsources. The 6 generated skill files are committed.setup— detectskimi, offers it in tool selection, and installs skills to$KIMI_CODE_HOME/skills(default~/.kimi-code/skills), where Kimi invokes them as/skill:<name>. MCP servers are configured by writing~/.kimi-code/mcp.jsondirectly: Kimi has nomcp addsubcommand, only the interactive/mcp-configTUI editor. Akimi_homehelper honors theKIMI_CODE_HOMEoverride throughout.lib/lib-review-loop—kimiis now a valid--editor/--revieweragent, run askimi -p <prompt>. Non-interactive mode already uses auto permission mode, and Kimi rejects--yolo/--autowhen combined with--prompt, so no approval flags are passed.test/generate.batscovers drift in the new skill dir,test/lib-review-loop.batsvalidates the new agent name,test/smokeincludeskimiin its agent list..pre-commit-config.yamlwatches.kimi-code/skills/for generated-file drift./skill:usage lines, config docs, MCP notes, and uninstall path.Deliberately skipped
ghagent skill and Impeccable — neither has an identifier for Kimi, so both steps skip it (the existing empty-id guards handle this; no new branching).config.tomlas a[[permission.rules]]array of tables rather than a JSON allow-list, sosetupleaves them to the user, as it already does for Codex.Known limitations (documented in the README)
kimi -ptakes the prompt as an argv with no stdin form, so on Windows/Git Bash a very large review-loop prompt can hit the ~32 KB OS argument limit — the same limitation Copilot has.~/.kimi-code/mcp.json(Claude, Codex, and Copilot runs disable theirs).Verification
tools/generate --check— in synctest/run— 47/47 passingshellcheck -xonsetup,lib/lib-review-loop,tools/generate, both review loops,test/smoke— cleanmarkdownlint-cli2 README.md— cleaninstall_commandsand the MCP helpers against a throwaway$HOME: 6 skills installed with the source marker, re-run reports all 6 up to date,mcp.jsonwritten with the expected shape, andKIMI_CODE_HOMErespected.Smoke tests against the real
kimiCLI were not run — it is not installed in this environment.🤖 Generated with Claude Code
https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
Generated by Claude Code