by YPares
AI agents and Nix: parametrable skills/instructions and tools, packaged together in a reproducible and modular fashion
# Add to your Claude Code skills
git clone https://github.com/YPares/rigup.nixrigup.nix is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by YPares. AI agents and Nix: parametrable skills/instructions and tools, packaged together in a reproducible and modular fashion. It has 100 GitHub stars.
rigup.nix's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/YPares/rigup.nix" and add it to your Claude Code skills directory (see the Installation section above).
rigup.nix is primarily written in Nix. It is open-source under YPares on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh rigup.nix against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

rigup is a Nix-based system for packaging knowledge, instructions and skills for your AI agent with the tools and configuration needed to execute them.
A riglet is executable knowledge:
By combining the relevant riglets together, you build your agent's rig: the tools it needs to work on your project, and the operational knowledge it needs to use those tools properly and efficiently.
By default, the documentation of a riglet is lazily loaded (like Skills are): at startup your agent is fed a manifest, only showing for each riglet a quick description and a set of use cases.
It will then go on reading it when it needs to, or is prompted to.
However, rigup gives you more control than Skills traditionally do in terms of when your agent should be exposed to a riglet's content.
For instance, a fundamental riglet can be set to have an eager disclosure (forcing the agent to see the whole SKILL.md at startup), while another one can have a shallow-toc disclosure (the agent will see a table of contents of the riglet's main SKILL.md).
Besides, while Skills are necessarily fixed files, riglets' documentation files can be produced by any Nix derivation. It means the contents can also just be read from a raw file, or they can be defined programmatically, for instance by a bash script. This makes a riglet's doc file contents configurable in the same way this riglet's tools are. rigup's Nix library provides utilities to template your skills via minijinja to facilitate this use case.
rigup has a "knowledge-first" design: documentation is the payload, tools are dependencies. The "main entrance" to the rig will be the RIG.md manifest that rigup will generate for your AI agent to read, and through which it will discover all the available tools, knowledge and processes to follow.
In short, rigup is parametrable agent skills + lightweight home management for your agent, with a high-level of interoperability with Skills and Claude plugin marketplaces so reusing existing Skills as riglets or as basis for riglets is made as easy as possible.
First, install the rigup CLI tool:
nix profile add github:YPares/rigup.nix#rigup
NOTE: On older Nix versions, "add" is "install" instead.
This should prompt you to accept the usage of the https://rigup.cachix.org binary cache.
If already installed, update with:
nix profile upgrade rigup
This CLI tool makes it easier to:
rigup show)rigup inspect)rigup run or just rigup) if the rig contains a riglet that provides an entrypoint. Entrypoints act as connectors, wrapping a harness executable to start it with the appropriate configrigup build)$PATH and $RIG_MANIFEST (path to the RIG.md) set up (rigup shell)Note all these commands are just wrappers, provided for convenience, around the rigup Nix library. So you may still do everything with usual nix build calls if you prefer.
You can then create a new project from the templates provided by this repository, or even directly build the example rig defined here.
rigup)This project defines example riglets, and an example rig combining them.
# Show the riglets and rigs exposed by a remote flake
rigup show github:YPares/rigup.nix
# Show all metadata about riglets and each rig's contents
rigup show --detailed github:YPares/agent-skills # A Skills repo that also packages them via rigup
# Directly build a rig from a remote flake
rigup build github:YPares/rigup.nix#example-rig # this builds <flake>#rigs.<system>.example-rig.home and outputs a symlink
# Directly open a rig from a remote flake in a subshell
rigup shell github:YPares/rigup.nix#example-rig
# Directly run a rig's entrypoint (if it has any)
rigup run github:YPares/agent-skills#claude-rig
# Then in Claude Code: Ctrl+o to show details, to see the RIG.md manifest that Claude was prompted with via a startup hook
rigup run github:YPares/agent-skills#copilot-rig
# Almost the same rig, but using `copilot-cli` as an entrypoint
Create it from one of the templates in this repo:
rigup new foo [-t minimal]
# Use 'minimal' template for a project which should not define any local riglet
cd foo
This creates a ./foo folder, initializes it as a git repo, calls nix flake init to create a basic project structure with a flake.nix and example riglets and rigs, adds all the files to git tracking (important), and finally runs nix flake check on the result to make sure everything is in order.
# List available riglets from flake's self and inputs
rigup show --detailed --with-inputs
# Build your rig
rigup build ".#default"
# Explore the rig
cat .rigup/default/RIG.md
# Or open the rig as a sub-shell instead of creating a local symlink
rigup shell ".#default"
Edit riglets/*.nix and rigup.toml to customize the project.
The default template includes some example riglets and shows how rigup supports using a Claude Marketplace as a direct input, to import pre-existing Skills and use them as a basis for riglets.
devenvIf your project uses devenv instead of Nix flakes, an experimental integration of rigup is available, using this repo directy as a devenv module you can import in your project. Follow the example here.
IMPORTANT: The rigup CLI tool only deals with flake-based projects, and the rest of this documentation is written assuming a flake-base project, but everything regarding how to declare rigs and riglets remains applicable. Only the way to start up rigs changes.
Additionally, the devenv integration only covers declaring your own rigs and riglets and re-using riglets defined in other flake-based projects. To package riglets for others to use, Nix flakes remain a better fit.
More information about using rigup with devenv will be added here as this integration matures.
This section covers the general workflow of defining and editing riglets and rigs.
Riglets are a simple use case of Nix modules.
Concretely, this means a riglet (in its most general form) is a (config, dependencies) -> data Nix function, where:
config is the final config of the rig which the riglet is part of,data is a dictionary-like structure ("attribute set" in Nix lingo) providing nested fields that will themselves contribute to the final aggregated configCreate a riglets/ folder at the root of your project.
Then add to it a <riglet-name>.nix file:
# riglets/my-riglet.nix
# First argument: the defining flake's `self` - gives access to:
# - `self.inputs.*` for external package dependencies
# - `self.riglets.*` for inter-riglet imports
# Just use `_` if you don't need it
self:
# Second argument: module args constructed by the _user_ of the riglet, when the full rig is built
# - config is the final aggregated config of the rig using my-riglet,
# - pkgs is your usual imported nixpkgs,
# - system is just pkgs.stdenv.hostPlatform.system, for quicker access
# - riglib is injected by rigup, and contains utility functions to build riglets
{ config, pkgs, system, riglib, ... }: {
# (Optional) Which riglets to depend on (whether from self or input flakes)
# If this riglet is included in a rig, ALL the riglets it imports will automatically be included as well
imports = [
self.riglets.foo
self.inputs.aaa.riglets.bar
...
];
# Each riglet must declare itself under config.riglets.<riglet-name>
# <riglet-name> MUST be the SAME as the file name, minus the .nix extension
config.riglets.my-riglet = {
# (Optional) The tools needed by this riglet
tools = [
pkgs.mytool
./path/to/some/script.sh
];
# The metadata that will enable your agent to know what this riglet
# provides and when it should be consulted
meta = {
intent = "cookbook";
# 'base', 'sourcebook', 'toolbox', 'cookbook', or 'playbook':
# what should the agent expect from this riglet: general knowledge
# that may come useful vs. highly specific procedure(s) to follow
description = "What this provides";
whenToUse = [
"Need to know about X"
"Want to achieve Y"
"Have problems with Z"
...
];
keywords = [ "search" "terms" ];
status = "draft";
version = "0.1.0";
};
# The Skill part of the riglet. It is a file hierarchy that should contain a
# SKILL.md entry right under the root
docs = riglib.writeFileTree {
# Use inline strings...
"SKILL.md" = ''
# My Riglet Documentation
...
For more advanced cases, see references/advanced-cases.md
'';
references = {
# ...or local file paths...
"advanced-cases.md" = ./path/to/advanced-cases.md;
# ...or derivations that build a file
"foo.md" = pkgs.writeText "foo.md" (mkFooContents x y z t);
};
};
# Alternatively, if you already ha