mcpField
S
snapshot-push

snapshot-push

github.com/rheinmirDevelopment10240 installsUpdated 2w ago
Repository

About snapshot-push

A repository-specific skill for pushing the bonbon-ai outer repository to GitLab as a snapshot, including content from the be/ and fe/ sub-repositories. It checks the required repository root, runs the provided script, and reports the commit hash and changed-file count.

Key features

  1. 01Restricted to the bonbon-ai repository root
  2. 02Includes be/ and fe/ contents in snapshots
  3. 03Hides and restores nested .git directories
  4. 04Optional commit message passed to script
  5. 05Reports commit hash and changed-file count
  6. 06Stops on root mismatch or push failure

Use cases

  1. 01Pushing a combined bonbon-ai repository snapshot
  2. 02Including be/ and fe/ files in an outer-repo push
  3. 03Checking snapshot push results and errors

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/rheinmir/setup --skill snapshot-push

After installing, type/snapshot-pushin Claude Code to confirm it loaded.

Details

From the project README

Skill: snapshot-push

WHAT

Purpose và context
  • Purpose: Push toàn bộ outer repo bonbon-ai lên GitLab như một snapshot — kể cả content của be/ và fe/ (các sub-repos có .git riêng). Dùng script scripts/snapshot-push.sh để tự động hide/restore .git dirs.
  • Trigger (when to use): "push snapshot", "snapshot push", "đẩy snapshot", "push outer repo".
  • Non-goals: không push riêng từng sub-repo be//fe/, không áp dụng cho repo khác ngoài bonbon-ai.
Mental model

repo root bonbon-ai → snapshot-push.sh (hide .git của be/ fe/ → commit + push → restore .git) → commit hash + số files changed.

Input và output contract
FieldRequired?Ý nghĩa
Inmessagekhôngcommit message tuỳ chọn, truyền cho script
Outkết quả pushcócommit hash + số files changed báo cho user
Rules và capabilities
  • RULE-01 (MUST): Verify đang ở đúng repo root (/Volumes/giatbhSSD(APFS)/workspace/bonbon-ai) trước khi chạy script.
  • Capabilities: đọc/ghi git của outer repo qua script có sẵn; ghi remote GitLab (push).
Failure boundaries
  • Không ở đúng repo root → blocked, không chạy script.
  • Script lỗi (push fail) → failed, báo nguyên output lỗi cho user.

HOW

Main workflow
StepTypeInputsActionOutputs/exitFailure/next
W01deterministiccwdVerify repo rootđúng rootsai → blocked
W02effectmessageChạy script snapshot-pushcommit + pushlỗi → failed
W03deterministicoutput scriptReport commit hash + số files changedbáo cáo—

Chi tiết từng bước (nguồn chân lý cho W01–W03):

  1. Verify đang ở đúng repo root (/Volumes/giatbhSSD(APFS)/workspace/bonbon-ai)
  2. Chạy: bash scripts/snapshot-push.sh "<optional message>"
  3. Report kết quả: commit hash + số files changed
Branches

Không có nhánh phụ trong version này.

Validation và stopping

Thành công = script trả rc 0 và in commit hash. Không retry tự động khi push lỗi.

Examples
  • Positive: "đẩy snapshot" tại /Volumes/giatbhSSD(APFS)/workspace/bonbon-ai → bash scripts/snapshot-push.sh "snapshot" → báo commit hash + số files changed, gồm cả file trong be/ và fe/.
  • Boundary/failure: gọi khi cwd là be/ → W01 thấy không phải repo root → dừng, báo user chuyển về root, không chạy script.

Comments

Markdown supported