Skip to content
Data Backup Manager logo

Data Backup Manager

Backup and manage game data including maps, NPCs, and configurations. Use when the user wants to backup data, create snapshots, export data, or restore from backups.

SKILL.md

Full skill instructions

Data Backup Manager

Backup, export, and manage game data for the Babylon.js first-person game.

Quick Start

Create timestamped backup

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p backups/​$TIMESTAMP
cp -r public/​data backups/​$TIMESTAMP/
echo "Backup created: backups/​$TIMESTAMP"

List all backups

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
ls -lht backups/

Restore from latest backup

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
LATEST=$(ls -t backups/ | head -1)
cp -r backups/​$LATEST/​data/​* public/​data/
echo "Restored from: $LATEST"

Backup Operations

Backup specific data type

# Backup maps only
cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p backups/​$TIMESTAMP
cp -r public/​data/​maps backups/​$TIMESTAMP/
# Backup NPCs only
cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p backups/​$TIMESTAMP
cp -r public/​data/​npcs backups/​$TIMESTAMP/

Create compressed backup

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
tar -czf backups/​backup_$TIMESTAMP.tar.gz public/​data
echo "Compressed backup: backup_$TIMESTAMP.tar.gz"

Export as JSON

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
# Pretty print all JSON files
for file in public/​data/​**/​*.json; do
  echo "Formatting: $file"
  node -e "console.log(JSON.stringify(JSON.parse(require('fs').readFileSync('$file')), null, 2))" > "$file.tmp" && mv "$file.tmp" "$file"
done

Data Validation

Check JSON validity

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
for file in public/​data/​**/​*.json; do
  echo -n "Checking $file: "
  node -e "JSON.parse(require('fs').readFileSync('$file'))" && echo "✓ Valid" || echo "✗ Invalid"
done

Count data files

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
echo "Maps: $(find public/​data/​maps -name '*.json' | wc -l)"
echo "NPCs: $(find public/​data/​npcs -name '*.json' | wc -l)"
echo "Events: $(find public/​data/​events -name '*.json' | wc -l)"
echo "Investigations: $(find public/​data/​investigations -name '*.json' | wc -l)"

Restore Operations

Restore from specific backup

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
# List available backups first
ls -1 backups/

# Restore from chosen backup (replace BACKUP_NAME)
BACKUP_NAME="20250117_143000"
cp -r backups/​$BACKUP_NAME/​data/​* public/​data/
echo "Restored from: $BACKUP_NAME"

Restore specific file

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
LATEST=$(ls -t backups/ | head -1)
cp backups/​$LATEST/​data/​maps/​world.json public/​data/​maps/
echo "Restored world.json from: $LATEST"

Best Practices

  1. Backup before major changes: Always create backup before editing data
  2. Use timestamps: Makes it easy to track when backups were created
  3. Validate JSON: Check JSON validity after editing
  4. Regular backups: Create backups at end of work sessions
  5. Test restores: Periodically test that backups work
  6. Version control: Backups complement git, don't replace it

Cleanup

Remove old backups (keep last 10)

cd /​home/​gianfiorenzo/​Documents/​Vs\ Code/​babylon_fp
ls -t backups/ | tail -n +11 | xargs -I {} rm -rf backups/​{}
echo "Cleaned up old backups"

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View