Skip to main content

Backup & Restore

Protect your skills and recover from mistakes.

Overview

Skillshare maintains automatic backups and provides manual backup/restore commands.

┌─────────────────────────────────────────────────────────────┐
│ BACKUP SYSTEM │
│ │
│ TARGETS ──► backup ──► ~/.config/skillshare/backups/ │
│ │
│ BACKUPS ──► restore ──► TARGETS │
│ │
└─────────────────────────────────────────────────────────────┘

Automatic Backups

Backups are created automatically before:

  • skillshare sync
  • skillshare target remove

Location: ~/.config/skillshare/backups/<timestamp>/


Manual Backup

All targets

skillshare backup

Specific target

skillshare backup claude

Preview

skillshare backup --dry-run

List Backups

skillshare backup --list

Example output:

Backups
─────────────────────────────────────────
2026-01-20_15-30-00/
claude/ 5 skills, 2.1 MB
cursor/ 5 skills, 2.1 MB
2026-01-19_10-00-00/
claude/ 4 skills, 1.8 MB

Restore

From latest backup

skillshare restore claude

From specific backup

skillshare restore claude --from 2026-01-19_10-00-00

Preview

skillshare restore claude --dry-run

What Restore Does

┌─────────────────────────────────────────────────────────────┐
│ skillshare restore claude │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ 1. Find latest backup for claude │
│ → backups/2026-01-20_15-30-00/claude/ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ 2. Remove current target directory │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ 3. Copy backup to target │
│ → ~/.claude/skills/ │
└─────────────────────────────────────────────────────────────┘

Note: After restore, the target contains real files (not symlinks). Run skillshare sync to re-establish symlinks.


Cleanup Old Backups

skillshare backup --cleanup

Removes backups older than the configured retention period.


Recovery Scenarios

# If git is initialized (recommended)
cd ~/.config/skillshare/skills
git checkout -- deleted-skill/

# Or restore from backup
skillshare restore claude
skillshare sync

Messed up sync mode

skillshare restore claude
skillshare target claude --mode merge
skillshare sync

Want to undo recent changes

skillshare backup --list
skillshare restore claude --from <earlier-timestamp>

Best Practices

Before risky operations

skillshare backup

After major changes

skillshare push -m "Major update"  # Git backup

Weekly maintenance

skillshare backup --cleanup

Git as Backup

Git provides an additional backup layer:

# Recover deleted skill
cd ~/.config/skillshare/skills
git checkout -- deleted-skill/

# See history
git log --oneline

# Restore to previous commit
git checkout <commit-hash> -- specific-skill/