nix-ai copilot-instructions.md

nix-ai copilot-instructions.md is an instructions file for GitHub Copilot from dryvist/nix-ai. It costs 477 tokens per session, scanned B, original, MIT.

A contributor guide for nix-ai, an ecosystem of AI command-line tools and MCP servers packaged as Nix home-manager modules. It explains the project’s Nix constraints, validation checks, and rebuild process.

In plain words
What is it for?
Use it when changing Nix modules, plugins, hooks, settings, activations, or MCP servers, and when running formatting, checks, or a nix-darwin rebuild.
Why use it?
It prevents contributors from using unsupported imperative Nix commands or wiring module inputs incorrectly. It also distinguishes static checks from the rebuild and fresh session needed to verify runtime changes.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

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/dryvist/nix-ai/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/dryvist/nix-ai

Made for: GitHub Copilot.

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 nix-ai copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dryvist/nix-ai/copilot-instructions.svg)](https://agentmods.dev/instructions/dryvist/nix-ai/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/dryvist/nix-ai/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/dryvist/nix-ai/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 477 This file is loaded in full into every session.
When invoked 477 The same file — it is already loaded in full.
Security scan B 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.1 $0.00477 $0.00477
Opus 5 $0.00238 $0.00238
Sonnet 5 $0.00095 $0.00095
Haiku 4.5 $0.00048 $0.00048

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

Security

Grade B, and why

nix-ai copilot-instructions.md scanned grade B 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 6d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo darwin-rebuild switch --flake "$HOME/git/nix-darwin/main" \
.github/copilot-instructions.md · 53 lines

What it actually says

GitHub Copilot Instructions — nix-ai

Repository Purpose

nix-ai is an AI CLI ecosystem (Claude Code, Antigravity, Codex, Copilot, MCP servers, MLX inference) delivered as Nix home-manager modules. It exports modules consumed by nix-darwin; this repo holds the module definitions, not a deployed system.

Critical Constraints

  • Flakes-only. Never generate nix-env or other imperative Nix commands.
  • Module args injection. Flake inputs reach modules via _module.args, not function parameters.
  • No direct main commits. Always work on a feature branch in a worktree.

Validation

Static checks run on every change:

nix flake check    # formatting, statix, deadnix, regression tests
nix fmt            # auto-fix formatting

Runtime changes (plugins, hooks, settings, activations, MCP servers) also need a real rebuild and a fresh Claude Code session — static checks validate Nix evaluation, not runtime behavior:

sudo darwin-rebuild switch --flake "$HOME/git/nix-darwin/main" \
  --override-input nix-ai "$HOME/git/nix-ai/<worktree>"

Conventions

  • Scripts longer than a few lines live in scripts/*.sh, never inline in .nix.
  • Never hardcode model IDs, endpoints, or version strings — read them from vars/ai-stack.nix (the central registry).
  • Never put secrets in Nix expressions or env: blocks; they end up in the world-readable Nix store. Use Doppler or the macOS Keychain.

Key Files

  • modules/default.nix — module entry point
  • modules/mcp/catalog.nix — shared MCP server catalog
  • modules/mlx/ — local Apple Silicon inference (vllm-mlx LaunchAgent)
  • vars/ai-stack.nix — model/endpoint/version registry
  • lib/checks/ — per-domain regression tests

See CLAUDE.md and docs/architecture/ for the full architecture.

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. 6d ago First seen · 53 lines · 477 tokens per session scan B 6c536952bcfa

Subscribe to this mod's changes

nix-ai copilot-instructions.md is an instructions file published in the GitHub repository dryvist/nix-ai (11 stars, last pushed today), licensed MIT. It adds 477 tokens to every session, about $0.0024 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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

gortex CLAUDE.md

Claude Code instructions for zzet/gortex, covering gortex, build & test, codebase overview, discovery (read once, then keep using) and llm provider (powers ask and searchsymbols assist: modes).

zzet/gortex · 5,172 tokens

DevoxxGenieIDEAPlugin AGENTS.md

AGENTS.md instructions for devoxx/DevoxxGenieIDEAPlugin, covering agents.md, project overview, build & development commands, building and testing.

devoxx/DevoxxGenieIDEAPlugin · 2,849 tokens

opencodex AGENTS.md

AGENTS.md instructions for lidge-jun/opencodex, covering agents.md, what this project is, repository layout, optional subsystems stay off the core path and the devlog directory.

lidge-jun/opencodex · 4,596 tokens

DevoxxGenieIDEAPlugin GEMINI.md

Gemini CLI instructions for devoxx/DevoxxGenieIDEAPlugin, a project described as: DevoxxGenie is an agentic plugin for IntelliJ IDEA that uses local LLM's (Ollama, LMStudio, GPT4All, Jan and Llama.cpp) and Cloud based LLMs to help review, test, explain your project code. Latest version now also supports Spec Driven…

devoxx/DevoxxGenieIDEAPlugin · 257 tokens

optio CLAUDE.md

Instructions for jonwiggins/optio, covering claude.md, what is optio?, architecture, pod-per-repo with worktrees and worktree lifecycle.

jonwiggins/optio · 6,856 tokens

calva-backseat-driver AGENTS.md

Instructions for BetterThanTomorrow/calva-backseat-driver, covering calva backseat driver - ai agent guide, essential architecture, action/effect system ("ex"), runtime state structure and datascript connections.

BetterThanTomorrow/calva-backseat-driver · 3,441 tokens