Skip to content
Back to skills

Backup

ASecurity

Automated hourly backup skill that creates timestamped archives of Cognithor config files, skill definitions, and data directories on a cron schedule. Use when setting up automated backups, restoring from snapshots, scheduling data protection, or configuring backup retention policies.

  • 153 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aibash

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add Alex8791-cyber/cognithor --skill backup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Backup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Backup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alex8791-cyber-backup/badge)](https://www.skillsdirectory.com/skills/alex8791-cyber-backup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: backup
description: "Automated hourly backup skill that creates timestamped archives of Cognithor config files, skill definitions, and data directories on a cron schedule. Use when setting up automated backups, restoring from snapshots, scheduling data protection, or configuring backup retention policies."
---

# Backup

Automated backup skill that creates timestamped archives of Cognithor configuration, skills, and data on a cron schedule (`0 * * * *` — hourly by default).

## Steps

1. **Check prerequisites** — verify backup target exists and has write access:
   ```bash
   BACKUP_DIR="${COGNITHOR_HOME:-$HOME/.cognithor}/backups"
   mkdir -p "$BACKUP_DIR" && test -w "$BACKUP_DIR"
   ```
2. **Create timestamped archive** of config, skills, and data:
   ```bash
   STAMP=$(date +%Y%m%d_%H%M%S)
   tar czf "$BACKUP_DIR/cognithor_$STAMP.tar.gz" \
     -C "${COGNITHOR_HOME:-$HOME/.cognithor}" \
     config/ skills/ data/
   ```
3. **Validate integrity** — verify the archive is readable:
   ```bash
   tar tzf "$BACKUP_DIR/cognithor_$STAMP.tar.gz" > /dev/null
   ```
4. **Prune old backups** — keep the last 24 hourly snapshots:
   ```bash
   ls -1t "$BACKUP_DIR"/cognithor_*.tar.gz | tail -n +25 | xargs rm -f
   ```
5. **Return status** — the skill returns `{"status": "ok", "automated": true}` on success

## Example

```
User > Starte ein Backup meiner Cognithor-Daten
Cognithor > Backup erstellt: cognithor_20260420_140000.tar.gz (12 MB)
         Nächstes automatisches Backup: 15:00 Uhr
```

## Error Handling

- **Disk full**: Log warning, skip archive creation, alert user to free space
- **Permission denied**: Verify `$BACKUP_DIR` ownership and retry with correct permissions
- **Corrupt archive**: Re-run backup immediately; if persistent, check filesystem health

Files in this skill

  • SKILL.md1.8 KB
  • manifest.json98 B
  • skill.py278 B
  • test_skill.py112 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.