Skip to content
Agentmart
Submit a tool

gh-backup

只做一件事——把本机工作同步到 GitHub 并验证「GitHub 是可以信任的最终备份」:代码仓全部分支与标签已推、工作区(信箱 / 工具 / 技能 / 记忆 / 资料)已镜像进私有规范仓、用全新克隆逐文件校验、列出按规矩不入库的东西。触发:/gh-backup、同步…

Skill by 0fuk

IndexedMIT★ 2
Write a review

Chalk Labs

Need help deploying gh-backup?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/0fuk-gh-backup

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

只做一件事——把本机工作同步到 GitHub 并验证「GitHub 是可以信任的最终备份」:代码仓全部分支与标签已推、工作区(信箱 / 工具 / 技能 / 记忆 / 资料)已镜像进私有规范仓、用全新克隆逐文件校验、列出按规矩不入库的东西。触发:/gh-backup、同步 GitHub、备份校验、过门前后、收工前、compact 前、规则或技能改动后、「这台机器坏了能恢复吗」。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/gh-backup

What's inside

Skill name
gh-backup
Description
只做一件事——把本机工作同步到 GitHub 并验证「GitHub 是可以信任的最终备份」:代码仓全部分支与标签已推、工作区(信箱 / 工具 / 技能 / 记忆 / 资料)已镜像进私有规范仓、用全新克隆逐文件校验、列出按规矩不入库的东西。触发:/gh-backup、同步 GitHub、备份校验、过门前后、收工前、compact 前、规则或技能改动后、「这台机器坏了能恢复吗」。
License
MIT
Instructions
30 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# /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 取凭据 → 跑体检脚本。把「缺了什么才跑不起来」写回本技能的备份面表。

From 0fuk/OpenACCP, MIT.

More from 0fuk/OpenACCP

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Oct 14, 2026 (17 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from 0fuk

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get gh-backup running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying gh-backup?

CallGet help
Cite this page

gh-backup skill. Agent Mart. https://agentmart.dev/skills/0fuk-gh-backup (last updated 2026-10-24)