Agent skill

Nix Optimizer

by bolivian-peru in bolivian-peru/os-moda

Intelligent Nix store management. An agent skill from bolivian-peru/os-moda.

Apache-2.0Auto-check passed

Install Nix Optimizer

skills CLI
$ npx skills add bolivian-peru/os-moda --skill nix-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bolivian-peru/os-moda nix-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bolivian-peru/os-moda.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nix-optimizer .claude/skills/nix-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nix-optimizer
GitHub stars
119
Token cost
~428 tokens
SKILL.md length
47 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Intelligent Nix store management. An agent skill from bolivian-peru/os-moda.

  • Works in 3 steps: Always keep: current generation, last… → Analyze: which generations introduced… → Recommend: targeted cleanup with…
  • SKILL.md covers Store Analysis, Smart GC Strategy, Execution and Post-Cleanup
  • Calls nix

What it does

Nix Optimizer is an agent skill from bolivian-peru/os-moda. Intelligent Nix store management. Analyze store usage, identify waste, optimize garbage collection, and track generation history.

Its SKILL.md is about 430 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: An operating system built for AI agents — talk to your NixOS server instead of SSH-ing in. Typed, audited tool access with atomic rollback on every change. Research-grade; run it… The licence is Apache-2.0.

Example prompts

  • “/nix-optimizer”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Always keep: current generation, last known-good, backup baseline
  2. Analyze: which generations introduced large store additions
  3. Recommend: targeted cleanup with estimated space recovery

What it can do on your machine

Read from SKILL.md and the folder at commit b8e418f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • nix

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nix Optimizer loads about 428 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 47 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~428

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bolivian-peru/os-moda at commit b8e418f, republished under its Apache-2.0 licence (© bolivian-peru). 47 words, ~428 tokens.

