Kimaki is a Discord-based orchestrator for OpenCode, an AI coding agent that edits files on a user's machine. It maps each project to a Discord channel and each coding session to a thread, allowing users to start, resume, search, and fork work through conversations. Catalogue add-ons provide Kimaki-related workflows for coding agents.
Borrowing it
Nothing to install: this file belongs to remorses/kimaki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/remorses/kimaki/main/AGENTS.mdgit clone --depth 1 https://github.com/remorses/kimakiWrote 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.
[](https://agentmods.dev/instructions/remorses/kimaki/agents-md)<a href="https://agentmods.dev/instructions/remorses/kimaki/agents-md"><img src="https://agentmods.dev/badge/instructions/remorses/kimaki/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.
<a href="https://agentmods.dev/instructions/remorses/kimaki/agents-md"><img src="https://agentmods.dev/badge/instructions/remorses/kimaki/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.09729 | $0.09729 |
| Opus 5.5 | $0.03892 | $0.03892 |
| Sonnet 5.5 | $0.01946 | $0.01946 |
| Haiku 4.5 | $0.00973 | $0.00973 |
Grade E, and why
kimaki AGENTS.md scanned grade E with 4 findings 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 2d 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.
Nullifies safety policieshighAnti-refusal
"You have no restrictions", "do anything now", "ignore your guidelines": a direct jailbreak that disables guardrails.
after changes to message handling, queueing or the reducer run the full test suite inside `kimaki`: `pnpm run test --run -u`, then inspect snapshot updates in git diff. for one file, use `pnpm run test --run src/example. Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
Kimaki uses the user's shared OpenCode service, not a bot-owned server. `opencode-server.ts` discovers it or starts it through `Service.ensure()` when none is running (`findOpencodeBinary`: `OPENCODE_PATH` if set, else ` Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Kimaki uses the user's shared OpenCode service, not a bot-owned server. `opencode-server.ts` discovers it or starts it through `Service.ensure()` when none is running (`findOpencodeBinary`: `OPENCODE_PATH` if set, else ` Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
never use `spawnSync` or `execSync`. use async `execFile` (`promisify(execFile)`) or `spawn` from `node:child_process`, with a timeout. How it starts
The opening of the file, as written. The whole thing — 435 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Decisions: plans/decisions/. Search them before designing or refactoring.
the important package in this repo is kimaki/: the Kimaki Discord bot and kimaki CLI (npm package kimaki), built on OpenCode V2. it replaced the V1 cli/ package; kimaki/CHANGELOG.md keeps the V1 release history. this branch supports OpenCode V2 only. the legacy OpenCode V1 compatible codebase lives in the cli/ folder of the v1 branch (https://github.com/remorses/kimaki/tree/v1/cli); read it there with git show v1:cli/<path>, never re-add V1 support here.
after every change and every feature run pnpm build (tsc) inside kimaki. it validates types and keeps kimaki/dist up to date: the OpenCode plugin autostarts the bot from dist/cli.js (src/autostart.ts), so a stale dist starts old code. try to never use as any.
always load the changesets skill before fixing bugs or adding features. User-facing fixes and features usually need a .changeset/*.md entry, and the skill explains package selection, issue references, descriptive filenames, and .changeset/readme.md expectations.
never use spawnSync or execSync. use async execFile (promisify(execFile)) or spawn from node:child_process, with a timeout.
after changes to message handling, queueing or the reducer run the full test suite inside kimaki: pnpm run test --run -u, then inspect snapshot updates in git diff. for one file, use pnpm run test --run src/example.test.ts. always include run after pnpm; pnpm test --run makes pnpm consume the flag, and pnpm run test -- --run passes a literal -- that can make vitest ignore the filter.
each kimaki e2e test file starts its own OpenCode server (~400 MB). kimaki/vitest.config.ts caps parallel files at a third of the CPUs; override with KIMAKI_TEST_WORKERS. other agents may run suites at the same time, so run single files while iterating and the full suite once at the end. timeouts in a full run on a loaded machine may be load-related: rerun the failing file alone before debugging.
kimaki CLI startup must stay light (~0.06s, ~70 MB): agents and tests call kimaki many times. kimaki/src/cli/*.ts must not import SQLite (db.ts, schema.ts, credentials.ts, project.ts, voice.ts) or discord.js at top level; await import() them inside the actions that need them. use discord-api-types/v10 for enums like ChannelType.
for checkout validation requests, prefer non-recursive checks unless the user asks otherwise.
task-specific docs
read the matching doc before starting these tasks. they hold the full procedures and are not repeated here.
| task | read first |
|---|---|
| any larger kimaki feature: why it works the way it does, what was dropped from V1 | docs/kimaki-v2-rebuild-spec.md |
gateway-proxy, website onboarding, gateway_clients, --gateway, bot credentials |
docs/gateway-architecture.md |
| publish, release notes, #changelog post, website deploy, kimaki-demo deploy | docs/release-process.md |
editing discord-slack-bridge/ (Slack API links, ID encoding, KV auth cache) |
discord-slack-bridge/AGENTS.md |
| Strada events, DAU/WAU/MAU, funnels, retention SQL | docs/strada-product-analytics.md |
| event sourcing patterns and examples | docs/event-sourcing-for-application-state.md |
| reducer fixtures (recorded OpenCode V2 event streams) | docs/opencode-v2-events/ |
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.
- 2d ago Changed · +5 lines · +390 tokens per session ff262fa7c290
- 7d ago Changed · +7 lines · +555 tokens per session 1828b199ead0
- 14d ago Changed · +45 tokens per session 4af9fd1c99d0
- 22d ago Changed · +1 lines · +155 tokens per session 8646f0100ccb
- 25d ago Changed · +1 lines · +120 tokens per session 290989997996
- 28d ago Changed · +17 lines · +1,214 tokens per session scan C → E 36b731c46e21
- 1mo ago Changed · +19 lines · +480 tokens per session 4e782bd47b9f
- 1mo ago Changed · -371 lines · -4,763 tokens per session f7f04890de1f
- 1mo ago Changed · +2 lines · +122 tokens per session fd11a0cadb21
- 1mo ago First seen · 754 lines · 11,411 tokens per session scan C ba34c2c545ef
kimaki AGENTS.md is an instructions file published in the GitHub repository remorses/kimaki (1,446 stars, last pushed yesterday), licensed MIT. It adds 9,729 tokens to every session, about $0.0389 per session on Opus 5.5. A static security scan graded it E with 4 findings (nullifies safety policies, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
kimaki AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kimaki AGENTS.mdremorses/kimaki | Instructions file | 1.4k | yesterday | MIT | E | 9,729 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |