shelf archive
Moves a library skill out of the library into ~/.shelf/archive/, without deleting anything. Its revisions stay recorded, and moving the directory back restores it. Refused while any project borrows the skill.
On this page
shelf archive <name>| Argument | Description |
|---|---|
<name> | Skill name |
Also takes the global options --json and --actor (CLI overview).
What it does
Moves ~/.shelf/library/<name> to ~/.shelf/archive/<name>-<timestamp>/ (UTC, such as commit-messages-2026-10-07T05-35-15) and marks the skill archived. Archived skills disappear from catalog, search, sets and the dashboard. Their snapshots stay in ~/.shelf/objects/.
To restore, move the directory back to ~/.shelf/library/<name>. The next command picks it up with its history.
The archived skill keeps its name: new, rename, duplicate and add refuse to use it.
Project copies and lockfiles carry the skill's name, so archiving a borrowed skill is refused. Return it from every project first. Agents archive skills only when you ask.
Examples
shelf archive commit-messages
Archived commit-messages to /home/me/.shelf/archive/commit-messages-2026-10-07T05-35-15
Its revisions are kept. To restore it, move that directory back into the library.shelf archive api-design
error: api-design is borrowed by billing-api, storefront. Archiving it would orphan their copies and lockfiles.
hint: Return it from billing-api, storefront first (`shelf return api-design` in each project)JSON output
{"schemaVersion":1,"ok":true,"data":{"skill":"demo-three","path":"/home/me/.shelf/archive/demo-three-2026-10-07T05-51-51"}}path is where the directory went.
Errors
| Code | When |
|---|---|
SKILL_NOT_FOUND | No skill by that name in the library. |
CONFLICT | A project borrows the skill. |