kilocode
AGENTS.md27k starsChanged 4 months agoMITView on GitHub
Kilo CLI is an open source AI coding agent that generates code from natural language, automates tasks, and supports 500+ AI models.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about Kilo-Org/kilocode
- agentskills/agentskills“Proposal: include a standard folder where agent skills should be”GitHub · Dec 19, 2025 · 271 reactions
- lmstudio-ai/lmstudio-bug-tracker“300 second timeout when using LM Studio server”GitHub · Aug 28, 2025 · 13 reactions
- headroomlabs-ai/headroom“[FEATURE] headroom wrap support for Kilo Code (VS Code, CLI, Cloud)”GitHub · Jun 14, 2026 · 12 reactions
- microsoft/vscode“Worktrees that previously showed in the sidebar no longer visible after update to v1.115.0”GitHub · Apr 9, 2026 · 8 reactions
- @github-trending.bsky.social“💎 Hidden Gem! 💎 (1000+ new stars) 📦 Kilo-Org / kilocode ⭐ 21,424 (+1,339) 🗒 TypeScript Kilo is the …”Bluesky · Jun 18, 2026 · 5 likes
The biggest 5 of 69 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 69
Talked about on GitHub, Bluesky and Hacker News (69 times).
On GitHub · 50
- Dec 19, 2025Proposal: include a standard folder where agent skills should be — agentskills/agentskills271 reactions · 130 comments
- Aug 28, 2025300 second timeout when using LM Studio server — lmstudio-ai/lmstudio-bug-tracker13 reactions · 14 comments
- Jun 14, 2026[FEATURE] headroom wrap support for Kilo Code (VS Code, CLI, Cloud) — headroomlabs-ai/headroom12 reactions · 5 comments
- Apr 9, 2026Worktrees that previously showed in the sidebar no longer visible after update to v1.115.0 — microsoft/vscode8 reactions · 4 comments
- May 8, 2026feat(opencode): Add support for reading and editing files in legacy encodings — anomalyco/opencode4 reactions · 9 comments
45 more on GitHub
- Sep 13, 2026fix(mobile): bound per-token stream work so long reasoning runs survive — Kilo-Org/cloud3 reactions · 1 comment
- Jul 30, 2026feat(cli-sessions): remote CLI session lifecycle — /exit verification, stop→send recovery, /clear, /new inheritance, org spawn, rename sync, delayed ready push — Kilo-Org/cloud3 reactions · 1 comment
- Mar 5, 2026Add phase param support Custom LLMs — Kilo-Org/cloud3 reactions · 1 comment
- Feb 19, 2026docs: fix broken links in code reviewer overview — Kilo-Org/kilo3 reactions · 2 comments
- Feb 18, 2026feat: import kilocode-docs with full history — Kilo-Org/kilo3 reactions · 2 comments
- Feb 17, 2026feat: Add one-click apply fixes suggestions to review mode — Kilo-Org/kilo3 reactions · 1 comment
- Nov 20, 2026chore(deps): bump @kilocode/sdk from 7.8.27 to 7.8.31 — Kilo-Org/kilo-desktop2 reactions · 3 comments
- Nov 20, 2026chore(deps): bump the kilo-cli group with 5 updates — Kilo-Org/kilo-desktop2 reactions · 5 comments
- Nov 19, 2026fix(extension): make Disconnect stick and show each local agent failure — Kilo-Org/cloud2 reactions · 2 comments
- Nov 19, 2026fix(extension): let a navigate redirect land on an origin the call may already open or read — Kilo-Org/cloud2 reactions · 1 comment
- Nov 17, 2026Add Countersign remote MCP server — Kilo-Org/kilo-marketplace2 reactions · 1 comment
- Oct 30, 2026Add FairValid verification and FairMatch MCP server — Kilo-Org/kilo-marketplace2 reactions · 1 comment
- Oct 27, 2026test(cloud-agent): cover the local Kilo facade end to end — Kilo-Org/cloud2 reactions · 2 comments
- Oct 27, 2026feat(cloud-agent): expose hosted system event feed — Kilo-Org/cloud2 reactions · 1 comment
- Sep 20, 2026All Kilo Gateway requests are 429 — Kilo-Org/cloud2 reactions · 3 comments
- Sep 17, 2026feat(web): add require_approval_for_config_edits to config schema — Kilo-Org/cloud2 reactions · 3 comments
- Sep 1, 2026fix(gateway): decode bounded Zstandard inference requests — Kilo-Org/cloud2 reactions · 3 comments
- Aug 30, 2026test(browser-task): verify delegated jobs and recovery — Kilo-Org/cloud2 reactions · 3 comments
- Aug 15, 2026feat(session): link sessions to their pull request — Kilo-Org/cloud2 reactions · 2 comments
- Jul 28, 2026docs(workflow): learnings from the docs-sync repro gate — Kilo-Org/cloud2 reactions · 3 comments
- Jul 27, 2026chore: add REVIEW.md with repository-specific automated review guidance — intersoftdatalabs-in/percussioncms2 reactions · 1 comment
- Jul 27, 2026fix(web): add web search CLI config schema — Kilo-Org/cloud2 reactions · 1 comment
- Jul 16, 2026feat(mobile): create sessions on local runtimes — Kilo-Org/cloud2 reactions · 2 comments
- Jul 13, 2026Fix remote CLI session UX in mobile — Kilo-Org/cloud2 reactions · 1 comment
- Jun 18, 2026feat(web): add GitHub star giveaway notification — Kilo-Org/cloud2 reactions · 1 comment
- Jun 17, 2026Fix reasoning not working for MiniMax Coding Plan — Kilo-Org/cloud2 reactions · 1 comment
- Jan 17, 2026feat(agents): add kilocode CLI agent — BloopAI/vibe-kanban2 reactions · 2 comments
- Oct 12, 2026Native support for Kilo CLI(OpenRouter 用量领先的 CLI Agent) — spacering-net/codeg1 reaction
- Aug 28, 2026Kilo Code CLI integration: plugin never loaded, agent start --kind kilo always times out (unknown state) — herdrdev/herdr1 reaction · 1 comment
- May 19, 2026[Feature]: Isolate TUI approval prompt focus from composer input — cogine-ai/cliq-agent1 reaction · 1 comment
- May 10, 2026Internal server error: unhashable type: 'dict' with Kimi K2.6 via Nvidia NIM — anomalyco/opencode1 reaction · 4 comments
- Apr 23, 2026Looking forward to Roo Code bringing more surprises. Sunsetting Roo Code (Extension, Cloud, and Router) - Looking for an alternative — RooCodeInc/Roo-Code1 reaction · 2 comments
- Mar 10, 2026PI SDK ModelRegistry ignores env vars for Kilocode provider — all models show configured,missing — openclaw/openclaw1 reaction · 2 comments
- Jan 19, 2026[UPDATE] KiloCode — PackmindHub/coding-agents-matrix1 reaction
- Sep 12, 2025please add support for kilo code `Kilo-Org/kilocode` — github/spec-kit1 reaction · 3 comments
- Jun 26, 2025Use upstream_inference_cost for OpenRouter BYOK cost calculation — RooCodeInc/Roo-Code1 reaction
- Nov 25, 2026[intel] tool-releases:Kilo-Org-kilocode@v7.8.32 - Re-verify AIRT-0051 Kilo Code: 1 release(s) of Kilo-Org/kilocode mention a path or storage change — depalmar/ai-dfir-toolkit0 reactions
- Nov 25, 2026Kilo Code: legacy CLI tasks not read; KILO_DB override ignored — jhlee0409/omnilogue0 reactions
- Nov 23, 2026Upstream: Kilo Code CLI 7.8.28 to 7.8.32 — sidharthpunathil/hashi0 reactions
- Oct 27, 2026bug(web): /exit in remote CLI sessions incorrectly uses send_command instead of exit_cli — Kilo-Org/cloud0 reactions
- Oct 23, 2026[mcp] Validate OAuth redirect URLs to block non-HTTP(S) schemes — ausardcompany/alexi0 reactions · 1 comment
- Oct 12, 2026[command] Add Ctrl+PageUp/PageDown keyboard shortcuts for session tab navigation — ausardcompany/alexi0 reactions · 1 comment
- Oct 9, 2026Support Kilo CLI — treeleaves30760/all-code0 reactions
- Oct 7, 2026Try kilo code — conorbronsdon/agent-context-os0 reactions
- Sep 20, 2026[Feature]: space xai (Grok) OAuth login — MiniMax-AI/minimax-code0 reactions · 1 comment
On Bluesky · 17
- Jun 18, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 Kilo-Org / kilocode ⭐ 21,424 (+1,339) 🗒 TypeScript Kilo is the all-in-one agentic engineering… — @github-trending.bsky.social5 likes and reposts · 1 reply
- Apr 25, 2026📦 Kilo-Org / kilocode ⭐ 18,548 (+48) 🗒 TypeScript Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster… — @github-trending-js.bsky.social2 likes and reposts
- Dec 30, 2025📦 Kilo-Org / kilocode ⭐ 13,604 (+37) 🗒 TypeScript Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster… — @github-trending-js.bsky.social2 likes and reposts
- Sep 7, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 Kilo-Org / kilocode ⭐ 8,500 (+299) 🗒 TypeScript Open Source AI coding assistant for planning,… — @github-trending.bsky.social2 likes and reposts
- Sep 7, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 Kilo-Org / kilocode ⭐ 8,500 (+299) 🗒 TypeScript Open Source AI coding assistant for planning,… — @github-trending-js.bsky.social2 likes and reposts
12 more on Bluesky
- Aug 10, 2025📦 Kilo-Org / kilocode ⭐ 6,603 (+36) 🗒 TypeScript Open Source AI coding assistant for planning, building, and fixing code. We're a… — @github-trending-js.bsky.social2 likes and reposts
- Jun 30, 2025📦 Kilo-Org / kilocode ⭐ 1,675 (+64) 🗒 TypeScript Open Source AI coding assistant for planning, building, and fixing code. We're a… — @github-trending-js.bsky.social2 likes and reposts
- Oct 3, 2026🚀 GitHub Intelligence Drop kilocode (TypeScript • 🟢) ⭐ 27.5K → https://github.com/Kilo-Org/kilocode bgfx (C++ • 🟢) ⭐ 17.5K →… — @githubfeed.bsky.social1 likes and repost
- Jun 18, 20269. https://github.com/Kilo-Org/kilocode - TypeScript, 1339 stars today 10. https://github.com/makeplane/plane - TypeScript, 610 stars today… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost
- Jan 11, 2026📦 Kilo-Org / kilocode ⭐ 13,933 (+33) 🗒 TypeScript Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster… — @github-trending-js.bsky.social1 likes and repost
- Dec 4, 2025📦 Kilo-Org / kilocode ⭐ 12,918 (+48) 🗒 TypeScript Open Source AI coding assistant for planning, building, and fixing code. We frequently… — @github-trending-js.bsky.social1 likes and repost
- Sep 10, 2025⭐ We are at 9,500 GitHub stars and closing in on 10,000 ⭐ To celebrate this milestone, once we hit 10,000 stars everyone gets $10 in AI… — @kilocode.ai1 likes and repost
- Jul 20, 2025🔥 Hot Repo! 🔥 (100+ new stars) 📦 Kilo-Org / kilocode ⭐ 5,030 (+100) 🗒 TypeScript Open Source AI coding assistant for planning,… — @github-trending-js.bsky.social1 likes and repost
- Jun 19, 20267. Kilo-Org / kilocode LINK 8. AA-Briefcase Benchmark Tests Long-Horizon Knowledge Work; Claude Fable 5 Leads at $31/Task LINK — @hackobar.bsky.socialsays it tested it0 likes and reposts · 1 reply
- Jun 18, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 Kilo-Org / kilocode ⭐ 21,424 (+1,339) 🗒 TypeScript Kilo is the all-in-one agentic engineering… — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Aug 27, 2025..automatically. Read more: blog.kilocode.ai/p/kilo-code-... And support us on Github so more people find about our repo:… — @kilocode.ai0 likes and reposts · 1 reply
- Aug 10, 2025ソースコードは、 github.com/Kilo-Org/kil... にあり、DEVEMOPMENT.md にかかれている通りにセットアップすれば手元のマシンで動かすことができます。 — @gakuueda.bsky.social0 likes and reposts · 1 reply
On Hacker News · 2
- Jan 22, 2026Kilo CLI – Agentic Orchestration from the Terminal5 points · 1 comment
- Aug 9, 2025Kilo Code: Open-Source VS Code AI Agent- Merged Features from Roo Code and Cline2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
36 rules. About 0 are common, 13 are distinctive, and 23 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
23
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 5
ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- Distinctive: line 7
Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
- Very specific: line 18
CLI build artifact size check: after bun run script/build.ts --single --skip-install in packages/opencode/, use du -h dist/*/*/bin/kilo …
- Very specific: line 19
SDK regen: After changing server endpoints in packages/opencode/src/server/, run ./script/generate.ts from root to regenerate …
- Very specific: line 21
Source links: After adding or changing URLs in packages/kilo-vscode/, packages/kilo-vscode/webview-ui/, or packages/opencode/src/, run bun …
- Very specific: line 24
Effect facade ratchet: Do not add runtime-backed Promise facades to shared packages/opencode/src Effect services.
- Very specific: line 41
Never run root bun test; the root script prints do not run tests from root and exits with code 1.
- Very specific: line 45
All products are clients of the CLI (packages/opencode/), which contains the AI agent runtime, HTTP server, and session management.
- Very specific: line 60
When a task primarily touches packages/kilo-jetbrains/, read packages/kilo-jetbrains/AGENTS.md before planning or editing.
- Very specific: line 80
Use conventional commit-style messages and PR titles: type(scope): summary.
- Distinctive: line 88
Keep things in one function unless composable or reusable
- Very specific: line 89
Avoid unnecessary destructuring.
- Very specific: line 90
Avoid possibly out-of-bounds array access.
- Very specific: line 91
Avoid try/catch where possible
- Very specific: line 92
Avoid using the any type
- Distinctive: line 93
Prefer single word variable names where possible
- Very specific: line 94
Use Bun APIs when possible, like Bun.file()
- Very specific: line 96
Always use Promise.withResolvers<T>() to create deferred promises.
- Very specific: line 97
Use ref == null to check for both null and undefined instead of ref === undefined || ref === null.
- Very specific: line 101
Prefer const. Replace let + if/else assignment with a ternary or an IIFE.
- Distinctive: line 107
Use single word names by default for new locals, params, and helper functions.
- Distinctive: line 109
Do not introduce new camelCase compounds when a short single-word alternative is clear.
- Distinctive: line 110
Before finishing edits, review touched lines and shorten newly introduced identifiers where possible.
- Very specific: line 116
Prefer early returns (or an IIFE) over else.
- Very specific: line 120
Never leave a catch block empty.
- Distinctive: line 123
Should the error be handled explicitly?
- Distinctive: line 137
Do not pad markdown table cells for column alignment.
- Distinctive: line 145
Do not right-pad cells to line up columns:
- Very specific: line 171
When creating or managing GitHub issues for the VS Code extension or JetBrains plugin via gh, load .kilo/skills/gh-issues/SKILL.md.
- Very specific: line 183
Prefer
kilocodedirectories: - Place Kilo-specific code in dedicated directories whenever possible: - Distinctive: line 188
Minimize changes to shared files: - When you must modify files that exist in upstream opencode, keep changes as small and isolated as …
- Very specific: line 190
Use
kilocode_changemarkers: - When modifying shared code, mark your changes with kilocode_change comments so they can be easily … - Distinctive: line 191
Do not use these markers in files within directories with kilo in the name
- Distinctive: line 193
Avoid restructuring upstream code: - Don't refactor or reorganize code that comes from opencode unless absolutely necessary.
- Very specific: line 195
Mirror new config keys to the cloud schema: - When adding a kilocode_change key to Config.Info in packages/opencode/src/config/config.ts, …
- Very specific: line 205
When editing shared upstream files, mark Kilo-specific lines with kilocode_change comments so future merges can find them.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Kilo CLI is an open source AI coding agent that generates code from natural language, automates tasks, and supports 500+ AI models.
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- The default branch in this repo is
main. - Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
- You may be running in a git worktree. All changes must be made in your current working directory — never modify files in the main repo checkout.
Build and Dev
- Dev:
bun run dev(runs from root) orbun run --cwd packages/opencode --conditions=browser src/index.ts - Dev with params:
bun dev -- help - Extension:
bun run extension(build + launch VS Code with the extension in dev mode). Pass--no-buildto skip the build. When asked to run an isolated VS Code/Kilo environment, use the CLI scripts instead of interactive launch configs:bun run extension:isolatedreuses.kilo-dev/, andbun run extension:isolated:cleanclears.kilo-dev/first. Pass an optional workspace path after--, for examplebun run extension:isolated -- ../sample-project. - Typecheck:
bun turbo typecheck(usestsgo, nottsc). Includes the JetBrains plugin and requires Java 21; do not runjava -versionas a routine preflight. Only check Java when a Gradle/Java command fails with a Java-version or missing-Java error. If missing, install via SDKMAN:sdk install java 21-tem && sdk use java 21-tem. If SDKMAN is not installed, see https://sdkman.io/install. - Test:
bun testfrompackages/opencode/(NOT from root -- root blocks tests) - Single test:
bun test ./test/tool/tool-define.test.tsfrompackages/opencode/ - CLI build artifact size check: after
bun run script/build.ts --single --skip-installinpackages/opencode/, usedu -h dist/*/*/bin/kilo(scoped package output lives underdist/@kilocode/) - SDK regen: After changing server endpoints in
packages/opencode/src/server/, run./script/generate.tsfrom root to regeneratepackages/sdk/js/ - Knip (unused exports):
bun run knipfrompackages/kilo-vscode/. CI runs this — all exported types/functions must be imported somewhere. Remove or unexport unused exports before pushing. - Source links: After adding or changing URLs in
packages/kilo-vscode/,packages/kilo-vscode/webview-ui/, orpackages/opencode/src/, runbun run script/extract-source-links.tsfrom the repo root and commit the updatedpackages/kilo-docs/source-links.md. CI runs this check — the build fails if the file is stale. - kilocode_change check:
bun run check-kilocode-changefrompackages/kilo-vscode/. CI runs this —kilocode_changeis a marker for upstream merge conflicts and must not appear inpackages/kilo-vscode/orpackages/kilo-ui/(these are entirely Kilo Code additions). Remove the markers before pushing. - opencode annotation check:
bun run script/check-opencode-annotations.ts --worktreefrom repo root when verifying local agent changes. CI runsbun run script/check-opencode-annotations.tson PRs touchingpackages/opencode/— every Kilo-specific change in shared opencode files must be annotated withkilocode_changemarkers. Exempt paths (no markers needed):packages/opencode/src/kilocode/,packages/opencode/test/kilocode/, and any path containingkilocodein the name. - Effect facade ratchet: Do not add runtime-backed Promise facades to shared
packages/opencode/srcEffect services; use service dependencies,AppRuntime, or Kilo-owned boundaries. Runbun run script/check-opencode-promise-facades.tswhen touching service adapters. - workflow allowlist:
bun run script/check-workflows.tsfrom repo root. CI runs this as part of the annotations workflow — any.yml/.yamlfile added to or removed from.github/workflows/must be reflected in the hardcoded list inscript/check-workflows.ts. Prevents upstream-merged workflows from silently starting to run in our CI. - Backend/SDK programmatic testing: see TESTING.md for spawning the local main-branch backend (
bun dev serve) and driving it viacurl— use this instead ofkilo serve(prod binary) when testing backend fixes.
Quality Checks
Before saying an implementation is ready, run the smallest relevant checks that can catch lint, typecheck, and test failures for the touched package. Do not rely on manual extension launch to discover build problems. Fix failures you introduced before the final response, or state exactly which check is still failing or could not be run.
| Area | Checks |
| Root / cross-package | bun run lint, bun run typecheck |
| CLI | From packages/opencode/: bun run typecheck, bun test or targeted bun test ./path/to/file.test.ts |
| VS Code extension | From packages/kilo-vscode/: bun run typecheck, bun run lint, bun run test:unit or bun run test |
| Extension build/package | From packages/kilo-vscode/: bun run compile or bun run package when touching build, packaging, SDK, or webview integration paths |
| JetBrains plugin | From packages/kilo-jetbrains/: ./gradlew typecheck, ./gradlew test. Requires Java 21; do not run java -version as a routine preflight. Check Java only after a Java-version or missing-Java failure. |
| CI/local guards | Run affected guards documented above, such as bun run knip, bun run check-kilocode-change, bun run script/check-opencode-annotations.ts --worktree, or source link extraction |
Never run root bun test; the root script prints do not run tests from root and exits with code 1. Use package-level tests instead.
Products
All products are clients of the CLI (packages/opencode/), which contains the AI agent runtime, HTTP server, and session management. Each client spawns or connects to a kilo serve process and communicates via HTTP + SSE using @kilocode/sdk.
| Product | Package | Description |
| Kilo CLI | packages/opencode/ | Core engine. TUI, kilo run, kilo serve. Fork of upstream OpenCode. |
| Kilo VS Code Extension | packages/kilo-vscode/ | VS Code extension. Bundles the CLI binary, spawns kilo serve as a child process. Includes the Agent Manager — a multi-session orchestration panel with git worktree isolation. |
Agent Manager refers to a feature inside packages/kilo-vscode/ (extension code in src/agent-manager/, webview in webview-ui/agent-manager/). It is not a standalone product. See the extension's AGENTS.md for details.
In each VS Code extension host, one KiloConnectionService is created for the sidebar, every Kilo editor tab, and Agent Manager; it lazily starts and reuses one current kilo serve backend at a time. Agent Manager worktree sessions pass a directory context to this shared backend rather than starting one per worktree. State captured by the active service layer, such as Snapshot trackState, is shared across those requests; only directory-keyed InstanceState data is isolated.
Extension-specific settings should live in the Kilo extension settings, not default VS Code settings, unless they are intentionally VS Code-wide. Experimental flags should follow existing flag patterns, not VS Code settings; they usually belong in the Kilo Experimental settings section.
Package Instructions
- When a task primarily touches
packages/kilo-jetbrains/, readpackages/kilo-jetbrains/AGENTS.mdbefore planning or editing. It holds hard restrictions, a shared-code reuse index, and a skill/command index; load the matchingjetbrains-ui,jetbrains-session,jetbrains-arch, orjetbrains-devskill (or the/release-jetbrainscommand) for detailed guidance.
Monorepo Structure
Turborepo + Bun workspaces. The packages you'll work with most:
| Package | Name | Purpose |
packages/opencode/ | @kilocode/cli | Core CLI -- agents, tools, sessions, server, TUI. This is where most work happens. |
packages/sdk/js/ | @kilocode/sdk | Auto-generated TypeScript SDK (client for the server API). Do not edit src/gen/ by hand. |
packages/kilo-vscode/ | kilo-code | VS Code extension with sidebar chat + Agent Manager. See its own AGENTS.md for details. |
packages/kilo-gateway/ | @kilocode/kilo-gateway | Kilo auth, provider routing, API integration |
packages/kilo-telemetry/ | @kilocode/kilo-telemetry | PostHog analytics + OpenTelemetry |
packages/kilo-i18n/ | @kilocode/kilo-i18n | Internationalization / translations |
packages/kilo-ui/ | @kilocode/kilo-ui | SolidJS component library shared by the extension webview and docs screenshot stories |
packages/util/ | @opencode-ai/util | Shared utilities (error, path, retry, slug, etc.) |
packages/plugin/ | @kilocode/plugin | Plugin/tool interface definitions |
Commits and PR Titles
Use conventional commit-style messages and PR titles: type(scope): summary.
Valid types are feat, fix, docs, chore, refactor, and test. Scopes are optional; use the affected package or area when helpful, e.g. core, opencode, tui, app, desktop, sdk, or plugin.
Examples: fix(tui): simplify thinking toggle styling, docs: update contributing guide, chore(sdk): regenerate types.
Style Guide
- Keep things in one function unless composable or reusable
- Avoid unnecessary destructuring. Instead of
const { a, b } = obj, useobj.aandobj.bto preserve context - Avoid possibly out-of-bounds array access. Instead of
array[index] ?? {}, usearray.at(index) ?? {}. Instead ofarray[array.length - 1], usearray.at(-1) - Avoid
try/catchwhere possible - Avoid using the
anytype - Prefer single word variable names where possible
- Use Bun APIs when possible, like
Bun.file() - Rely on type inference when possible; avoid explicit type annotations or interfaces unless necessary for exports or clarity
- Always use
Promise.withResolvers<T>()to create deferred promises; all supported runtimes provide it. Never captureresolveandrejectfrom anew Promiseexecutor in external variables or object properties. - Use
ref == nullto check for bothnullandundefinedinstead ofref === undefined || ref === null.
Avoid let statements
Prefer const. Replace let + if/else assignment with a ternary or an IIFE. Reassignment is the only legitimate reason to reach for let.
Naming Enforcement (Read This)
THIS RULE IS MANDATORY FOR AGENT WRITTEN CODE.
- Use single word names by default for new locals, params, and helper functions.
- Multi-word names are allowed only when a single word would be unclear or ambiguous.
- Do not introduce new camelCase compounds when a short single-word alternative is clear.
- Before finishing edits, review touched lines and shorten newly introduced identifiers where possible.
- Good short names to prefer:
pid,cfg,err,opts,dir,root,child,state,timeout. - Examples to avoid unless truly required:
inputPID,existingClient,connectTimeout,workerPath.
Avoid else statements
Prefer early returns (or an IIFE) over else. After an if that returns/throws, the else is redundant.
No empty catch blocks
Never leave a catch block empty. An empty catch silently swallows errors and hides bugs. If you're tempted to write one, ask yourself:
- Is the
try/catcheven needed? (prefer removing it) - Should the error be handled explicitly? (recover, retry, rethrow)
- At minimum, log it via
log.error("...", { err })so failures are visible — nevercatch {}orcatch (e) {}with no body.
Prefer single word naming
Default to a single-word name for variables, parameters, and helper functions. Reach for a multi-word name only when a single word would be genuinely ambiguous in context — not just because the longer name "reads nicer". The rule is about meaning, not character count: don't introduce camelCase compounds like inputPID, existingClient, connectTimeout, or workerPath when pid, client, timeout, or path is already clear from the surrounding code. See the "Naming Enforcement" section above for the preferred vocabulary.
Testing
You MUST avoid using mocks as much as possible.
Tests MUST test actual implementation, do not duplicate logic into a test.
Markdown Tables
Do not pad markdown table cells for column alignment. Use the compact form with single-space-padded content cells and a minimal separator row:
| Command | What it runs |
|---|---|
| `kilo serve` | The prod CLI on `$PATH`. |Do not right-pad cells to line up columns:
| Command | What it runs |
| ----------------------------- | ------------------------ |
| `kilo serve` | The prod CLI on `$PATH`. |Padding makes every content change rewrite the entire table, which blows up diffs on untouched rows. Markdown files are excluded from prettier (see .prettierignore) so running the formatter won't re-pad them, and script/check-md-table-padding.ts enforces the rule in CI. Run bun run script/check-md-table-padding.ts --fix to auto-rewrite padded tables.
Commit Conventions
Conventional Commits with scopes matching packages: vscode, cli, agent-manager, sdk, ui, i18n, kilo-docs, gateway, telemetry, desktop. Omit scope when spanning multiple packages.
Changesets
User-facing changes (features, fixes, breaking changes) require a changeset file for release notes. Prefer one concise changeset per PR, grouping related changes when possible. Run bunx changeset add or manually create .changeset/<slug>.md. Use patch for bug fixes, minor for new features, major for breaking changes. See .changeset/README.md for details.
Changeset descriptions appear directly in release notes and are read by end users. Keep them concise and feature-oriented — describe what changed from the user's perspective, not implementation details. Write in imperative mood (e.g. "Support exporting conversations as markdown" not "Add a new export handler that serializes session messages to .md files").
Pull Requests
PR descriptions should explain what changed, why the change is needed, and the intent or constraints a reviewer cannot infer from the diff alone. Keep simple PRs brief, but give non-trivial changes enough context to stand on their own. Skip file-by-file inventories, test result summaries, and anything obvious from the code itself.
GitHub Issues
When creating or managing GitHub issues for the VS Code extension or JetBrains plugin via gh, load .kilo/skills/gh-issues/SKILL.md. It covers templates, project boards (VS Code Extension, Jetbrains Plugin), title conventions, and the gh auth refresh -s project recovery path.
Fork Merge Process
Kilo CLI is a fork of opencode.
Very important: when planning or coding, update shared files with OpenCode as last resort! Everything is shared code from OpenCode, except folders that contain kilo in the name or have a parent directory that contains kilo in the name. Example of kilo specific folders: packages/opencode/src/kilocode/ and packages/kilo-docs/. Always look for ways to implement your feature or fix in a way that minimizes changes to shared code.
Minimizing Merge Conflicts
We regularly merge upstream changes from opencode. To minimize merge conflicts and keep the sync process smooth:
- Prefer
kilocodedirectories - Place Kilo-specific code in dedicated directories whenever possible:packages/opencode/src/kilocode/- Kilo-specific source codepackages/opencode/test/kilocode/- Kilo-specific testspackages/kilo-gateway/- The Kilo Gateway package
- Minimize changes to shared files - When you must modify files that exist in upstream opencode, keep changes as small and isolated as possible.
- Use
kilocode_changemarkers - When modifying shared code, mark your changes withkilocode_changecomments so they can be easily identified during merges. Do not use these markers in files within directories with kilo in the name - Avoid restructuring upstream code - Don't refactor or reorganize code that comes from opencode unless absolutely necessary.
- Mirror new config keys to the cloud schema - When adding a
kilocode_changekey toConfig.Infoinpackages/opencode/src/config/config.ts, also add the matching JSON Schema entry inapps/web/src/app/config.json/extras.tsin the cloud repo. See CLI Config Schema for the step-by-step.
The goal is to keep our diff from upstream as small as possible, making regular merges straightforward and reducing the risk of conflicts.
Git conflict style
bun install sets merge.conflictStyle=zdiff3 repo-locally via script/setup-git.ts (wired into postinstall). Conflicts include the common ancestor between ||||||| and =======, which is what script/upstream/ and mergiraf rely on for structural resolution and what makes manual resolution on shared opencode files tractable. If you've overridden it in your user config, the repo-local setting takes precedence — don't override it back.
Kilocode Change Markers
When editing shared upstream files, mark Kilo-specific lines with kilocode_change comments so future merges can find them. The basic forms are:
- Single line:
const value = 42 // kilocode_change - Multi-line block: wrap with
// kilocode_change start/// kilocode_change end - New file in a shared path:
// kilocode_change - new fileat the top - JSX/TSX: use
{/* kilocode_change */}(and{/* kilocode_change start */}/end)
Markers are NOT needed in paths that contain kilocode in the name (e.g. packages/opencode/src/kilocode/, packages/opencode/test/kilocode/) — these are entirely Kilo Code additions and won't conflict with upstream.
For decision rules on when to keep changes inline vs. extract Kilo logic, marker placement guidance, and verification commands, load .kilo/skills/kilocode-merge-minimizer/SKILL.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

