ai-native-template: Instructions file for Codex

AGENTS.md

ai-native-template AGENTS.md is an instructions file for Codex, OpenCode from kvker/ai-native-template. It costs 926 tokens per session, scanned A, original, MIT.

A set of instructions and folders for giving an AI collaborator consistent project context, rules, background information, and task state.

In plain words
What is it for?
Use it to organize background, conventions, artifacts, projects, and AI behavior rules for ongoing collaborative work.
Why use it?
It reduces repeated explanations and helps the AI follow the same conventions across coding, writing, research, and other projects.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; $skill-name invocation.

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

Reuse

Borrowing it

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

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 ai-native-template AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kvker/ai-native-template/agents-md"><img src="https://agentmods.dev/badge/instructions/kvker/ai-native-template/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 926 This file is loaded in full into every session.
When invoked 926 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.00926 $0.00926
Opus 5.5 $0.00370 $0.00370
Sonnet 5.5 $0.00185 $0.00185
Haiku 4.5 $0.00093 $0.00093

Measured 2mo ago against content hash 214fdbdf97d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-native-template 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 2mo 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 · 60 lines

What it actually says

AI Native 上下文模板

这是一个通用的 AI Native 上下文模板,用于为任意类型的 AI 协作任务提供结构化上下文。

缩写说明:对话中出现的“AN”一般指 AI Native 的缩写。

模板定位

本模板不预设任务类型。它既可以承载代码开发,也可以承载文档写作、方案设计、数据分析、研究整理、内容创作、流程规划等任何需要多轮 AI 协作的任务。

核心目标:让 AI 在一致的上下文结构中理解目标、规范、背景和任务状态,减少重复沟通,提升协作质量。

模板结构

目录 用途 AI 行为
background 稳定且可刷新的背景知识 任务默认只读,仅由初始化、刷新流程或用户明确要求更新
conventions 上下文约定规范、对话长期规则与优化记录 开始任务前按需读取;对话过程中自动感知并按需写入
artifacts 任务状态、上下文与检查证据 按任务需要读写;实际交付物只保存引用
projects 实际工作区 / 交付物根目录 按任务需要读取和写入,每个子目录为一个独立工作单元
.agents/skills/an-init 模板初始化技能,运行期技能暂存在其 assets/skills/ 中 模板阶段的入口技能;运行期技能以 SKILL.md.txt 暂存,模板阶段不可见;$an-init 完成后恢复文件名并移入 .agents/skills/,an-init 自身删除

projects/ 在本模板中被视为工作区根目录,子目录可以是代码工程、文档集、数据集、设计稿目录或任何需要被 AI 理解和操作的交付物集合。

约定

索引文件以路由和必要约束为主,不复制具体文档正文:[name](path/to/file)

AI 行为约束

  • 禁止自行脑补未提及的需求、功能或业务逻辑。
  • 所有背景知识必须来自实际材料或用户明确输入。
  • 从工作区材料反推的信息要标注来源;无法确认的信息标记为“待确认”。
  • 不主动读取或输出 .env、secrets/、credentials、密钥、token 等敏感文件;除非用户明确授权且任务必要。

必读规范

开始任务前按需读取以下规范:

规范 用途
principles AI Native 核心原则
workflow 标准工作流
flow-policy 流程轻重判断
document 文档编写规范
rules 对话过程中的长期记忆感知与沉淀
memories 对话优化记录索引

任务状态

活跃 Artifact 的唯一索引是 artifacts/index.json。根 AGENTS.md 不复制动态任务状态,避免任务执行修改高优先级指令文件。

每个 Artifact 的流程等级、生命周期状态和父任务 ID 记录在自身的 artifact.json;Review 结论记录在 review/review.json。字段契约见 workflow。

Skill 路由

当前处于模板阶段,唯一入口是 $an-init。支持 Slash Command 的客户端也可以使用 /an-init。

运行期 Skills 现在仅以 SKILL.md.txt 保存,不应提前路由或调用。初始化完成并重启客户端后,根 AGENTS.md 必须改为运行期 Skill 路由,并移除 an-init 入口。

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. 2mo ago First seen · 60 lines · 926 tokens per session scan A 214fdbdf97d8

Subscribe to this mod's changes

ai-native-template AGENTS.md is an instructions file published in the GitHub repository kvker/ai-native-template (101 stars, last pushed 2mo ago), licensed MIT. It adds 926 tokens to every session, about $0.0037 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-30.

Related

ai-native-template AGENTS.md compared with instructions from other repositories

ai-native-template AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-native-template AGENTS.mdkvker/ai-native-templateInstructions file1012mo agoMITA926Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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