agentleFS
hazarsozerhazarsozer/ren-os/skills/backup/SKILL.md

backup

Skill2 starsChanged 2 months agoMITView on GitHub

Use when the friend wants to back up their wiki to a private remote, or check backup status. Triggers on /ren:backup with optional subcommands (--setup, --tarball, --status). Git push primary, tarball fallback.

  • Commits and pushes

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use restore.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nikosdionSkill

    restore

    Restore a Joomla or WordPress site backup created by Akeeba Backup (Joomla/WordPress) or Akeeba Solo using Akeeba Kickstart and the Akeeba Backup Restoration Script, including multipart archive handling, restoration configuration, and post-restore cleanup.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Ensure the wiki is a git repo — ensure_git_repo runs git init if it isn't one.

    line 63
  2. Distinctive:

    Commit any pending changes (idempotent if the tree is clean).

    line 64
  3. Very specific:

    If a backup remote is configured: push.

    line 65
  4. Very specific:

    If no remote configured: tarball, with a nag to run --setup.

    line 66
  5. Very specific:

    After any tarball: prune to TARBALL_RETENTION_KEEP (default 20) most recent.

    line 67
  6. Distinctive:

    Read-only report: is the wiki a git repo, remote URL (or "not configured"), last commit sha/date, tarball count + oldest/newest tarball …

    line 79

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

backup

Wiki-only backup: git push to a configured backup remote is primary; a local tarball is the fallback (no remote configured, push fails, or --tarball forced).

Delta from donor: the remote is named "backup", not "origin"

skills.metric-watch.lib's _check_backup (Task 6.3, shipped first) already checks for a git remote literally named "backup" and reads tarballs from plugin_data_dir()/"backups". This skill's default remote name and backup directory match that contract exactly — backup_configured() (this skill) and _check_backup() (metric-watch) read the exact same state, so they can never silently disagree.

When to use this skill

  • Friend invokes /ren:backup (commits + pushes if the backup remote is configured; else tarball)
  • Friend invokes /ren:backup --setup <remote-url> to configure the backup git remote (typically a private GitHub repo)
  • Friend invokes /ren:backup --tarball to force a tarball even if a remote is configured
  • Friend invokes /ren:backup --status for a status report

Behavior

/ren:backup

  1. Ensure the wiki is a git repo — ensure_git_repo runs git init if it isn't one. Refuse only if that init fails (git-init-failed).
  2. Commit any pending changes (idempotent if the tree is clean).
  3. If a backup remote is configured: push. Success → done, no tarball. Non-fast-forward → refuse (never force-push automatically; point at the recovery doc). Transport failure → tarball fallback + warning.
  4. If no remote configured: tarball, with a nag to run --setup.
  5. After any tarball: prune to TARBALL_RETENTION_KEEP (default 20) most recent.

/ren:backup --setup <remote-url>

Validates the URL shape, initialises the wiki as a git repo if it isn't one (ensure_git_repo), adds or updates the backup remote, and reads it back to confirm.

/ren:backup --tarball

Skips the push path entirely; always tarball (commits pending changes first).

/ren:backup --status

Read-only report: is the wiki a git repo, remote URL (or "not configured"), last commit sha/date, tarball count + oldest/newest tarball dates.

Remote-change confirmation is NOT re-implemented here

Donor's SKILL.md described a "confirm before changing the backup remote" behavior at the skill level. In RenOS, that confirmation is enforced structurally by the Task 6.2 write_gate PreToolUse hook (hooks/guards/write_gate.py), which already gates backup-remote-change operations per spec §3.6 A-8 item 6. This skill's setup_remote() does not duplicate that confirmation — it trusts the hook layer to have already gated the call before this function runs.

What this skill does NOT do

  • Back up anything other than the wiki. Plugin-internal state (e.g. other plugins' local caches) is explicitly out of scope.
  • Force-push on a non-fast-forward rejection. That's a human decision, always.
  • Decide backup cadence. /ren:metric-watch's backup-unconfigured finding is the nag mechanism for "you haven't backed up"; this skill just performs the backup when invoked.

Failure-degradation modes

FailureBehaviorUser-visible
No remote configured + /ren:backupTarball fallback automatic + nag"No remote configured. Created tarball at <path>. Configure with /ren:backup --setup <url>"
git push network failureTarball fallback + warning"Push failed (network). Tarball at <path>. Retry with /ren:backup later."
Non-fast-forward push rejectionRefused, no auto-tarball (user decision moment)"Push rejected: remote diverged. See recovery doc. Force-push NOT performed automatically."
Wiki not a git repogit init run automatically, then proceed(silent — the wiki becomes a repo on first /ren:backup or --setup)
git init failsRefused"Could not initialise a git repo at <path>. Is it a directory git can write to?"

References

  • Task 6.3 (skills/metric-watch/lib) — the _check_backup contract this skill's backup_configured()/remote-name/dir match exactly
  • Task 6.2 (hooks/guards/write_gate.py) — the remote-change confirmation enforcement layer
  • skills/backup/lib/__init__.py (donor, ~/Dev/startup-framework) — the carried implementation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.