kana: Instructions file for Codex

AGENTS.md

kana AGENTS.md is an instructions file for Codex, OpenCode from longyijdos/kana. It costs 1,229 tokens per session, scanned A, original, MIT.

Project instructions for developing the Kana codebase, covering how to choose the scope of a change, find the right architecture documentation, write code, and test it.

In plain words
What is it for?
Use them when planning or implementing changes in an unfamiliar or multi-module part of Kana, especially when deciding which documentation, code owner, tests, and comments apply.
Why use it?
They help agents make focused changes that fit the project's structure without unnecessary approval steps, duplicated work, or brittle maintenance choices.

Instructions file for CodexOpenCode

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

This is longyijdos/kana's own configuration. It tells Codex and OpenCode how to work on kana 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 kana configures →

Reuse

Borrowing it

Nothing to install: this file belongs to longyijdos/kana. 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/longyijdos/kana/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/longyijdos/kana

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/longyijdos/kana/agents-md/github.svg)](https://agentmods.dev/instructions/longyijdos/kana/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/longyijdos/kana/agents-md"><img src="https://agentmods.dev/badge/instructions/longyijdos/kana/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 kana AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/longyijdos/kana/agents-md"><img src="https://agentmods.dev/badge/instructions/longyijdos/kana/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,229 This file is loaded in full into every session.
When invoked 1,229 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01229 $0.01229
Opus 5.5 $0.00492 $0.00492
Sonnet 5.5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

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

Security

Grade A, and why

kana AGENTS.md scanned grade A with 0 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 24d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 63 lines

How it starts

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

AGENTS.md

Scope and workflow

  • Choose a change scope that matches the task and keep the result cohesive.
  • Default to completing the task in one pass. Do not impose separate implementation, review, test, or documentation phases unless the user requests a checkpoint.
  • Do not stop for routine approval. Ask for direction only when a missing choice would materially change the result, broaden the scope, or authorize a consequential action.
  • Avoid unnecessary churn. For larger features or refactors, explain the important design tradeoffs and keep related changes together.
  • Do not blindly follow a brittle or overly complex request. Explain the maintenance concern and suggest the simplest durable alternative.
  • Before an unfamiliar or cross-module change, read docs/architecture.md and use docs/README.md to find the canonical owner; for a narrow change, read only the relevant owner document and avoid loading unrelated documentation.

Implementation

  • Prefer clear names and code structure over comments.
  • Add comments only for non-obvious invariants, design decisions, protocol semantics, ordering requirements, provider-specific behavior, and mutable state boundaries.
  • Keep implementation comment blocks within four lines and 320 characters. Do not add comments that restate the code.
  • Put longer explanations in documentation only when they describe a stable contract or design boundary that future contributors need.
  • Do not add comment-check-ignore suppressions without maintainer approval.
  • For imports under src, use relative imports within the same top-level src directory. Use the @/ alias only across top-level directories and prefer target barrels such as @/core or @/tools over deep aliases.

Trust boundaries and state

  • Validate untrusted input once, at the edge where it enters: files, network and provider responses, tool arguments, CLI flags, and user input. Use parseWithSchema for structured formats.
  • Trust typed values inside the system. Do not re-validate, re-normalize, or guard states that the types already rule out, and do not add fallbacks for branches that cannot happen.
  • Treat data as immutable: declare readonly types, update by replacing values, and share them by reference. Copy only when handing a value to code that mutates it or when crossing a persistence or process boundary.
  • Give each resource one owner that handles idempotent close and cleanup. Callers do not add their own flags or wrappers around it.
  • The logger never throws, so do not wrap logging in try/catch. Isolate failures only around callbacks that a frontend or user supplies.
  • Before writing a helper, search utils, core, and the module's own helpers for an existing one.

Read the full file on GitHub · 63 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. 24d ago Changed · +11 lines · +267 tokens per session 15066442999e
  2. 2mo ago First seen · 52 lines · 962 tokens per session scan A 31898fbc4663

Subscribe to this mod's changes

kana AGENTS.md is an instructions file published in the GitHub repository longyijdos/kana (8 stars, last pushed 2d ago), licensed MIT. It adds 1,229 tokens to every session, about $0.0049 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

kana AGENTS.md compared with instructions from other repositories

kana AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kana AGENTS.mdlongyijdos/kanaInstructions file82d agoMITA1,229Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode