Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add Andrejones92/canifi-life-os --skill "canifi-backup"
Install specific skill from multi-skill repository
# Description
Automated backup system for your entire Canifi LifeOS configuration, skills, and Claude settings
# SKILL.md
name: canifi-backup
description: Automated backup system for your entire Canifi LifeOS configuration, skills, and Claude settings
category: productivity
version: 1.0.0
author: Canifi LifeOS
required: true
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:
1. Complete the Browser Automation Setup using CDP mode
2. Login to the service manually in the Playwright-controlled Chrome window
3. 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-restore-backup/"
Backup Contents Structure
canifi-backup-2026-01-09-143022.zip
βββ .claude/
β βββ CLAUDE.md
β βββ settings.json
β βββ projects/
β β βββ [project-specific configs]
β βββ skills/
β βββ canifi/
β βββ canifi-skill-generator/
β βββ canifi-backup/
β βββ [all other skills]
βββ canifi/
βββ canifi-send.sh
βββ canifi-help.sh
βββ canifi-status.sh
βββ canifi-stream.sh
βββ canifi-pause.sh
βββ canifi-resume.sh
βββ canifi-abort.sh
βββ canifi-imessage-monitor.sh
Configuration in CLAUDE.md
After first backup, your ~/.claude/CLAUDE.md will include:
## Canifi Backup Configuration
CANIFI_BACKUP_DESTINATION="~/Backups/canifi"
### Backup History
- Last backup: 2026-01-09 14:30:22
- Total backups: 5
- Oldest backup: 2026-01-01
Automatic Backup Triggers
Consider setting up automatic backups:
Before Major Operations
The skill generator can trigger a backup before creating new skills:
"Creating new skill 'todoist'...
Running pre-change backup first..."
Scheduled Backups
Add to your workflow:
canifi backup weekly
Pre-Update Backups
Before updating Canifi LifeOS:
canifi backup pre-update
Cloud Backup Destinations
You can set your backup destination to cloud-synced folders:
iCloud Drive (macOS)
~/Library/Mobile Documents/com~apple~CloudDocs/Backups/canifi
Dropbox
~/Dropbox/Backups/canifi
Google Drive
~/Google Drive/Backups/canifi
OneDrive
~/OneDrive/Backups/canifi
This way your backups are automatically synced to the cloud!
Troubleshooting
"Destination not found"
# Create the directory
mkdir -p ~/Backups/canifi
# Or change destination
canifi backup set destination ~/NewPath
"Permission denied"
# Check permissions
ls -la ~/Backups/
# Fix if needed
chmod 755 ~/Backups/canifi
"Backup too large"
The backup excludes node_modules and .git by default. If still large:
# Check what's taking space
du -sh ~/.claude/* ~/canifi/*
"Cannot find CLAUDE.md"
# Create if missing
touch ~/.claude/CLAUDE.md
Example Session
User: "canifi backup"
Canifi: "I notice this is your first backup request.
Where would you like me to store your backups?
Suggested locations:
1. ~/Backups/canifi (local)
2. ~/Dropbox/Backups/canifi (cloud-synced)
3. Custom path
Please provide your preferred backup destination."
User: "Use Dropbox"
Canifi: "Setting backup destination to: ~/Dropbox/Backups/canifi
Updating ~/.claude/CLAUDE.md with backup configuration...
Creating directory ~/Dropbox/Backups/canifi...
Now creating your first backup...
Backing up:
β ~/.claude/ (1.2 MB)
β ~/.claude/skills/ (4.8 MB)
β ~/canifi/ (52 KB)
Backup complete!
π¦ canifi-backup-2026-01-09-143022.zip
π ~/Dropbox/Backups/canifi/
π Size: 6.1 MB
Your LifeOS is now backed up and syncing to Dropbox."
Security Notes
- Backups may contain sensitive data - Your CLAUDE.md might have API keys or credentials
- Encrypt sensitive backups - Consider using encrypted disk images for highly sensitive setups
- Cloud sync considerations - Cloud-synced folders upload your backup; ensure you trust the provider
- Exclude from git - Never commit backup ZIPs to version control
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.