ai-native-template: Skill for Codex

.agents/skills/an-init/SKILL.md

an-init is a skill for Codex from kvker/ai-native-template. It costs 59 tokens per session (1,793 once invoked), scanned C, original, MIT.

A Chinese-language skill for initializing an AI-assisted workspace from existing project materials. It organizes facts, conventions, reusable procedures, and routing information into shared context for future work.

In plain words
What is it for?
Use it to scan project folders, extract documented tools and conventions, generate workspace context, detect available procedures, and safely install runtime skills when the required workspace structure is present.
Why use it?
It gives an agent a structured understanding of a workspace without guessing its domain or inventing tasks. It also checks required files and reports incomplete or limited scans.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; mentions Codex.

This is kvker/ai-native-template's own configuration. It tells Codex 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/skills/an-init/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kvker/ai-native-template

Made for: Codex.

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 an-init

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kvker/ai-native-template/an-init"><img src="https://agentmods.dev/badge/skills/kvker/ai-native-template/an-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,793 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00059 $0.01793
Opus 5.5 $0.00024 $0.00717
Sonnet 5.5 $0.00012 $0.00359
Haiku 4.5 $0.00006 $0.00179

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

Security

Grade C, and why

an-init scanned grade C with 1 finding 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.

The scan reads SKILL.md. This mod also ships 10 executable files (assets/skills/an-archive/scripts/archive-task.mjs, assets/skills/an-recipes/scripts/detect-recipes.mjs, assets/skills/an-refresh/scripts/scan-projects.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

安装器先复制到 staging 并验证所有 Skill,再提交目标、原子移除待完成路由块,并将 `an-init` 退出发现路径。提交前失败会恢复根 AGENTS、已提交目标和 `an-init`;提交成功后的旧副本清理失败只报告 warning,不回滚已安装 Skills。不要手工执行 `mv ...; rm -rf ...`。
.agents/skills/an-init/SKILL.md · 153 lines

How it starts

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

AI Native 上下文初始化

将 projects/ 中的材料纳入通用 AI Context 结构。初始化只整理事实和约定,不创建任务 Artifact,不预设行业。

一、前置检查

  1. 确认当前目录同时包含根 AGENTS.md、artifacts/index.json 和 .agents/skills/an-init/SKILL.md;否则停止,要求从工作区根目录重新执行。
  2. 检查 projects/ 下一级子目录,每个子目录视为独立工作单元。
  3. projects/ 为空或不存在时,一次性询问是否从空模板开始;确认后创建目录并生成最小上下文。
  4. 已有材料时直接继续,不要求用户填写能够从材料获得的信息。
  5. 独立工作单元默认可以用子代理并行扫描;环境不支持时由主代理顺序完成。

二、执行流程

工作区扫描 → 事实整理 → 上下文生成 → 动作探测 → 安装前检查 → 安装 Skills → 报告并重启

三、工作区扫描

从工作区根目录运行:

node .agents/skills/an-init/assets/skills/an-recipes/scripts/detect-recipes.mjs --root projects --write .agents/recipes.json
node .agents/skills/an-init/assets/skills/an-refresh/scripts/scan-projects.mjs --root projects --artifacts artifacts --format markdown

扫描输出中的 diagnostics 非空或 truncated: true 时,先针对目标材料补充检查并在报告中说明限制。扫描失败不得解释为“没有内容”。

扫描后按需阅读 README、索引、配置、注释和已有规范,提取:

  • 目录、文件类型和主要材料。
  • 已明确表达的用途、入口和外部约定。
  • 声明的工具、脚本和可执行动作。
  • 命名、文件组织和格式规律。

所有结论必须来自用户输入或工作区事实。可以基于证据归纳,但必须标注来源;置信度不足时写“待确认”,不得用领域常识补成已确认事实。

四、上下文生成

已有文件时保留仍有效的人工内容,只修改与事实冲突或已经过时的部分。

根 AGENTS.md

改写为运行期路由,至少包含:

  • 已确认的工作区定位和工作单元路由。
  • 目录职责和敏感文件约束。
  • 必读规范。
  • 指向 artifacts/index.json 的任务状态路由。
  • $an-task、$an-task-split、$an-recipes、$an-refresh、$an-review、$an-archive 的运行期 Skill 路由。
  • $an-task 触发规则:用户明确下达“开始吧”“开始做”“实现”“动手”“开工”等进入执行态的指令时,无论此前讨论多少轮,都必须先经 $an-task 分流;该规则写入运行期根 AGENTS。
  • $an-task 规模规则:小改动只允许不创建 Artifact,不允许跳过分流;预计变更涉及 3 个以上文件或跨前后端时至少使用 L2。

移除原模板阶段说明,但在安装完成前保留以下唯一待完成路由块;所有 $an-init 和 .agents/skills/an-init 引用都必须放在块内:

<!-- an-init-pending:start -->
初始化尚未完成时,使用 `$an-init` 继续;入口位于 `.agents/skills/an-init/`。
<!-- an-init-pending:end -->

根文件不复制活跃任务表或流程正文。安装器在所有运行期 Skill 提交成功后原子移除该块;失败或取消时该入口仍可重试。

根 AI 行为约束必须包含:

当任务需要访问某个目录时,先检查该目录及其相关父级路径中的 AGENTS.md(如存在),再读取或修改其中的文件。不要为此主动遍历无关目录。

README.md

将模板 README 改写为当前工作区的人类概览,至少说明用途、工作单元、目录、运行期 Skills 和启动方式。必须移除 <!-- ai-native-template-readme --> 标记;不要删除用户 README。

background

生成或更新:

  • background/overview.md:定位、已知目标、主要材料、待确认和来源。
  • background/workspaces.md:每个工作单元的路径、类型、内容、动作和来源。
  • background/AGENTS.md:稳定但可刷新、任务默认只读、已确认与待确认分离。

Read the full file on GitHub · 153 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. 2mo ago First seen · 153 lines · 59 tokens per session scan C e6d147716a13

Subscribe to this mod's changes

an-init is a skill published in the GitHub repository kvker/ai-native-template (101 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 1,793 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

an-init compared with skills from other repositories

an-init next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
an-initkvker/ai-native-templateSkill1012mo agoMITC59Codex
knowledge-ingestopenclaw/openclawSkill394kyesterdayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill71k2d agoCC0-1.0A74Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill20kyesterdayMITA184Claude Code
memoryopensquilla/opensquillaSkill7.1k6d agoApache-2.0A44Claude Code, Codex
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex