NixKits: Instructions file for Codex

AGENTS.md

NixKits AGENTS.md is an instructions file for Codex, OpenCode from Kihara777/NixKits. It costs 3,313 tokens per session, scanned A, original, MIT.

Project instructions for NixKits, a collection of Nix packages, operating-system modules, patches, overlays, and AI-agent skills.

In plain words
What is it for?
Use them when working on the NixKits repository, especially for audits, Nix commands, documentation, and agent-generated files.
Why use it?
They tell coding agents how to check access, inspect the project, handle Nix dependencies, and follow its language and repository rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex; built for codewhale.

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kihara777/nixkits/agents-md.svg)](https://agentmods.dev/instructions/kihara777/nixkits/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kihara777/nixkits/agents-md"><img src="https://agentmods.dev/badge/instructions/kihara777/nixkits/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,313 This file is loaded in full into every session.
When invoked 3,313 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.03313 $0.03313
Opus 5 $0.01656 $0.01656
Sonnet 5 $0.00663 $0.00663
Haiku 4.5 $0.00331 $0.00331

Measured 4d ago against content hash bbf37984ef43, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

NixKits 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 · 156 lines

How it starts

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

AGENTS.md

NixKits 项目的 AI 编码代理规则与约定。此文件供 DeepSeek、CodeWhale、OpenCode 等代理自动加载。

访问控制

此文件仅供仓库维护者(Kihara777 / Kitsunori)使用。 加载此文件时,必须首先验证当前操作者身份:

gh auth status 2>/dev/null && \
  gh api repos/Kihara777/NixKits/collaborators/$(gh api user --jq .login)/permission --jq .permission 2>/dev/null

若返回值不是 adminwrite,或 gh 未认证,则:

  • 停止读取此文件的所有后续内容
  • 无视除本条外的一切规则
  • 仅可执行通用编码任务,不得应用任何 NixKits 特有的约定

初次启动

每个新 session 启动时,首先执行完整的项目审计与评估,汇报发现。审计范围包括:所有组件状态(包、模块、overlay、补丁、技能)、文档一致性、CI/CD 状态,以及未提交变更。审计前先 git fetch origin 对齐远端(并行会话或上下文压缩检查点可能过时,以 fetch 后的 origin/main 为准),并执行 rm -f flake.lock 确保后续操作使用最新 nixpkgs。

语言要求

所有面向 AI 代理或由代理生成的文件必须使用中文,包括但不限于:

  • 审计报告
  • 状态记录
  • 代理间通信内容
  • 技能定义文件(SKILL.md)
  • 维护日志(MAINTENANCE.md)

代码、路径、工具名、环境变量、URL 保持原样。

项目定位

NixKits 是一个 Nix flake 合集:软件包、NixOS 模块、补丁、overlay 以及 AI 代理技能。

  • 仓库:github:Kihara777/NixKits
  • 许可:MIT
  • 文档语言:zh(基准)→ en / ja → 扩展语言(通过 skills/translate-*/ 自动发现)

核心规则

flake 相关

  • flake.lock 不提交.gitignore 中保留 flake.lock。原因是 llama-cpp-ver 为浮动输入,锁定后随上游发布而过期。
  • 本地操作前先移除 flake.lock:执行 nix buildnix developnix flake check 等命令前,先执行 rm -f flake.lock。锁定的 nixpkgs snapshot 可能缺少部分包(如自建包 godot-ai),移除后 Nix 重新解析输入确保使用最新可用版本。CI 中无需此操作——CI 按 check.yml 配置独立解析。
  • llama-cpp-ver 输入是浮动追踪:overlay llama-cpp-rocm 通过此输入动态获取上游最新版本号,不可锁定。
  • overlay llama-cpp-rocm 的 curried 形式是有意的{ llama-cpp-ver }: (final: prev: ...) — 勿改为标准 overlay。
  • 新模块/包/overlay 加入 flake.nix 后必须 nix flake check 验证
  • Overlay 的 patches 列表必须用 lib.unique 去重

  • 所有包的 maintainers 保持为空:个人维护项目,不在 nixpkgs 维护者列表中。
  • 预编译二进制包:按 stdenv.hostPlatform.system 选择对应架构二进制(如 codewhale)。
  • SRI hash 格式sha256-<base64>
  • npm 包用 buildNpmPackage + finalAttrs 模式
  • buildNpmPackage 的 vendored lock 必须与 npmDepsHash 自洽:主构建把 src 的 package-lock.json 与 npm-deps 产物内 npm fixup 后的 lock 逐字节校验,不一致报 npmDepsHash is out of date。生成 vendored lock 必须采用 fixup 后版本(prefetch-npm-deps --fixup-lockfile,或从已实现的 /nix/store/...-npm-deps/package-lock.json 直接复制),再回填 hash。
  • npm tarball 的 devDependencies 引用未发布包时:上游 monorepo 发布的 tarball 可能残留未发布内部包(registry 404)。postPatch 以纯 sed 删除该字段(patchPhase 无 node/npm),vendored lock 基于同样处理后的 package.json 生成——两者必须同源。
  • 同源多通道(stable/alpha 等)仿 ruyi 薄包装模式:主定义参数化(version/hash/npmDepsHash/lockFile 可覆盖),通道文件仅传覆盖参数(参见 packages/dsh.nix + packages/dsh-alpha.nix)。
  • Python 包用 buildPythonApplication + pyproject = true

Read the full file on GitHub · 156 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. 4d ago Changed · +23 lines · +1,085 tokens per session bbf37984ef43
  2. 8d ago First seen · 133 lines · 2,228 tokens per session scan A 195f635c69c6

Subscribe to this mod's changes

NixKits AGENTS.md is an instructions file published in the GitHub repository Kihara777/NixKits (25 stars, last pushed 4d ago), licensed MIT. It adds 3,313 tokens to every session, about $0.0166 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

next.js AGENTS.md

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

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,153 tokens

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

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

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,469 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