by WangPeterXF
Local-first Codex session backup, verified cleanup, restore, and reviewed cross-device context for macOS and Windows.
# Add to your Claude Code skills
git clone https://github.com/WangPeterXF/session-harborGuides for using ai agents skills like session-harbor.
session-harbor is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by WangPeterXF. Local-first Codex session backup, verified cleanup, restore, and reviewed cross-device context for macOS and Windows. It has 53 GitHub stars.
session-harbor's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/WangPeterXF/session-harbor" and add it to your Claude Code skills directory (see the Installation section above).
session-harbor is primarily written in JavaScript. It is open-source under WangPeterXF on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh session-harbor against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

Back up, verify, reclaim, restore, and review Codex session context across macOS and Windows.
SessionHarbor is an unofficial, local-first Codex plugin and zero-dependency Node.js CLI by Xiaofan Wang. It turns an external drive or mounted NAS into a verified filesystem vault for every stable local Codex rollout.
| Outcome | What SessionHarbor does |
|---|---|
| Back up every Codex session | Incremental, content-addressed backup with SHA-256 read-back and immutable device-owned snapshots. |
| Free local disk space safely | Keeps backup and cleanup separate; old originals become eligible only after inactivity, backup-age, open-file, and fresh verification gates. |
| Restore deleted local conversations | Materializes the verified raw rollout without consuming the vault copy. |
| Bridge multiple Codex computers | Lets macOS and Windows devices inspect verified peer inventories and stage reviewed, evidence-linked context. |
Open a new Codex task and paste the complete pinned prompt for English or 简体中文. A compact version is:
Set up SessionHarbor from https://github.com/WangPeterXF/session-harbor using the pinned v0.3.1
bootstrap prompt. Verify the owner, tag, license, and plugin before installing. Make this task my
SessionHarbor management center, start with the read-only dashboard, and do not mutate any real
session or drive without a separate explicit approval.
The setup verifies WangPeterXF/session-harbor and the pinned release before installing the
repo-local marketplace plugin. Installation, destination initialization, backup publication, local
cleanup, restore, and scheduling remain separate decisions.
AGENTS.md: repository-wide safety invariants, source map, validation, and review rules.docs/agent-index.md: compact task router for installation, operation, and development.llms.txt: small web index pointing to authoritative Markdown sources.llms-full.txt: generated combined context, checked for drift in CI.evals/plugin-discovery.json: five positive and three negative prompts for discovery precision and recall.Project page: https://wangpeterxf.github.io/session-harbor/
SessionHarbor is source-available for noncommercial use under the PolyForm Noncommercial License 1.0.0. Commercial use requires a separate written license; see commercial licensing. Because the license restricts commercial use, SessionHarbor is not Open Source Initiative (OSI) open-source software.
Version 0.3.1 implements full incremental backup, verified local cleanup, restore, cross-device
continuity, a conversational management dashboard, and multi-mode scheduling. Automated validation uses synthetic Codex homes, temporary
vaults, simulated interruptions, and Mac/Windows path fixtures. Each installation must still pass the
physical-drive checklist before local cleanup is enabled.
SessionHarbor never edits Codex SQLite, session_index.jsonl, generated memories, authentication, or
project files. It does not promise exact sidebar reconstruction. Raw JSONL remains the restore and
evidence source.
The initial cross-platform validation record, Windows defects found during physical-drive testing, and remaining preview limitations are summarized in the v0.3.1 release notes.
The repository includes copy-ready bootstrap prompts for
Chinese and English, pinned to the
official WangPeterXF/session-harbor v0.3.1 release. The prompt asks Codex to verify the pinned
repository and license, add the repository marketplace, install the plugin, read the verified skill
for the current chat, and turn that task into the user's long-lived SessionHarbor management center.
Official Codex behavior makes newly installed plugin skills available to new chats. The bootstrap prompt does not pretend the plugin hot-loaded: it explicitly reads the verified skill in the setup chat so that chat can continue immediately, while later chats use the normal installed plugin.
The management task starts read-only:
session-harbor dashboard --json --limit 50
session-harbor dashboard --state unbacked
session-harbor dashboard --state deleted
session-harbor dashboard --state waiting-backup-age
It reports cataloged/current/pending backups, local deletions, restorable sessions, retention waits, latest publication, and applied-backup progress. See the management-center workflow.
The settings the project exposes are deliberately separate:
{
"backup": {
"scope": "all",
"allowPartial": true,
"verifyExistingObjects": false
},
"retention": {
"cleanupAfterInactiveDays": 30,
"minimumBackupAgeDays": 7,
"reclaimAction": "keep",
"autoReclaim": false
}
}
backup.scope: always all; backup age and file size never filter disaster-recovery coverage.backup.allowPartial: a changing/open session is reported and retried on the next trigger while
other stable sessions can still be backed up.backup.verifyExistingObjects: false makes insertion/weekly runs compare stable source metadata
and stored object sizes, then hash only new or changed content. Set it to true for a deliberately
slower full scrub; verify and restore always perform cryptographic verification.cleanupAfterInactiveDays: only local sessions inactive for this many days enter cleanup review.minimumBackupAgeDays: keep the local original for this additional safety period after its latest
verified backup revision.reclaimAction:
keep keeps the local original indefinitely;link replaces it with a reversible link to a stable mounted vault;delete removes only the verified local original and remains restorable from the vault.autoReclaim: lets an explicitly installed schedule include a separate reclaim scope. It is off
by default.backup never deletes or links a local file. cleanup/reclaim is a different command. Delete mode
requires both --apply and --confirm-delete-local; autoReclaim defaults to false.
Legacy config v1-v3 age/grace keys migrate into config v4. Existing reclaim actions are preserved;
new configs default to keep.
Publication follows this order:
Cleanup is allowed only when the destination copy still matches the current local source, the inactivity and backup-age gates have elapsed, and the source is not open. A missing/mismatched volume, changed source, target conflict, corrupt object, symlinked path component, peer rollback, or unknown contract fails closed. Restore keeps the archive copy.
Fast scheduled backup does not replace periodic integrity verification. Run session-harbor verify
manually after unsafe removal, filesystem errors, or before enabling cleanup; cleanup itself always
re-hashes both local source and vault target before changing the local file.
codex-slim for lossless zstd compressionUse exchange.storageClass: "stable-mounted" for an external drive/NAS. iCloud, Baidu Netdisk, or
another client-managed synchronized folder must use "client-synced" together with reclaim action
keep; SessionHarbor rejects link/delete reclamation for that class.
Every command below is read-only until its applied form is explicitly used:
node plugins/session-harbor/scripts/session-harbor.mjs \
init --destination /path/to/EXTERNAL_DRIVE/SessionHarbor
node plugins/session-harbor/scripts/session-harbor.mjs doctor --json
node plugins/session-harbor/scripts/session-harbor.mjs device init --json
node plugins/session-harbor/scripts/session-harbor.mjs bridge doctor --json
node plugins/session-harbor/scripts/session-harbor.mjs backup plan --json
node plugins/session-harbor/scripts/session-harbor.mjs cleanup --json
Applied destination/device initialization, first session publication, and first local reclamation are three separate approvals. See the live-readiness checklist before using a physical drive.
After reviewing the dry-run and granting the corresponding scope:
# Preview and then incrementally back up every stable local session.
session-harbor backup plan
session-harbor backup run --apply