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.writeShellApplicationwith its dependencies inruntimeInputs, never a bare path that assumes PATH. - In a shared module every value is a
lib.mkDefaultso consumers can override. In a repository's own files, plain values. - No
with pkgs;at file scope; refer topkgs.<name>so the reader sees where a name comes from. - No
builtins.fetchurlor 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
packagesor alanguages.*entry indevenv.nix. - Inputs live in
devenv.yamland are pinned bydevenv.lock;devenv update <input>bumps one. - Secrets come from
secretspec. No secret value appears in any Nix file. .pre-commit-config.yamlis generated; never edit it.- Do not enable
claude.code.enable; it overwrites.claude/settings.json.
The baseline
- The root
devenv.nixsetslyngon.enable = trueanddevenv.yamlimportslyngon/devenvfrom thelyngoninput; 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
nixfmthook formats every Nix file on commit. .mcp.json, with the devenv MCP server, is generated by the baseline only whenlyngon.mcp.enable = true; never edit it.
With the Lyngon structure
lyngon.structure.enable = truein the rootdevenv.nixturns on the layout check.- Languages and stock hooks (
ruff,terraform-format) are enabled once, in the rootdevenv.nix. A package'sdevenv.nixholds only its tasks, its own{name}-hooks scoped withfiles, and processes; a stock hook scoped in two packages fails evaluation with conflictingfilesvalues.
04 同仓库更多 Skills
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".
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.
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".
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.
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.
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.