AGENT SKILL

nix

Lyngon Nix and devenv conventions. Invoke before writing or editing a Nix file or devenv.yaml.

License 许可
Apache-2.0
所属仓库
lyngon/devkit
最近更新
2026-11-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
nix
paths
[ "**/*.nix", "devenv.yaml" ]
description
Lyngon Nix and devenv conventions. Invoke before writing or editing a Nix file or devenv.yaml.
user-invocable
false

03 SKILL.md 正文

Nix conventions

  • Formatted by the standard formatter; never hand-format.
  • A script that a hook or task runs is a pkgs.writeShellApplication with its dependencies in runtimeInputs, never a bare path that assumes PATH.
  • In a shared module every value is a lib.mkDefault so consumers can override. In a repository's own files, plain values.
  • No with pkgs; at file scope; refer to pkgs.<name> so the reader sees where a name comes from.
  • No builtins.fetchurl or other unpinned fetches; every fetch has a hash.
  • Inputs are pinned by the lock file; bump them deliberately and say why in the commit.
  • Comments say why, not what: what the module does is visible, why a hook is disabled is not.
  • Nothing is installed imperatively; a missing tool is added to the environment definition.

devenv

  • Every tool comes from packages or a languages.* entry in devenv.nix.
  • Inputs live in devenv.yaml and are pinned by devenv.lock; devenv update <input> bumps one.
  • Secrets come from secretspec. No secret value appears in any Nix file.
  • .pre-commit-config.yaml is generated; never edit it.
  • Do not enable claude.code.enable; it overwrites .claude/settings.json.

The baseline

  • The root devenv.nix sets lyngon.enable = true and devenv.yaml imports lyngon/devenv from the lyngon input; the baseline hooks and languages come from there.
  • Override a baseline value in place, with a comment saying why. Never disable a hook to make a check pass.
  • The nixfmt hook formats every Nix file on commit.
  • .mcp.json, with the devenv MCP server, is generated by the baseline only when lyngon.mcp.enable = true; never edit it.

With the Lyngon structure

  • lyngon.structure.enable = true in the root devenv.nix turns on the layout check.
  • Languages and stock hooks (ruff, terraform-format) are enabled once, in the root devenv.nix. A package's devenv.nix holds only its tasks, its own {name}- hooks scoped with files, and processes; a stock hook scoped in two packages fails evaluation with conflicting files values.

04 同仓库更多 Skills

lyngon
lyngon/devkit

unslop

Remove AI writing patterns from prose and give it a voice. Use whenever writing or editing non-code text (docs, READMEs, decision records, posts, commit messages, PR descriptions), before handing it over, and on request: "unslop", "humanize", "make this sound human", "clean up this writing", "edit for voice", "de-AI this text".

★ 0
lyngon
lyngon/devkit

technical

Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use before writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages, every time, however small the document.

★ 0
lyngon
lyngon/devkit

simpler

Restate the last message in plain human language, with no jargon. Use when the reader did not follow the last message and says so: "bro", "say that simpler", "in plain words", "no jargon".

★ 0
lyngon
lyngon/devkit

init

Set up a fresh repository, or adopt an existing one, to Lyngon conventions. Interviews the owner relentlessly about purpose, failure modes, audiences, stack and constraints, then writes INTENT.md, .claude/CLAUDE.md, README.md, CONCEPTS.md, decision records, devenv, git hooks, CI and every package in the kind-first Lyngon layout. User-invoked only.

★ 0
lyngon
lyngon/devkit

add-package

Create a package in a Lyngon repository in the directory its kind decides (apps/, libs/, contracts/, tools/, infra/), with README.md, devenv.nix and the layer lint, and register it in its workspace and devenv. Use whenever a new app, service, CLI, library, adapter, contract, schema, tool, infra module or environment is needed, including when one feature needs several packages. Never create a package by hand.

★ 0
lyngon
lyngon/devkit

index

The index of Lyngon's principles, one line per principle saying when it applies and what it demands, each with a file under references/. Invoke before work that takes judgment, such as a design choice, a refactor, a bug fix, a test, a measurement, a script, a document or a question to the owner; then read the file of each principle that applies.

★ 0