ypares/rigup.nix/agent-rig-system
Claude Code and agent skill by ypares/rigup.nix
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install ypares/rigup.nix/agent-rig-systemSKILL.md
Agent Rig System
Overview
A rig is a collection of _riglets_ that provide knowledge and tools for AI agents. Rigs and riglets are packaged as Nix flake outputs, so they can both be used inside the project defining them and by other projects depending on it.
Core Concepts
Riglet
A riglet is executable knowledge packaged with its dependencies, as a Nix module:
- Metadata: When should this riglet be used, is it production-ready or experimental, etc.
- Knowledge: SKILL.md + detailed
references/*.mdfiles documenting processes and recipes - Tools: Nix packages needed to execute those recipes
- Configuration: Settings to adapt tools' behaviour to project context
Rig
A project-level structure that declares which riglets are active:
- Uses
buildRigto compose riglet modules - Builds combined tool environment declaratively
- Exposes riglets' tools and documentation
rigup
A Nix library and CLI tool: http://github.com/YPares/rigup.nix
rigup Nix library
Main functions:
buildRig: evaluates riglet modules and ensures they comply with the riglet schema used by rigup. Returns the rig as an attrset:{ toolRoot = <derivation>; meta = { <riglet> = {...}; }; docAttrs = { <riglet> = <derivation>; }; docRoot = <derivation>; home = <derivation>; shell = <derivation>; }resolveProject: inspects theriglets/folder of a project and itsrigup.tomlto find out which riglets and rigs it defines. It callsbuildRigfor each rig in therigup.tomlgenManifest: generates a markdown+XML manifest file describing the contents of a rig, primarily for AI agent's consumptionmkRiglib: creates a set of utility functions to be used to define riglet Nix modules
Defined in {{repoRoot}}/lib/default.nix.
rigup CLI tool
A Rust app. It provides convenient access to rig outputs, via commands like rigup build and rigup shell, and project scaffolding via rigup new. This tool is meant for the user primarily. Agents should not have to call it directly.
Defined in {{repoRoot}}/packages/rigup
Riglet Structure
Riglets are Nix modules with access to riglib helpers
Example Riglet
The full Nix module schema of a riglet is defined in {{repoRoot}}/lib/rigletSchema.nix.
Examples of actual riglets: {{repoRoot}}/riglets.
Metadata
When defining a riglet, the meta section specifies its purpose, maturity, and visibility. See references/metadata-guide.md for comprehensive details on:
- meta.intent - Primary focus (base, sourcebook, toolbox, cookbook, playbook)
- meta.status - Maturity level (stable, experimental, draft, deprecated, example)
- meta.version - Semantic versioning of the riglet's interface
- meta.broken - Temporary non-functional state flag
- meta.disclosure - Visibility control (none, lazy, shallow-toc, deep-toc, eager)
Implementation Utilities
See references/riglib-utilities.md for details on helper functions available via riglib:
- riglib.writeFileTree - Convert nested attrsets to directory trees
- riglib.useScriptFolder - Convert folder of scripts into wrapped tool packages
riglib is defined in {{repoRoot}}/lib/mkRiglib.nix
Experimental Features
WARNING: These features are still experimental and their schema may change.
Prompt Commands
Riglets can define reusable prompt templates (slash commands) for agent harnesses like Claude Code:
Templates use standard Claude command syntax: $ARGUMENTS for all args, or $1, $2, etc. for specific positional arguments.
MCP Servers
Riglets can provide MCP (Model Context Protocol) servers to extend agent capabilities:
WARNING: API still experimental.
Cross-Riglet/Flake Interaction
Advanced patterns for composing riglets together and sharing configuration. See references/advanced-patterns.md for:
- Sharing configuration via
config - Dependencies and inheritance via
imports - Using packages from external flakes
Defining Rigs in Projects
Recommended: Use rigup.toml
Add a rigup.toml file to your project root:
Then use rigup.lib.resolveProject in your flake.nix:
Advanced: Directly use buildRig for complex config
For config not representable in TOML:
resolveProject outputs
riglets.<riglet>- Auto-discovered riglet modulesrigs.<system>.<rig>- Output ofbuildRigfor each discovered rig:toolRoot- Folder derivation. Tools combined via nixpkgsbuildEnvfunction (bin/, lib/, share/, etc.) and wrapped (when needed) to fix their XDG_CONFIG_HOMEconfigRoot- Folder derivation. The combined config files for the whole rig, with config files for all rig's _wrapped_ tools.meta.<riglet>- Attrset. Per-riglet metadata, as defined by the riglet's moduledocAttrs.<riglet>- Folder derivation. Per-riglet documentation folder derivationsdocRoot- Folder derivation. Combined derivation with docs for all riglets (one subfolder for each)home- Folder derivation. All-in-one directory for the rig: RIG.md manifest + .local/ + docs/ + .config/ foldersshell- Shell derivation (viapkgs.mkShell) exposing ready-to-use RIG_MANIFEST and PATH env varsextend- Nix function. Adds riglets to a pre-existing rig: takes{newName, extraModules}and returns a new rigmanifest- A manifest for this rig, overridable with options to shorten included paths to avoid repeatedly including long explicit paths into the Nix store
resolveProject is defined in {{repoRoot}}/lib/resolveProject.nix.
Using a Rig
The user decides how they and their agent should use the rig: either via its _shell_, _home_ or _entrypoint_ output derivations. In any case, the agent's focus should be is the RIG.md manifest file. This file lists all available riglets with:
- Name
- Description
- When to use each riglet
- Keywords for searching
- Documentation paths
Agents should read this file first to understand available capabilities.
buildRig output derivations
buildRig outputs a Nix attrset ("object") that notably contains several "all-in-one" derivations which all allow an AI agent to access the rig's tools and documentation. Which derivation to use depends on what is the most convenient given the user's setup. This section lists how and when to use each.
buildRig is defined in {{repoRoot}}/lib/buildRig.nix
shell output
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingriglets/agent-rig-system/SKILL.md
Popularity
- Repository stars
- 58
- Repository forks
- 1
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ypares/rigup.nix/agent-rig-system)