writing-nix
This skill provides rules for writing clean, efficient Nix code, focusing on module design, explicit bindings, and performance patterns.
Install
mkdir -p .claude/skills/writing-nix && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6787" && unzip -o skill.zip -d .claude/skills/writing-nix && rm skill.zipInstalls to .claude/skills/writing-nix
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Write idiomatic and maintainable Nix code. Use when creating or refactoring Nix expressions, Home Manager or NixOS modules, overlays, packages, and flake outputs, especially when deciding module merge semantics, binding locality, option defaults, and conditional structure.Key capabilities
- →Enforces explicit module system merging over decorative abstractions
- →Applies linting rules for Nix bindings like let/inherit
- →Validates module options using mkDefault/mkForce priority
- →Identifies anti-patterns like with and rec in expressions
- →Optimizes performance via strict folds and file set operations
How it works
It applies a structured reference-based checklist (module style, bindings, assertions, anti-patterns) to evaluate and refactor Nix expressions for clarity and maintainability.
Inputs & outputs
When to use writing-nix
- →Writing NixOS modules
- →Refactoring flake outputs
- →Optimizing Nix expressions
- →Implementing Home Manager configurations
About writing-nix
Provides rules for writing clean and efficient Nix code. It covers module system design, preference for explicit bindings over abstractions, and performance patterns for complex configurations.
Writes idiomatic, performant, and maintainable Nix code. Covers best practices, anti-patterns to avoid (like `with`), module system design, and performance optimization.
When not to use it
- →When writing short, disposable scripts where full module rigor is overkill
- →When forced to work within strict external style requirements that contradict this guide
Prerequisites
Limitations
- →Does not automatically fix logic errors in the code
- →Requires manual selection of the relevant reference file for large projects
- →Style rules may conflict with established legacy codebases
How it compares
It prioritizes 'boring' and explicit Nix over complex abstractions, directly reducing evaluation debt and dependency confusion.
Compared to similar skills
writing-nix side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| writing-nix (this skill) | 1 | 4mo | No flags | Advanced |
| ansible-fix | 0 | 7mo | Review | Beginner |
| cloudflare-manager | 25 | 11mo | Review | Intermediate |
| storage-networking | 6 | 9mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ansible-fix
diegosouzapw
ALWAYS use this skill immediately after running 'ansible-galaxy init' to create a new Ansible role. Also use when the user asks to fix ansible-lint errors or when ansible-lint output shows fixable issues like yaml[comments], schema[meta], meta-incorrect, name[play], or role-name[path] violations.
cloudflare-manager
qdhenry
Comprehensive Cloudflare account management for deploying Workers, KV Storage, R2, Pages, DNS, and Routes. Use when deploying cloudflare services, managing worker containers, configuring KV/R2 storage, or setting up DNS/routing. Requires CLOUDFLARE_API_KEY in .env and Bun runtime with dependencies installed.
storage-networking
pluginagentmarketplace
Master Kubernetes storage management and networking architecture. Learn persistent storage, network policies, service discovery, and ingress routing.
aws-solution-architect
alirezarezvani
Design AWS architectures for startups using serverless patterns and IaC templates. Use when asked to design serverless architecture, create CloudFormation templates, optimize AWS costs, set up CI/CD pipelines, or migrate to AWS. Covers Lambda, API Gateway, DynamoDB, ECS, Aurora, and cost optimization.
terraform-module-library
wshobson
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
cloud-architect
sickn33
Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns. Masters serverless, microservices, security, compliance, and disaster recovery. Use PROACTIVELY for cloud architecture, cost optimization, migration planning, or multi-cloud strategies.