treefmt

Run treefmt and nix fmt to format and lint multi-language repositories.

3|1|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/ncaq/konoka --skill treefmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: treefmt
Source: https://github.com/ncaq/konoka/tree/main/plugins/nix-tasuke/skills/treefmt
Command: npx skills add https://github.com/ncaq/konoka --skill treefmt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

treefmt-nix is a wrapper that configures and runs treefmt to format multiple languages in a single command, unifying formatting across the repository and surfacing all changes via nix fmt. It coordinates with flakes to apply primary formatting across tracked files, and it also brings linting capabilities into the same workflow for a consistent codebase.

Core Features & Use Cases

  • Unified formatting and linting across languages via treefmt-nix
  • Nix-flake integration to apply formatters and linters
  • Clear guidance for typical workflows and setup
  • Supports a multi-language project layout including Nix, shell scripts, and configuration files

Quick Start

Install treefmt-nix and enable in your flake, then run nix fmt to format the repository.

Frequently Asked Questions about treefmt

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

FAQPage Schema
How do I format multiple languages in a single Nix flake repository?

You can unify formatting across a Nix flake repository by enabling treefmt-nix and running the nix fmt command. This coordinates multiple formatters to apply consistent styling across all tracked files in one pass.

What is the best way to lint and format Nix modules and shell scripts together?

Linting and formatting Nix modules alongside shell scripts is handled by treefmt-nix. It configures treefmt to bring both formatting and linting capabilities into a single unified workflow for your multi-language project.

Does treefmt-nix integrate with Nix flakes to apply formatting?

Yes, treefmt-nix integrates directly with Nix flakes to apply primary formatting across tracked files. You simply install it, enable it in your flake configuration, and execute nix fmt to format the entire repository.

Can I use treefmt to coordinate project-wide formatting and error reporting?

treefmt coordinates project-wide formatting by executing across a repository and surfacing all changes via nix fmt. It satisfies requirements for program execution and error reporting with a unified configuration interface and clear output.

How does treefmt handle configuration files in a multi-language project layout?

treefmt handles configuration files by guiding formatting and linting across the multi-language project layout. It uses a unified configuration interface to ensure consistent codebase standards for Nix, shell scripts, and config files.