2.5 KiB
name, description
| name | description |
|---|---|
| repo-lib-consumer | Edit or extend repos that consume `repo-lib` through `repo-lib.lib.mkRepo`, `mkDevShell`, or `mkRelease`. Use when Codex needs to add or change tools, shell packages, checks or test phases, formatters, release steps, release channels, bootstrap hooks, or release automation in a Nix flake built on repo-lib. |
Repo Lib Consumer
Use this skill to make idiomatic changes in a repo that already depends on repo-lib.
Workflow
-
Detect the integration style. Search for
repo-lib.lib.mkRepo,repo-lib.lib.mkDevShell,repo-lib.lib.mkRelease, orinputs.repo-lib. -
Prefer the repo's current abstraction level. If the repo already uses
mkRepo, stay onmkRepo. If the repo still usesmkDevShellormkRelease, preserve that style unless the user asked to migrate. -
Load the right reference before editing. Read
references/api.mdfor exact option names, defaults, generated outputs, and limitations. Readreferences/recipes.mdfor common edits such as adding a tool, adding a test phase, wiring release file updates, or handling webhooks. -
Follow repo-lib conventions. Add bannered CLIs through
perSystem.tools, notshell.packages. Useshell.packagesfor packages that should be present in the shell but not shown in the banner. Keep shells pure-first; only usebootstrapwithallowImpureBootstrap = true. Prefer structuredrelease.stepsover free-form shell when the task fitswriteFileorreplace. -
Verify after edits. Run
nix flake show --json. Runnix flake checkwhen feasible. If local flake evaluation cannot see newly created files because the repo is being loaded as a git flake, stage the new files before rerunning checks.
Decision Rules
- Prefer
repo-lib.lib.tools.fromPackagefor tools with explicit metadata. - Use
repo-lib.lib.tools.simpleonly for very simple--versionorversionprobes. - Put pre-commit and pre-push automation in
checks, not shell hooks. - Treat
postVersionas pre-tag and pre-push. It is not a true post-tag hook. - For a webhook that must fire after the tag exists remotely, prefer CI triggered by tag push over local release command changes.
References
-
references/api.mdUse for the exact consumer API, option matrix, generated outputs, release ordering, and legacy compatibility. -
references/recipes.mdUse for concrete change patterns: add a tool, add a test phase, update release-managed files, or wire webhook behavior.