reyn skill¶
Manage version history and roll back skill definitions. Reads snapshots
created by the skill_improver finalize step (FP-0006 Component B), stored
under .reyn/skill-versions/<name>/.
Synopsis¶
Subcommands¶
reyn skill versions¶
List saved version snapshots for a skill.
Positional arguments¶
| Name | Description |
|---|---|
SKILL_NAME |
Name of the skill to inspect. Resolved via the standard lookup order (project → local → stdlib). |
Exit codes¶
| Code | Meaning |
|---|---|
0 |
Success — versions listed, or no versions saved yet (graceful). |
Output¶
If no snapshot directory exists for the skill:
reyn skill rollback¶
Restore a skill to a previous saved version.
Positional arguments¶
| Name | Description |
|---|---|
SKILL_NAME |
Name of the skill to roll back. |
Options¶
| Flag | Description |
|---|---|
--to vN |
Target version (e.g. v2). When omitted, defaults to the version immediately before the current one (current − 1). |
Behavior¶
- Reads
.reyn/skill-versions/<name>/currentfor the current version number. - Determines target version from
--toor defaults tocurrent - 1. - Verifies
.reyn/skill-versions/<name>/<target>.mdexists. - Atomically overwrites the skill's
skill.mdwith the snapshot content. - Updates
.reyn/skill-versions/<name>/currentto the restored version. - Emits a
skill_rolled_backP6 event to.reyn/events/direct/cli/<YYYY-MM-DD>.jsonl. - Prints a confirmation line to stdout.
Stdlib restriction¶
Rolling back a stdlib skill is refused. Stdlib skills are ship-bundled and
must remain immutable. To customise a stdlib skill, copy it to
reyn/project/<name>/ first, then roll back the project copy.
Exit codes¶
| Code | Meaning |
|---|---|
0 |
Rollback succeeded. |
1 |
Refused — target is a stdlib skill. |
2 |
Error — skill not found, no versions saved, or target version file missing. |
Output¶
Rolled back 'my_skill' from v3 to v2.
skill.md content restored from .reyn/skill-versions/my_skill/v2.md.
Examples¶
List all saved snapshots:
Check a skill that has no saved snapshots yet (exits 0):
Roll back to the previous version (current − 1):
Roll back to a specific version:
Snapshot directory layout¶
.reyn/skill-versions/
my_skill/
v1.md # snapshot at first save
v2.md # snapshot after first improvement
v3.md # snapshot after second improvement
current # plain-text file containing "3"
Snapshots are written by skill_improver (FP-0006 Component B). This command
reads them; it never creates new snapshots.
See also¶
reyn skills— list and inspect all installed skills- Reference: stdlib/skill_improver — creates snapshots
- Proposal: FP-0006 skill self-improvement — Component B (versioning) and Component E (CLI)
- Reference: events —
skill_rolled_back— P6 event payload