AgentSkillsCN

nix-module-author

以恰当的选项、完善的文档说明与高度可组合性,编写并重构 NixOS 模块。

SKILL.md
--- frontmatter
name: nix-module-author
description: Author and refactor NixOS modules with proper options, documentation, and composability.

What I do

Provide step‑by‑step guidance for writing or improving NixOS modules:

  • Define options with mkOption.
  • Use mkDefault, mkMerge, and conditional sections.
  • Include documentation for options.
  • Ensure composability with other modules.
  • Validate the module via MCP‑NixOS when possible.

When to use me

Use this when:

  • Creating a new NixOS module.
  • Refactoring an existing module.
  • Adding documentation and type safety.
  • Integrating the module into a flake.

Ask clarifying questions about default values, expected behavior, and test coverage.