en un clic
code-style-nix
Write Nix code using repo conventions
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Write Nix code using repo conventions
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Create and modify NixOS and Home-Manager modules
Hardens systemd services against security issues using sandboxing, capability restriction, and syscall filtering. Use when creating or modifying systemd services, writing NixOS modules with systemd.services, reviewing service security, or whenever a serviceConfig block is involved. Ensures services follow defense-in-depth principles with minimal privilege.
Write and review Conventional Commits commit messages (v1.0.0) for semantic versioning and changelogs. Use when drafting git commit messages, PR titles, release notes, or enforcing conventional commit format like `type(scope): subject`, `BREAKING CHANGE`, footers, and `revert`.
Manages version control with Jujutsu (jj), including rebasing, conflict resolution, and Git interop. Use when tracking changes, navigating history, squashing/splitting commits, or pushing to Git remotes.
Manage background jobs, capture command output, and handle session multiplexing. Use when running long commands, capturing output from detached processes, or managing concurrent tasks in headless environments.
Create terminal screenshots and GIFs with VHS tape files. Use when automating terminal recordings, capturing TUI screenshots, or generating demo GIFs.
| name | code-style-nix |
| description | Write Nix code using repo conventions |
| Context | Convention | Example |
|---|---|---|
| Files and directories | kebab-case | my-module.nix, home-manager/ |
| Nix attributes | camelCase | myOption, enableFeature |
| Option paths | camelCase | services.myService.enable |
# Good: explains why
# Workaround for upstream bug #1234
extraConfig = "...";
# Bad: repeats obvious code
# Set extraConfig to value
extraConfig = "...";
./modules/foo.nix{
imports = [
./hardware.nix
./services.nix
./networking.nix
];
}
When generating JSON, YAML, or other structured formats, define data as Nix attr sets first, then convert:
# Good: define as Nix, convert to JSON
environment.etc."config.json".text = builtins.toJSON {
setting = "value";
nested = { key = 123; };
};
# Avoid: inline JSON strings
environment.etc."config.json".text = ''
{"setting": "value", "nested": {"key": 123}}
'';
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkOption mkIf types;
cfg = config.services.myService;
in
{
options.services.myService = {
enable = mkEnableOption "my service";
};
config = mkIf cfg.enable {
# configuration here
};
}
let
inherit (lib) mkIf mkEnableOption;
cfg = config.myModule;
in
{
# use cfg, mkIf, etc.
}