nix-gardener

Inspect Nix code formatting, evaluation, pitfalls, and nixpkgs input updates.

2|Updated Feb 17, 2017
One-click install
npx skills add https://github.com/John2143/dotfiles --skill nix-gardener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-gardener
Source: https://github.com/John2143/dotfiles/tree/main/.claude/skills/nix-gardener
Command: npx skills add https://github.com/John2143/dotfiles --skill nix-gardener

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the inspection of Nix files, identifying formatting issues, evaluation errors, common pitfalls, and outdated inputs, ensuring your Nix codebase is maintainable and up-to-date.

Core Features & Use Cases

  • Format Checking: Ensures Nix files adhere to formatting standards using nixpkgs-fmt or nixfmt.
  • Evaluation: Checks for evaluation errors with nix flake check for flakes or nix eval otherwise.
  • Audit: Scans for common Nix pitfalls like missing system references, hardcoded versions, and deprecated libraries.
  • Updates: Checks if nixpkgs inputs are behind upstream.
  • Use Case: Regularly run this Skill on your Nix project to maintain code quality and ensure dependencies are current.

Quick Start

Use the nix-gardener skill to check the formatting of all Nix files in the current directory.

Frequently Asked Questions about nix-gardener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check formatting and evaluate Nix files for errors?

To check formatting and evaluate Nix files, run nixpkgs-fmt or nixfmt for style adherence and nix flake check or nix eval to catch evaluation errors, ensuring your Nix codebase is maintainable.

How do I audit Nix code for common pitfalls like hardcoded versions?

Auditing Nix code for common pitfalls involves scanning for missing system references, hardcoded versions, and deprecated libraries, identifying potential issues to keep your project maintainable.

Can I check if nixpkgs inputs are behind upstream?

Yes, you can check if nixpkgs inputs are behind upstream by inspecting your flake inputs, comparing current input versions against the upstream repository to ensure dependencies are current.

Does Nix format checking work with both nixpkgs-fmt and nixfmt?

Nix format checking supports both nixpkgs-fmt and nixfmt, ensuring your Nix files adhere to formatting standards by validating against these tools to maintain consistent code style.

What is the best way to maintain Nix code quality automatically?

The best way to maintain Nix code quality automatically is regularly running an inspection process that checks formatting, evaluates code for errors, audits for common pitfalls, and verifies nixpkgs inputs are up-to-date.

Do I need access to nixpkgs to evaluate Nix code?

Yes, you need access to nixpkgs and associated tools to evaluate Nix code, as developers working on Nix-based projects require this environment to perform code analysis and run checks like nix flake check.