Download SKILL.mdSave it as .claude/skills/nix-optimizer/SKILL.md (or your agent's skills folder).
name
nix-optimizer
description
Intelligent Nix store management. Analyze store usage, identify waste, optimize garbage collection, and track generation history.
tools
shell_exec, memory_store, memory_recall
activation
auto

Nix Store Optimizer

Intelligent garbage collection and store management.

Store Analysis

shell_exec({ command: "du -sh /nix/store 2>/dev/null" })
shell_exec({ command: "nix-store --gc --print-dead 2>/dev/null | wc -l" })
shell_exec({ command: "nixos-rebuild list-generations 2>/dev/null | tail -20" })

Smart GC Strategy

Don't just nix-collect-garbage -d. Be intelligent:

  1. Always keep: current generation, last known-good, backup baseline
  2. Analyze: which generations introduced large store additions
  3. Recommend: targeted cleanup with estimated space recovery
Nix Store Report:

Store size: 28.4 GB across 47 generations

Recommended to keep:
  Gen 50 (current) — 12.1 GB active
  Gen 47 (pre-OpenSSL update) — rollback point
  Gen 42 (last backup baseline)

Safe to remove: 44 generations → reclaims ~19 GB

Large items:
  /nix/store/...-linux-6.6.12 (old kernel) — 980 MB
  /nix/store/...-chromium-121 (old browser) — 1.4 GB
  /nix/store/...-texlive-2023 (unused) — 2.1 GB

Proceed with smart cleanup?

Execution

shell_exec({ command: "nix-collect-garbage --delete-older-than 14d" })
shell_exec({ command: "nix-store --optimise" })  # dedup hardlinks

Post-Cleanup

memory_store({
  summary: "Nix GC: freed 19GB, kept gens 42,47,50",
  detail: "Store reduced from 28.4GB to 9.3GB. 44 generations removed.",
  category: "system.config",
  tags: "nix,garbage-collection,optimization"
})

© bolivian-peru, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/nix-optimizer of bolivian-peru/os-moda.

Open the folder on GitHubat commit b8e418f

Compare with similar skills

Nix Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nix Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nix Optimizer this skillbolivian-peru/os-moda119—~428Automated safety check: PassApache-2.0
App Store Optimizationalirezarezvani/claude-skills28k1 repos~4.2kAutomated safety check: PassMIT
App Store Optimizationborghei/Claude-Skills891—~1.5kAutomated safety check: PassMIT
App Store Optimizationalirezarezvani/claude-code-skill-factory8828 repos~4.1kAutomated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
App Store Optimizationdpearson2699/swift-ios-skills1.2k—~4.3kAutomated safety check: PassCustom licence

Similar skills

  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Marketing & SEOAuto-check passed
  • App Store Optimization

    borghei/Claude-Skills

    App Store Optimization toolkit for researching keywords, optimizing metadata, and tracking mobile app performance on Apple App Store and Google Play Store.

    891 GitHub stars~1.5k tokensUpdated 3 days ago
    MobileAuto-check passed
  • App Store Optimization

    alirezarezvani/claude-code-skill-factory

    Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

    882 GitHub starsUsed in 8 repos~4.1k tokens
    Marketing & SEOAuto-check passed
  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • App Store Optimization

    dpearson2699/swift-ios-skills

    Optimize App Store product pages for search visibility and conversion.

    1.2k GitHub stars~4.3k tokensUpdated 2 mo ago
    Marketing & SEOAuto-check passed
  • App Store Optimization

    cbrock84/headcount

    Improves visibility and conversion in the App Store and Google Play — metadata, keywords, screenshots, ratings, and the listing experience that turns an impression into an install.

    2k GitHub stars~947 tokensUpdated 23 days ago
    MobileAuto-check passed

More from bolivian-peru/os-moda

All 17 skills in this repo
  • App Deployer

    bolivian-peru/os-moda

    Deploy and manage user applications as managed systemd services

    119 GitHub stars~774 tokensUpdated 3 mo ago
    Auto-check passed
  • Deploy AI Agent

    bolivian-peru/os-moda

    Deploy and manage AI agent workloads with GPU checks, API key management, and health monitoring

    119 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Drift Detection

    bolivian-peru/os-moda

    Detect configuration drift — manual changes that exist outside NixOS management.

    119 GitHub stars~584 tokensUpdated 3 mo ago
    Auto-check passed
  • Flight Recorder

    bolivian-peru/os-moda

    Black box flight recorder for the server. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~624 tokensUpdated 3 mo ago
    Auto-check passed
  • Generation Timeline

    bolivian-peru/os-moda

    NixOS generation-aware debugging and time-travel. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~777 tokensUpdated 3 mo ago
    Auto-check passed
  • Morning Briefing

    bolivian-peru/os-moda

    Generate a concise daily infrastructure briefing. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~897 tokensUpdated 3 mo ago
    Auto-check passed

Questions about Nix Optimizer

What does Nix Optimizer do?

Intelligent Nix store management. An agent skill from bolivian-peru/os-moda. Nix Optimizer is an agent skill from bolivian-peru/os-moda. Intelligent Nix store management.

How do I install Nix Optimizer in Claude Code?

Run `npx skills add bolivian-peru/os-moda --skill nix-optimizer -a claude-code`. Or copy the skill folder (skills/nix-optimizer in bolivian-peru/os-moda) into .claude/skills/nix-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Nix Optimizer in Codex?

Run `npx skills add bolivian-peru/os-moda --skill nix-optimizer -a codex`. Or copy the skill folder (skills/nix-optimizer in bolivian-peru/os-moda) into .agents/skills/nix-optimizer in your project. Codex loads it when a task matches its description.

Can I use Nix Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bolivian-peru/os-moda --skill nix-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nix-optimizer, .gemini/skills/nix-optimizer, .github/skills/nix-optimizer and .opencode/skills/nix-optimizer in your project.

What does Nix Optimizer need to run?

Going by SKILL.md and its folder, Nix Optimizer needs the command-line tools its instructions call (nix).

Does Nix Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nix Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nix Optimizer use?

Nix Optimizer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nix Optimizer use?

About 428 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nix Optimizer?

Skills that share tags, products or a category with Nix Optimizer: App Store Optimization (alirezarezvani/claude-skills, 28k stars), App Store Optimization (borghei/Claude-Skills, 891 stars), App Store Optimization (alirezarezvani/claude-code-skill-factory, 882 stars) and SQL Optimization (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nix Optimizer?

bolivian-peru (a GitHub user) maintains it in bolivian-peru/os-moda, which has 119 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on June 24, 2026.

Source: bolivian-peru/os-moda on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.