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.
curl -O https://raw.githubusercontent.com/Kihara777/NixKits/main/AGENTS.mdgit clone --depth 1 https://github.com/Kihara777/NixKitsWrote 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.
[](https://agentmods.dev/instructions/kihara777/nixkits/agents-md)<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>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.
| Model | Per session | Once 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 |
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.
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
若返回值不是 admin 或 write,或 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 build、nix develop、nix flake check等命令前,先执行rm -f flake.lock。锁定的 nixpkgs snapshot 可能缺少部分包(如自建包godot-ai),移除后 Nix 重新解析输入确保使用最新可用版本。CI 中无需此操作——CI 按check.yml配置独立解析。 llama-cpp-ver输入是浮动追踪:overlayllama-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。
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.
- 4d ago Changed · +23 lines · +1,085 tokens per session bbf37984ef43
- 8d ago First seen · 133 lines · 2,228 tokens per session scan A 195f635c69c6
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.
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.
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.
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).
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).
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.
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.