an-init

an-init is a skill for Claude Code, 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 Claude CodeCodex

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 skills/kvker/ai-native-template/an-init
Any agent
npx skills add kvker/ai-native-template --skill an-init
Clone the repo
git clone --depth 1 https://github.com/kvker/ai-native-template

Made for: Claude Code, 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.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.svg" alt="Measured on agentmods" 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. 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.00059 $0.01793
Opus 5 $0.00030 $0.00897
Sonnet 5 $0.00012 $0.00359
Haiku 4.5 $0.00006 $0.00179

Measured 5d ago against content hash e6d147716a13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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.mdartifacts/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. 5d 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 24d ago), licensed MIT. It adds 59 tokens to every session and 1,793 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens