Project-Koma: Instructions file for Codex

AGENTS.md

Project-Koma AGENTS.md is an instructions file for Codex, OpenCode from swnotmetal/Project-Koma. It costs 950 tokens per session, scanned A, original, MIT.

Repository instructions for Koma, a set of packages for building AI applications such as chatbots, voice systems, and search systems. They explain which Koma package to use and the project's integration and design rules.

In plain words
What is it for?
Use them when working on chatbot prompt-injection protection, voice-processing limits, or search and retrieval systems in the Koma project.
Why use it?
They reduce uncertainty when adding AI features and help keep safety checks, request limits, and data boundaries in the right places.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 Project-Koma AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/swnotmetal/project-koma/agents-md"><img src="https://agentmods.dev/badge/instructions/swnotmetal/project-koma/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 950 This file is loaded in full into every session.
When invoked 950 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.00950 $0.00950
Opus 5 $0.00475 $0.00475
Sonnet 5 $0.00190 $0.00190
Haiku 4.5 $0.00095 $0.00095

Measured 5d ago against content hash 9da180721958, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Project-Koma 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 5d 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 · 83 lines

How it starts

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

Koma — AI Coding Agent Rules

When building AI apps with this project, follow these conventions:

Product context for new conversations

The product handoff, personal skills, and local Hook configuration below are maintainer-local files and are not included in a clean clone. When they are absent, use the public README, package documentation, and dated evaluation records; do not invent missing local instructions.

Read docs/product/current-state.md before planning or changing Koma. It records the current alpha stage, verified host behavior, UX decisions, priorities, and known limits. Check current code and Git state before acting on dated facts. Update that handoff when a material product decision or verified status changes.

When to use Koma

  • Checking required Skill reads in Claude Code or Codex? → use koma-miko
  • Building a chatbot with an LLM endpoint? → add koma-gate middleware
  • Building a voice AI pipeline? → add koma-scout for audio validation + rate limiting
  • Building a RAG or search system? → add koma-core for index/content separation

Quick integration

// Express: prompt injection guard
import { createSupportGuard } from 'koma-gate';
app.post('/chat', createSupportGuard({ llm: { apiKey: process.env.OPENAI_API_KEY } }).middleware(), handler);

// Express: voice AI perimeter
import { createKomaScoutMiddleware } from 'koma-scout';
app.use(createKomaScoutMiddleware({ rateLimit: { maxRequests: 30, windowMs: 60000 } }));

// Fastify: prompt injection guard
import { createSupportGuard } from 'koma-gate';
fastify.register(createSupportGuard({ llm: { apiKey: process.env.OPENAI_API_KEY } }).fastifyPlugin());

Design rules

  • Preserve package-specific failure behavior. Miko follows the Agent Spec mode; enforce-mode missing evidence denies the action. Optional app guards document their own fail-open settings.
  • Gate runs before the application's model call. Scout runs before expensive processing.
  • Core tokens are backend-derived. Never expose content tokens to clients.
  • Each core package works standalone. Install only what the application needs.

Read the full file on GitHub · 83 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. 5d ago Changed · +42 lines · +554 tokens per session 9da180721958
  2. 9d ago First seen · 41 lines · 396 tokens per session scan A 74415285c3e7

Subscribe to this mod's changes

Project-Koma AGENTS.md is an instructions file published in the GitHub repository swnotmetal/Project-Koma (12 stars, last pushed yesterday), licensed MIT. It adds 950 tokens to every session, about $0.0047 per session on Opus 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-30.