Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: agentsmd-restore description: Restore hooks.json, config.toml, and AGENTS.md from an agentsmd pre-install snapshot. Use after a bad install/update merge. Not for ordinary uninstall; dry-run unless confirmed.
agentsmd-restore
Use the selected SKILL.md absolute path from the live skills list; never infer it from the process cwd. Define and call the adjacent launcher in the same shell. The launcher preserves selected bundle → manifest-owned standalone → versioned CLI identity checks and exports plugin context only for a verified selected bundle.
SKILL_MD="<selected SKILL.md absolute path from the live skills list>"agentsmd_skill_run() {node "$(dirname "$SKILL_MD")/scripts/agentsmd-run.js" "$SKILL_MD" "$@"}
install/update mutate three files shared with Codex and other tenants. The write is atomic (crash-safe), and also reversible: install snapshots all three into .agentsmd-state/backups/<id>/ before touching them (rotated — the newest 5 kept). If a merge came out logically wrong, restore the prior bytes:
agentsmd_skill_run --list # snapshots + purposeagentsmd_skill_run # DRY-RUN — newest compatible snapshotagentsmd_skill_run --confirm # apply compatible snapshotagentsmd_skill_run --id=<id> --confirm
- Dry-run by default — a bare
restoreprints what it would overwrite and writes nothing;--confirmperforms the write. - Backups are labeled
pre-installorpre-uninstall. A bare restore selects the newest compatiblepre-installsnapshot. Both default and explicit--idrestores reject a snapshot whose agentsmd hooks/spec footprint does not match the current install manifest, because restoring only the shared files would create a partial install. Legacy snapshots without these labels are classified from their actual hooks/spec contents and accepted only when that derived state matches. - Restore overwrites the live files with the snapshot, discarding any change made since that backup — by every tenant, not just agentsmd. That is the point (full rollback of a bad merge), but it is why it is dry-run-first.
- Only files that existed at backup time are restored; a file that was absent then is left alone (never deleted).
- To remove just agentsmd's own entries and preserve everyone else, use
agentsmd uninstallinstead — it is marker-scoped and multi-tenant-safe. Restore is the cruder "give me the exact prior bytes" tool for when a merge misbehaved.
The install manifest (.agentsmd-state/manifest.json) records the backup id from the last install. From the repo instead of an install: node scripts/restore.js.