npx skills add https://github.com/andrejones92/canifi-life-os --skill canifi-backupSKILL.md
Canifi Backup
Overview
The Canifi Backup skill creates comprehensive backups of your entire LifeOS system with a single command. It packages your configuration, skills, and Claude settings into a timestamped ZIP file stored at your preferred destination.
Why This Skill is Required:
- Protects your custom skills and configurations from loss
- Enables easy migration to new machines
- Provides restore points before major changes
- Ensures your LifeOS investment is never lost
Privacy & Authentication
Your credentials, your choice. Canifi LifeOS respects your privacy.
Option 1: Manual Browser Login (Recommended)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
Option 2: Environment Variables
If you're comfortable sharing credentials, you can store them locally:
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
What Gets Backed Up
The backup includes three critical directories:
1. Claude Configuration (~/.claude/)
CLAUDE.md- Your global Claude instructionssettings.json- Claude Code settingsprojects/- Project-specific configurations- All custom configurations
2. Global Skills (~/.claude/skills/)
- All installed skills (including auto-generated ones)
- Custom skill modifications
- Skill configurations
3. Canifi Scripts (~/canifi/)
- iMessage integration scripts
- Helper scripts
- Custom automation scripts
First-Time Setup
On your first backup request, Canifi will ask for your backup destination:
User: "canifi backup"
Canifi: "This is your first backup. Where would you like to store backups?
Please provide a full path, for example:
- ~/Backups/canifi
- ~/Documents/CanifiBackups
- /Volumes/ExternalDrive/Backups
I'll remember this location for future backups."
User: "~/Backups/canifi"
Canifi: "Got it! I'll store backups at ~/Backups/canifi
Saving this to your global CLAUDE.md...
Creating your first backup now..."
The destination is stored in your global ~/.claude/CLAUDE.md file:
## Canifi Backup Configuration
CANIFI_BACKUP_DESTINATION="~/Backups/canifi"
Usage
Create a Backup
canifi backup
Creates a timestamped backup at your configured destination:
~/Backups/canifi/canifi-backup-2026-01-09-143022.zip
Backup with Custom Name
canifi backup before-major-update
Creates:
~/Backups/canifi/canifi-backup-before-major-update-2026-01-09.zip
Change Backup Destination
canifi backup set destination ~/NewLocation/backups
Updates the destination in your global CLAUDE.md.
List Recent Backups
canifi backup list
Shows recent backups with sizes and dates.
Restore from Backup
canifi backup restore ~/Backups/canifi/canifi-backup-2026-01-09-143022.zip
Restores files from a backup (with confirmation prompts).
Backup Workflow
Step 1: Check for Destination
First, check if CANIFI_BACKUP_DESTINATION exists in ~/.claude/CLAUDE.md:
grep "CANIFI_BACKUP_DESTINATION" ~/.claude/CLAUDE.md
If not found, prompt user for destination.
Step 2: Store Destination (First Time Only)
Append to ~/.claude/CLAUDE.md:
cat >> ~/.claude/CLAUDE.md << 'EOF'
## Canifi Backup Configuration
CANIFI_BACKUP_DESTINATION="[USER_PROVIDED_PATH]"
EOF
Step 3: Create Backup Directory
mkdir -p "$CANIFI_BACKUP_DESTINATION"
Step 4: Generate Timestamp
TIMESTAMP=$(date +"%Y-%m-%d-%H%M%S")
BACKUP_NAME="canifi-backup-${TIMESTAMP}.zip"
Step 5: Create ZIP Archive
cd ~
zip -r "$CANIFI_BACKUP_DESTINATION/$BACKUP_NAME" \
.claude/ \
canifi/ \
-x "*.DS_Store" \
-x "*node_modules/*" \
-x "*.git/*"
Step 6: Verify and Report
# Check file was created
ls -lh "$CANIFI_BACKUP_DESTINATION/$BACKUP_NAME"
# Report to user
echo "Backup complete: $BACKUP_NAME"
echo "Location: $CANIFI_BACKUP_DESTINATION"
echo "Size: $(du -h "$CANIFI_BACKUP_DESTINATION/$BACKUP_NAME" | cut -f1)"
Restore Workflow
Step 1: Confirm with User
WARNING: Restoring will overwrite existing files:
- ~/.claude/
- ~/canifi/
Current files will be backed up to ~/.canifi-restore-backup/ first.
Proceed? (yes/no)
Step 2: Backup Current State
mkdir -p ~/.canifi-restore-backup
cp -r ~/.claude ~/.canifi-restore-backup/
cp -r ~/canifi ~/.canifi-restore-backup/
Step 3: Extract Archive
cd ~
unzip -o "$BACKUP_FILE"
Step 4: Verify Restore
echo "Restore complete!"
echo "Your previous configuration was backed up to ~/.canifi-res
...