gh-backup

gh-backup is a skill for Claude Code, Codex from 0fuk/OpenACCP. It costs 137 tokens per session (1,188 once invoked), scanned A, original, MIT.

A backup procedure that copies code and project working files to GitHub and then checks them by cloning a fresh copy and comparing the files. It also records which data and credentials must stay out of GitHub.

In plain words
What is it for?
Use it before or after major work, before a context reset, and after rule changes to back up branches, tags, tools, notes, and project documents.
Why use it?
A successful upload does not prove that a backup can be restored. A fresh-clone comparison reveals missing or changed files and keeps private data and secrets out of the repository.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before or after major work, before a context reset, and after rule changes to back up branches, tags, tools, notes, and project documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0fuk/openaccp/gh-backup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 0fuk/OpenACCP --skill gh-backup
Clone the repo
git clone --depth 1 https://github.com/0fuk/OpenACCP

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-backup

README.md
[![agentmods](https://agentmods.dev/badge/skills/0fuk/openaccp/gh-backup/github.svg)](https://agentmods.dev/skills/0fuk/openaccp/gh-backup)
Your own site
<a href="https://agentmods.dev/skills/0fuk/openaccp/gh-backup"><img src="https://agentmods.dev/badge/skills/0fuk/openaccp/gh-backup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-backup

Your own site · 80×15
<a href="https://agentmods.dev/skills/0fuk/openaccp/gh-backup"><img src="https://agentmods.dev/badge/skills/0fuk/openaccp/gh-backup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,188 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00137 $0.01188
Opus 5.5 $0.00055 $0.00475
Sonnet 5.5 $0.00027 $0.00238
Haiku 4.5 $0.00014 $0.00119

Measured 2d ago against content hash bf8efc64d257, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gh-backup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

field/skills/gh-backup/SKILL.md · 34 lines

What it actually says

/gh-backup — GitHub 同步与可信校验

一句话:推上去不算备份,从远端全新克隆下来逐文件对得上才算。 每次执行都以读数收尾,不以「已同步」三个字收尾。项目路径读项目根 PROJECT-PROFILE.md;下文路径以颐润(Yirun)新机为例。

备份面(四类,各有归宿)

类 归宿 怎么验
代码(主仓全部线分支、候选 / 生产标签) 代码仓远端 github 体检脚本:本地每个分支尖与标签都能在远端找到(ls-remote 回读相等)
工作区(信箱与台账、工具脚本、全部技能、记忆、规则文件、产品资料文本) 私有规范仓 镜像脚本:推送 → 全新克隆 → 按清单逐文件比 sha256
生产数据库 不进 GitHub(含客户数据);归服务器每晚备份 + 云盘快照 + 对象存储 看部署线巡检状态与最近一次恢复核对的日期
凭据(服务器密钥、库口令、会话凭条) 不进 GitHub;owner 自存 只提醒,不触碰

步骤(固定顺序)

  1. 体检:跑 C:\VyqoAI\Yirun\tools\sync-check.ps1。「漂移」每一条都要处置:在飞施工线的本地领先 → 记下线名与预计交回时刻;其余立即推(普通推送)。「未提交」逐条判:未跟踪的临时件可留,其余查归属。
  2. 镜像:跑 C:\VyqoAI\Yirun\tools\vault-mirror.ps1(先 -DryRun 仅当范围或排除规则刚改过)。脚本自带:排除规则 → 清单 MIRROR-MANIFEST.txt 与排除清单 MIRROR-EXCLUDED.txt → 提交 → 推送 → 全新克隆逐文件校验。末行必须是 VAULT_MIRROR_OK。
  3. 审清单(review):看本次新增的排除项是否合理(有没有该备份却被误排的重要文件,例如台账、判据、执行令);看有没有不该推的东西混进清单(抽 10 个)。误排的改名或脱敏后重跑;误推的立即从仓里删并报告 owner(已推内容视为已外泄,不靠删除补救)。
  4. 标签对齐:生产标签在代码仓与规范仓各打同名标签并推(规范仓标签 = 上线当刻的规则与规范快照)。
  5. 收尾读数(写进台账一行,格式固定):代码仓:分支 a / 标签 b 全在远端,漂移 0(或列出在飞线)· 规范仓:提交 <sha>,已推 N / 校验一致 N / 排除 M · 库备份:最近一次 <时刻>,巡检 <状态>。

硬规矩

  • 禁 force-push、禁改写历史;提交身份用仓内既定的集成身份,commit 零署名尾注。
  • 不入库:口令、密钥、连接串、会话凭条、客户与员工个人信息(姓名、手机号、证件号)、截图与录像、数据表格与库转储。拿不准宁可排除并列入排除清单。
  • 排除清单只写「路径 + 原因类别」,不写命中的具体内容。
  • 新增一类要备份的目录 = 改镜像脚本的范围表 + 本技能的备份面表,两处同改。
  • 校验失败(不一致 > 0 或末行非 OK)= 备份不可信,当场上报,不得带着失败过门或收工。

恢复演练(每月一次或换机时)

全新机器上:克隆代码仓与规范仓 → 按规范仓 PROJECT-PROFILE.md 重建工作区目录 → 技能与记忆拷回用户目录 → 向 owner 取凭据 → 跑体检脚本。把「缺了什么才跑不起来」写回本技能的备份面表。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 34 lines · 137 tokens per session scan A bf8efc64d257

Subscribe to this mod's changes

gh-backup is a skill published in the GitHub repository 0fuk/OpenACCP (2 stars, last pushed 2d ago), licensed MIT. It adds 137 tokens to every session and 1,188 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

git-wrapup

Land working-tree changes as logical commits — the work grouped by concern, topped by a release commit (version bump, changelog, regenerated artifacts). The work commits land first, then the version bump, verification, and the release commit on top. Stops at "committed locally on main" — or, when the project releases…

cyanheads/shift-mcp-server · 120 tokens

release-and-publish

Ship a release end-to-end across every registry the project targets (npm, MCP Registry, GitHub Releases for .mcpb bundles, GHCR). Runs the final verification gate, fast-forwards main when the release rode a release PR, creates the annotated tag on the commit main now points at, pushes commits and tags, then publishes…

cyanheads/shift-mcp-server · 155 tokens

release-pr-review

Review pass on an open release PR (release/ → main) — the step between git-wrapup and release-and-publish when a project releases in gated release PR mode. Reads the PR's commit range through the code-simplifier lens plus a correctness review, verifies whatever an automated reviewer left on the PR, lands fixes as…

cyanheads/shift-mcp-server · 136 tokens

agent-framework-py-release

Use when cutting a Python release for the microsoft/agent-framework monorepo. Triggers on "bump py versions", "cut a python release", "prepare release PR for python", "release py packages", "bump python to X.Y.Z", or similar requests to bump Python package versions and prepare a release PR. Handles all four lifecycle…

microsoft/agent-framework · 103 tokens

git-integration

Git commit patterns, formats, and conventions for GSD methodology. Provides atomic commits per task, structured commit messages, planning file commits, branch management, and milestone tag operations.

a5c-ai/babysitter · 39 tokens

aiwg-pr

AIWG-specific pull request delivery workflow for AIWG product/workspace changes; not the generic repository PR process.

jmagly/aiwg · 25 tokens