skillrig is a CLI for pointing a repository (or your per-user default) at an
origin — the OWNER/REPO that hosts your team's agent skills — and resolving
which origin is active for any working directory.
NOTE: a skillrig origin is a GitHub repository with a determined structure, use the template repository provided to create your own origin.
Requires Go 1.24+ and git on your PATH (used for an offline repo-root lookup).
go build -o skillrig .# Run from anywhere in the repo; the config lands at the git repository root.
skillrig init --origin my-org/my-skillsThis writes .skillrig/config.toml at the git repository root (or the current
directory if you are not inside a git repo). init is idempotent and
consume-only: it records an existing origin, never creates or scaffolds one,
and binding the same origin twice is a no-op.
# Used when a repo has no origin of its own.
skillrig init --origin my-org/my-skills --globalWrites $XDG_CONFIG_HOME/skillrig/config.toml (or ~/.config/skillrig/config.toml).
# Never prompt; fail fast if --origin is missing (safe for CI/agents).
skillrig init --origin my-org/my-skills --non-interactive
# Machine-readable result.
skillrig init --origin my-org/my-skills --jsonEvery command resolves the active origin with a single rule — highest wins:
SKILLRIG_ORIGIN > project .skillrig/config.toml (nearest ancestor) > global config
SKILLRIG_ORIGINoverrides everything without editing any file:A blank/whitespace value is treated as unset.SKILLRIG_ORIGIN=ci-org/ci-skills skillrig <command>
- The project config is found by walking up from the current directory, so any subdirectory of a bound repo resolves the same origin.
- A malformed or origin-less config file is skipped; resolution continues down the
order. When no source supplies an origin, commands report "no origin configured" —
fix it with
skillrig init --origin OWNER/REPO, by settingSKILLRIG_ORIGIN, or with a--globaldefault.
| Code | Meaning |
|---|---|
0 |
Success (including an idempotent no-op) |
1 |
Usage or configuration error (bad flags, invalid origin, no origin configured) |
Codes 2 (verification) and 3 (prerequisite) are reserved for later commands.
The v0 config.toml holds a single key:
origin = 'my-org/my-skills'Unknown keys are ignored on read, so config added by later versions will not break this
one. The full, extended config.toml structure is documented on the project docs
website; see also docs/design/cli.md for the CLI design contract.