スキル一覧に戻る
tobi

nix-cleanup

by tobi

nix version of tobi/dotfiles

40🍴 2📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: nix-cleanup description: CI workflow checks and code cleanup tools

NixOS CI and Code Cleanup

This skill provides context about the CI workflow and code cleanup tools used in this repository.

CI Workflow

The CI is defined in @.github/workflows/ci.yml and runs three main checks:

  1. Flake Check (nix flake check --no-build)

    • Validates flake syntax and structure
    • Checks all NixOS configurations
    • Ensures all outputs are buildable
    • Does NOT build derivations (fast check)
  2. Statix (nix run nixpkgs#statix -- check .)

    • Lints Nix code for common issues and anti-patterns
    • Suggests best practices and improvements
    • Can auto-fix issues with statix fix
  3. Deadnix (nix run nixpkgs#deadnix -- .)

    • Detects unused code and bindings
    • Finds dead let bindings, function arguments, etc.
    • Can auto-fix with deadnix -e

Running Checks Locally

Always run these before committing:

# Quick check (no builds)
nix flake check --no-build

# Lint for anti-patterns
nix run nixpkgs#statix -- check .

# Find dead code
nix run nixpkgs#deadnix -- .

Auto-fixing Issues

# Fix statix issues
nix run nixpkgs#statix -- fix .

# Remove dead code
nix run nixpkgs#deadnix -- -e .

Common Issues

Unused Let Bindings

# Bad - 'foo' is never used
let
  foo = "unused";
  bar = "used";
in bar

# Good - removed unused binding
let
  bar = "used";
in bar

Unused Function Parameters

# Bad - 'pkgs' is never used
{ pkgs, lib, ... }: {
  imports = [ ];
}

# Good - removed from signature
{ lib, ... }: {
  imports = [ ];
}

Best Practices

  1. Always run /nix-check slash command after making changes
  2. Use statix and deadnix to keep code clean
  3. CI runs on every push and PR
  4. All checks must pass before merging

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です