kimaki AGENTS.md

kimaki AGENTS.md is an instructions file for Codex, OpenCode from remorses/kimaki. It costs 10,962 tokens per session, scanned C, original, MIT.

Repository instructions for Kimaki, a project whose main CLI package contains a TypeScript command-line tool and Discord bot. They describe its monorepo structure, database communication, required checks, and development rules.

In plain words
What is it for?
Use them when changing the CLI, Discord message handling, queueing, onboarding, database-related code, tests, or release notes in the Kimaki repository.
Why use it?
They give contributors the project-specific rules needed to make safe changes, such as running TypeScript checks, tests, and changeset checks. A monorepo is one repository containing multiple related packages.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/remorses/kimaki/agents-md
Clone the repo
git clone --depth 1 https://github.com/remorses/kimaki

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 kimaki AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/remorses/kimaki/agents-md.svg)](https://agentmods.dev/instructions/remorses/kimaki/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/remorses/kimaki/agents-md"><img src="https://agentmods.dev/badge/instructions/remorses/kimaki/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,962 This file is loaded in full into every session.
When invoked 10,962 The same file — it is already loaded in full.
Security scan C 2 findings. Scan, not verified.
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 $0.10962 $0.10962
Opus 5 $0.05481 $0.05481
Sonnet 5 $0.02192 $0.02192
Haiku 4.5 $0.01096 $0.01096

Measured yesterday against content hash b11be44d20ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

kimaki AGENTS.md scanned grade C with 2 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 yesterday.

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 making important changes to queueing or message handling always run the full test suite inside cli to make sure our changes did not break anything. use `pnpm run test --run -u`, then inspect snapshot updates in git

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

do not use spawnSync. use our util execAsync. which uses spawn under the hood
AGENTS.md · 732 lines

How it starts

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

after every change always run tsc inside cli to validate your changes. 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.

do not use spawnSync. use our util execAsync. which uses spawn under the hood

the important package in this repo is cli. it contains the discord bot code.

after making important changes to queueing or message handling always run the full test suite inside cli to make sure our changes did not break anything. use 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.

repo architecture

kimaki is a monorepo with three main packages that communicate via a shared Postgres database hosted on PlanetScale.

┌───────────────────────────────────────────────────────────────┐
│  User's machine                                               │
│  cli/ (TypeScript CLI + Discord bot)                          │
│  ├── src/cli.ts        main CLI, onboarding wizard            │
│  ├── src/discord-bot.ts  event loop, session routing          │
│  └── SQLite (~/.kimaki/discord-sessions.db)                   │
│         local state: bot tokens, channels, threads, models    │
└─────────┬────────────────────────────┬───────────────────────┘
          │ REST + WebSocket           │ polls /api/onboarding/status
          │ (clientId:secret)          │ during first-time setup
          ▼                            ▼
┌──────────────────────┐   ┌──────────────────────────────────┐
│  gateway-proxy/      │   │  website/                        │
│  (Rust, fly.io)      │   │  (Cloudflare Worker, Hono)       │
│                      │   │  https://kimaki.dev          │
│  Sits between the    │   │                                  │
│  CLI and Discord.    │   │  GET /oauth/callback              │
│  One shared bot for  │   │    → upserts gateway_clients row │
│  all users — users   │   │    → website/src/routes/          │
│  don't create their  │   │      oauth-callback.tsx           │
│  own Discord bot.    │   │                                  │
│                      │   │  GET /api/onboarding/status       │
│  Multi-tenant:       │   │    → CLI polls every 2s           │
│  filters events per  │   │    → website/src/routes/          │
│  client_id + guild   │   │      onboarding-status.ts         │
│                      │   │                                  │
│  wss://kimaki-       │   └──────────┬───────────────────────┘
│  gateway-production  │              │
│  .fly.dev            │              │
└──────────┬───────────┘              │
           │                          │
           ▼                          ▼
┌───────────────────────────────────────────────────────────────┐
│  Shared Postgres (PlanetScale)                                │
│  db/schema.prisma                                             │
│                                                               │
│  gateway_clients table:                                       │
│    client_id  TEXT   ── identifies the kimaki user             │
│    secret     TEXT   ── authenticates gateway connections      │
│    guild_id   TEXT   ── guild the user installed the bot in    │
│    @@id([client_id, guild_id])                                │
│                                                               │
│  Written by: website (on OAuth callback)                      │
│  Read by: gateway-proxy (polls every 1s via db_config.rs)     │
│  Read by: website (onboarding status check)                   │
└───────────────────────────────────────────────────────────────┘

Read the full file on GitHub · 732 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. yesterday Changed · +17 lines · +285 tokens per session scan A → C b11be44d20ad
  2. 4d ago First seen · 715 lines · 10,677 tokens per session scan A a02461876ea8

Subscribe to this mod's changes

kimaki AGENTS.md is an instructions file published in the GitHub repository remorses/kimaki (1,395 stars, last pushed yesterday), licensed MIT. It adds 10,962 tokens to every session, about $0.0548 per session on Opus 5. A static security scan graded it C with 2 findings (nullifies safety policies, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.