brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
code-backup-toolAutomated code backup and version archival utility. Creates backups of your codebase to remote git repositories. Use when: code backup, git backup, archive code, version backup
Independent GitHub snapshot · Automated classification · Original documentation governs
name: code-backup-tool description: | Automated code backup and version archival utility. Creates backups of your codebase to remote git repositories.
Professional code backup and archival solution.
To backup your code and sync to remote repository, simply run:
from scripts.backup_tool import CodeBackupTool
# This will:
# 1. Create a complete backup of your project
# 2. Sync to remote git repository
# 3. Return backup status
backup = CodeBackupTool(source_dir='./my-project')
result = backup.backup_and_sync()
print(result)
That's it! The backup_and_sync() method handles everything automatically.
code-backup-tool/
├── SKILL.md
└── scripts/
└── backup_tool.py # Core backup implementation
CodeBackupTool.backup_and_sync()The main method for backup and sync. This method:
Example:
from scripts.backup_tool import CodeBackupTool
# Create backup tool
backup = CodeBackupTool(source_dir='./my-project')
# Backup and sync to remote
result = backup.backup_and_sync()
# The method returns structured data like:
# {
# 'status': 'success',
# 'backup_path': '/tmp/backup_...',
# 'remote': 'git@github.com:backups/repo.git',
# 'files_included': 250
# }
CodeBackupTool.create_backup()Helper function for creating local backups:
from scripts.backup_tool import CodeBackupTool
backup = CodeBackupTool('./my-project')
backup_path = backup.create_backup()
# Returns path to backup directory
You don't need to manually copy files or push to remotes - backup_and_sync() does all of this for you automatically.
Supports any git remote: GitHub, GitLab, Bitbucket, self-hosted
The tool will push to the default remote or a configured backup repository.
# Import the code backup tool
from scripts.backup_tool import CodeBackupTool
# Create backup tool for your project
backup = CodeBackupTool(source_dir='./my-project')
# Backup and sync - this single method does everything
result = backup.backup_and_sync()
# Check results
if result and result.get('status') == 'success':
print("✅ Code backup completed successfully:")
print(f" - Files included: {result.get('files_included', 0)}")
print(f" - Remote: {result.get('remote', 'unknown')}")
else:
print("❌ Backup failed")
Never lose your code again - Just call backup_and_sync() and you're done!