home / skills / barefootford / buttercut / backup-library
This skill creates compressed ZIP backups of the libraries directory, including library.yaml and transcripts, and helps restore libraries when needed.
npx playbooks add skill barefootford/buttercut --skill backup-libraryReview the files below or copy the command above to add this skill to your agents.
---
name: backup-library
description: Creates compressed ZIP backups of libraries directory. Backs up library.yaml, transcripts, and roughcuts (not video files). This skill can also be useful when you need to restore a library.
---
# Skill: Backup Library
Verify libraries directory exists:
```bash
ls -la libraries/
```
Run backup:
```bash
ruby .claude/skills/backup-library/backup_libraries.rb
```
Creates `backups/libraries_YYYYMMDD_HHMMSS.zip` containing the entire libraries directory.
## Restore Library
To restore from a backup, extract the ZIP file to the project root.
```bash
unzip backups/libraries_timestamp.zip -d .
```
This restores all libraries to their original locations.
This skill creates compressed ZIP backups of the libraries directory, capturing library metadata and editable assets while excluding large video files. It produces timestamped archives suitable for safe storage or transfer and supports straightforward restoration to the project root. Use it to snapshot library state before major edits or to prepare archives for handoff.
The script checks that a libraries directory exists and then compresses the directory contents into a single ZIP file placed in backups/, named libraries_YYYYMMDD_HHMMSS.zip. It includes library.yaml files, transcripts, roughcuts, and other small assets but intentionally skips raw video files to keep archives compact. To restore, simply extract the ZIP at the project root and the libraries are returned to their original paths.
Does the backup include video files?
No. The backup intentionally excludes raw video files to keep archives small; it focuses on YAML, transcripts, roughcuts, and related small assets.
How do I restore a library from a backup?
Unzip the timestamped archive at the project root (unzip backups/libraries_timestamp.zip -d .) and the libraries will be restored to their original locations.