kiro2claude: Instructions file for Codex

AGENTS.md

kiro2claude AGENTS.md is an instructions file for Codex, OpenCode from yupanzi/kiro2claude. It costs 6,433 tokens per session, scanned A, original, MIT.

An AGENTS.md guide for a TypeScript Node.js project that wraps the Kiro command-line backend behind Claude and OpenAI-compatible interfaces. It maps the repository's packages, tests, plugins, Docker image, and release workflows; a monorepo is one repository containing multiple related packages.

In plain words
What is it for?
Use it to navigate the repository, understand its package layout, locate plugin and gateway code, and find continuous-integration, release, Docker, and manual-test entry points.
Why use it?
It gives coding agents pointers to the right documentation and package instead of making them search the whole repository. It also clarifies the boundaries between runtime code, plugins, test probes, and deployment files.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yupanzi/kiro2claude/agents-md"><img src="https://agentmods.dev/badge/instructions/yupanzi/kiro2claude/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,433 This file is loaded in full into every session.
When invoked 6,433 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.06433 $0.06433
Opus 5.5 $0.02573 $0.02573
Sonnet 5.5 $0.01287 $0.01287
Haiku 4.5 $0.00643 $0.00643

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

Security

Grade A, and why

kiro2claude 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 11d 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 · 197 lines

How it starts

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

AGENTS.md

给在此仓库工作的 coding agent(Claude Code / Codex 等)看的规范与地图,只给指针不复述。使用者入口见 README.md;踩坑的来龙去脉见 docs/PITFALLS.md;插件见 docs/PLUGIN-DEVELOPMENT.md;手工探针见 packages/core/test/manual/README.md。

项目一句话

把 kiro-cli(Kiro 后端)包装成 Claude + OpenAI 双协议代理:Claude 全系 + GPT-5.6(Sol / Terra / Luna)走完全相同的上游,两个协议端点都可用。MIT;内置插件 metering(计量)、derived(credit 反演)。Node ≥ 22 / TypeScript / ESM NodeNext / Fastify / pnpm workspace。

Monorepo 边界

packages/plugin-api/            契约包:types + abstract base class,0 runtime deps
packages/core/                  gateway runtime:HTTP 路由、plugin loader、token manager
packages/plugin-metering/       注入 usage.kiro_metering
packages/plugin-derived/        反演 Kiro credit → Anthropic token,注入 usage.kiro_derived
packages/examples/echo-plugin/  公开示范 plugin
packages/core/test/manual/      手工探针(非 CI;部分打真实上游计费),清单见其 README
tools/claude-code/ tools/codex/ 两款真实 CLI 的 Docker harness(非 runtime)
docker/Dockerfile               单一发布镜像(core + 两个内置插件)
.github/workflows/              ci.yml 全 workspace lint+typecheck+test;release.yml 发版

插件都是普通 npm 包:loader 只扫 core 所在 node_modules 第一层(含 @scope/ 下一层、不递归)里带 kiro2claude-plugin keyword 的包,内置与第三方同一机制(契约不加 tier 字段)。

架构地图

packages/core/src/
├── index.ts            入口;config → login → creds → SingleTokenManager → plugin-host → Fastify → 路由 → discoverPlugins
│                       /api/{claude,openai}/v1 = 去泄漏镜像(preHandler 打 stripPluginUsage 标记)
├── token.ts            count_tokens 本地估算 + 远程回退
├── model/config.ts     Config 契约 + loader;env 名 / 默认值 / 校验在 model/schemas/config-schema.ts
├── shared/             横切层(鉴权 / wire-format errors / logger / paths / reqId-ALS)
├── plugin-host/        插件契约实现:hook-bus / usage-finish-event / capability-registry / loader(keyword 扫描 + 拓扑排序)
├── routes/             HTTP 装配层:claude / openai / kiro / health 四组路由
├── kiro/               上游适配层(token-manager / client-profile / provider / retry-executor / parser);
│                       GetUsageLimits 由 index.ts 适配成 'usage-limits' capability
└── claude/             下游兼容层
    ├── converter.ts          Claude→Kiro 请求(system 折叠、当前轮、thinking / effort 字段)
    ├── stream-handler.ts     流式 handler;deferred commit + 空流有界重试
    ├── non-stream-handler.ts 非流式 handler;判空 / 重试镜像
    ├── non-stream-reduce.ts  reduceKiroResponse:claude & openai 非流式共用
    ├── stream.ts             SSE 状态机;buildClaudeUsagePayload / buildKiroUsageFinishEvent / isMeteringLost 唯一定义点
    ├── empty-capture.ts      空流类型 + 诊断抓包
    ├── tool-call-text.ts     泄漏工具调用的检测 / 救援 / 剥除;头注释 = 全部红线
    ├── stream/legacy-thinking-decoder.ts  legacy `<thinking>` 文法唯一定义点
    ├── tool-use-sequence.ts  tool_use 序列 + `parseCompletedToolInput`(「绝不回退 {}」实施点)
    └── reasoning-envelope.ts Claude 签名 / GPT 推理的往返信封

openai/                 OpenAI 兼容层:语义核心复用 claude,只做协议翻译
├── freeform-tool.ts        `type:"custom"` 工具替身编解码的单一真相源
├── stream-transport.ts / non-stream-transport.ts  chat + responses 共用脚手架
└── responses/          Responses API:converter(input items / additional_tools / namespace 展开)、response-stream、
                        response-nonstream、handlers、types

Read the full file on GitHub · 197 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. 11d ago First seen · 197 lines · 6,433 tokens per session scan A ce2dbf6c273d

Subscribe to this mod's changes

kiro2claude AGENTS.md is an instructions file published in the GitHub repository yupanzi/kiro2claude (118 stars, last pushed 12d ago), licensed MIT. It adds 6,433 tokens to every session, about $0.0257 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-10-26.

Related

kiro2claude AGENTS.md compared with instructions from other repositories

kiro2claude AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kiro2claude AGENTS.mdyupanzi/kiro2claudeInstructions file11812d agoMITA6,433Codex, 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