natural-language-config
Skill118 starsChanged 6 months agoApache-2.0View on GitHub
Translate natural language requests into NixOS configuration changes. Show diffs before applying. Use nixos-rebuild for atomic deploys. Every change is rollbackable and logged.
In this repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- app-deployerSkill
- deploy-ai-agentSkill
- drift-detectionSkill
- file-managerSkill
- flight-recorderSkill
- generation-timelineSkill
- morning-briefingSkill
- network-managerSkill
- nix-optimizerSkill
- predictive-resourcesSkill
- scaled-swarm-predictSkill
- security-hardeningSkill
- self-healingSkill
- service-explorerSkill
- spec-driven-developmentSkill
- swarm-predictSkill
- system-configSkill
- system-monitorSkill
- system-packagesSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Write idiomatic NixOS configuration.
- Distinctive: line 35
Prefer declarative NixOS options over imperative scripts.
- Distinctive: line 42
NEVER apply changes without user confirmation.
- Distinctive: line 51
Check the service started correctly.
- Very specific: line 69
Use mkIf, mkOption, mkDefault when extending existing config
- Distinctive: line 104
If a rebuild breaks something:
- Distinctive: line 112
ALWAYS show the diff before applying
- Distinctive: line 113
ALWAYS wait for user approval
- Distinctive: line 114
ALWAYS verify after rebuild
- Distinctive: line 115
NEVER edit /etc/nixos files without reading them first
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Natural Language NixOS Config Skill
Users describe what they want in plain English. You write the NixOS config.
Workflow
- Understand the request "Set up PostgreSQL with nightly backups" "Install and configure Caddy as a reverse proxy for port 3000" "Enable fail2ban to block brute force SSH"
- Read current config
file_read({ path: "/etc/nixos/configuration.nix" }) - Generate the NixOS module
Write idiomatic NixOS configuration. Use
services.*,networking.*,security.*etc. Prefer declarative NixOS options over imperative scripts. - Show the diff to the user Present EXACTLY what will change. Use a code block with +/- diff markers. Explain each change in plain English.
- Wait for approval NEVER apply changes without user confirmation. "Here's what I'll add to your NixOS config. Apply it? [Y/n]"
- Apply atomically
shell_exec({ command: "nixos-rebuild switch" }) - Verify
Check the service started correctly.
service_status({ service: "postgresql" }) - Log everything
memory_store({ summary: "Installed PostgreSQL with nightly pg_dump backups", detail: "Added services.postgresql, services.postgresqlBackup to configuration.nix. Generation 49.", category: "system.config", tags: "nixos,postgresql,config-change" })
NixOS Config Conventions
- Configuration goes in
/etc/nixos/configuration.nixor imported modules - Use
mkIf,mkOption,mkDefaultwhen extending existing config - Prefer
services.X.enable = true;patterns - For packages: add to
environment.systemPackages - For firewall:
networking.firewall.allowedTCPPorts - For users:
users.users.X
Example Interaction
User: "Set up nginx to serve a static site from /var/www"
Response:
I'll add nginx to your NixOS config. Here's the change:
services.nginx = {
enable = true;
virtualHosts."default" = {
root = "/var/www";
locations."/" = {
index = "index.html";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
This will:
- Install and start nginx
- Serve /var/www on port 80
- Open ports 80 and 443 in the firewall
Apply this? The change is atomic and rollbackable.Rollback
If a rebuild breaks something:
shell_exec({ command: "nixos-rebuild switch --rollback" })Then investigate what went wrong.
Critical rules
- ALWAYS show the diff before applying
- ALWAYS wait for user approval
- ALWAYS verify after rebuild
- NEVER edit /etc/nixos files without reading them first
- Store every config change in memory for time-travel debugging
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

