kilocode: Instructions file for Codex

AGENTS.md

kilocode AGENTS.md is an instructions file for Codex, OpenCode from Kilo-Org/kilocode. It costs 4,422 tokens per session, scanned A, original, MIT.

Repository instructions for working on Kilo Code, an open-source AI coding agent. They cover development commands, package-specific guidance, quality checks, worktrees, and release-related practices.

In plain words
What is it for?
Use them when developing, testing, type-checking, building, or running Kilo Code and its VS Code extension in the Kilo-Org/kilocode repository.
Why use it?
They give coding agents the project’s expected rules and commands, reducing mistakes caused by using the wrong workflow or modifying the wrong checkout.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions OpenCode.

This is Kilo-Org/kilocode's own configuration. It tells Codex and OpenCode how to work on kilocode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kilocode configures →

About the project

Kilo Code is an open-source AI coding agent that works inside VS Code and JetBrains, from the command line, or through cloud services. Developers use it to build software with AI models, switch between providers, and run cloud agents or automated code reviews. The catalogue includes eleven skills, eight agents, and one instruction for Kilo Code.

Kilo-Org/kilocode · 27,710 stars · on GitHub · kilo.ai

Reuse

Borrowing it

Nothing to install: this file belongs to Kilo-Org/kilocode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kilo-Org/kilocode/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Kilo-Org/kilocode

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kilocode AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kilo-org/kilocode/agents-md/github.svg)](https://agentmods.dev/instructions/kilo-org/kilocode/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kilo-org/kilocode/agents-md"><img src="https://agentmods.dev/badge/instructions/kilo-org/kilocode/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kilocode AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kilo-org/kilocode/agents-md"><img src="https://agentmods.dev/badge/instructions/kilo-org/kilocode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,422 This file is loaded in full into every session.
When invoked 4,422 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.04422 $0.04422
Opus 5.5 $0.01769 $0.01769
Sonnet 5.5 $0.00884 $0.00884
Haiku 4.5 $0.00442 $0.00442

Measured 16d ago against content hash 657e8a9157a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kilocode AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Backend/SDK programmatic testing**: see [TESTING.md](./TESTING.md) for spawning the local main-branch backend (`bun dev serve`) and driving it via `curl` — use this instead of `kilo serve` (prod binary) when testing
AGENTS.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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) or bun 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-build to 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:isolated reuses .kilo-dev/, and bun run extension:isolated:clean clears .kilo-dev/ first. Pass an optional workspace path after --, for example bun run extension:isolated -- ../sample-project.
  • Typecheck: bun turbo typecheck (uses tsgo, not tsc). Includes the JetBrains plugin and requires Java 21; do not run java -version as 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 test from packages/opencode/ (NOT from root -- root blocks tests)
  • Single test: bun test ./test/tool/tool-define.test.ts from packages/opencode/
  • CLI build artifact size check: after bun run script/build.ts --single --skip-install in packages/opencode/, use du -h dist/*/*/bin/kilo (scoped package output lives under dist/@kilocode/)
  • SDK regen: After changing server endpoints in packages/opencode/src/server/, run ./script/generate.ts from root to regenerate packages/sdk/js/
  • Knip (unused exports): bun run knip from packages/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/, or packages/opencode/src/, run bun run script/extract-source-links.ts from the repo root and commit the updated packages/kilo-docs/source-links.md. CI runs this check — the build fails if the file is stale.
  • kilocode_change check: bun run check-kilocode-change from packages/kilo-vscode/. CI runs this — kilocode_change is a marker for upstream merge conflicts and must not appear in packages/kilo-vscode/ or packages/kilo-ui/ (these are entirely Kilo Code additions). Remove the markers before pushing.
  • opencode annotation check: bun run script/check-opencode-annotations.ts --worktree from repo root when verifying local agent changes. CI runs bun run script/check-opencode-annotations.ts on PRs touching packages/opencode/ — every Kilo-specific change in shared opencode files must be annotated with kilocode_change markers. Exempt paths (no markers needed): packages/opencode/src/kilocode/, packages/opencode/test/kilocode/, and any path containing kilocode in the name.
  • Effect facade ratchet: Do not add runtime-backed Promise facades to shared packages/opencode/src Effect services; use service dependencies, AppRuntime, or Kilo-owned boundaries. Run bun run script/check-opencode-promise-facades.ts when touching service adapters.
  • workflow allowlist: bun run script/check-workflows.ts from repo root. CI runs this as part of the annotations workflow — any .yml / .yaml file added to or removed from .github/workflows/ must be reflected in the hardcoded list in script/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 via curl — use this instead of kilo serve (prod binary) when testing backend fixes.

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 16d ago Changed · +2 lines · +51 tokens per session 657e8a9157a8
  2. 24d ago Changed · +37 tokens per session d3db517194e6
  3. 1mo ago Changed · +1 lines · +41 tokens per session 51a3746a7cdd
  4. 1mo ago First seen · 214 lines · 4,293 tokens per session scan A fc30b06e84ca

Subscribe to this mod's changes

kilocode AGENTS.md is an instructions file published in the GitHub repository Kilo-Org/kilocode (27,710 stars, last pushed today), licensed MIT. It adds 4,422 tokens to every session, about $0.0177 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,549 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens