ai-native-template 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

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/kvker/ai-native-template/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.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.svg" alt="Measured on agentmods" 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. 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.00926 $0.00926
Opus 5 $0.00463 $0.00463
Sonnet 5 $0.00185 $0.00185
Haiku 4.5 $0.00093 $0.00093

Measured 4d ago against content hash 214fdbdf97d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 行为约束

  • 禁止自行脑补未提及的需求、功能或业务逻辑。
  • 所有背景知识必须来自实际材料或用户明确输入。
  • 从工作区材料反推的信息要标注来源;无法确认的信息标记为“待确认”。
  • 不主动读取或输出 .envsecrets/、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. 4d 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 23d ago), licensed MIT. It adds 926 tokens to every session, about $0.0046 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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens