zcf-add-sponsor
Quickly add a new corporate sponsor to ZCF — sponsor list by default, with optional API preset and documentation ad placements
Interactively rollback Git branch to historical version; lists branches, versions, then executes reset/revert after confirmation
$ npx -y skills add UfoMiao/zcf --skill git-rollback --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/git-rollbackContext preview
The summary Claude sees to decide when to auto-load this skill.
Interactively rollback Git branch to historical version; lists branches, versions, then executes reset/revert after confirmation
name: git-rollback description: Interactively rollback Git branch to historical version; lists branches, versions, then executes reset/revert after confirmation disable-model-invocation: true allowed-tools: Read(**), Exec(git fetch, git branch, git tag, git log, git reflog, git checkout, git reset, git revert, git switch), Write()
**Purpose**: Safely and visually rollback a specified branch to an older version. Defaults to **read-only preview (`--dry-run`)**; actual execution requires `--yes` or interactive confirmation.
---
# Pure interactive: list branches → select branch → list recent 20 versions → select target → choose reset or revert → confirm /git-rollback # Specify branch, other interactive /git-rollback --branch feature/calculator # Specify branch and target commit, execute with hard-reset in one go (dangerous) /git-rollback --branch main --target 1a2b3c4d --mode reset --yes # Generate revert commit only (non-destructive rollback), preview /git-rollback --branch release/v2.1 --target v2.0.5 --mode revert --dry-run
| Option | Description | | ---------------------- | ------------------------------------------------------------------------------------------------------------------ | | `--branch <branch>` | Branch to rollback; interactively selected if omitted. | | `--target <rev>` | Target version (commit hash, tag, or reflog reference); interactively selects recent `--depth` entries if omitted. | | `--mode reset\|revert` | `reset`: Hard rollback history; `revert`: Generate reverse commits keeping history intact. Prompts by default. | | `--depth <n>` | List recent n versions in interactive mode (default 20). | | `--dry-run` | **Enabled by default**, only preview commands to be executed. | | `--yes` | Skip all confirmations and execute directly, suitable for CI/CD scripts. |
---
1. **Sync remote** → `git fetch --all --prune` 2. **List branches** → `git branch -a` (local + remote, filter protected branches) 3. **Select branch** → User input or parameter 4. **List versions** → `git log --oneline -n <depth>` + `git tag --merged` + `git reflog -n <depth>` 5. **Select target** → User inputs commit hash / tag 6. **Select mode** → `reset` or `revert` 7. **Final confirmation** (unless `--yes`) 8. **Execute rollback**
9. **Push suggestion** → Prompt whether to `git push --force-with-lease` (reset) or regular `git push` (revert)
---
---
| Scenario | Command Example | | --------------------------------------------------------------------------- | ---------------------------------------------------------------- | | Hotfix patch deployed with bug, need to rollback to tag `v1.2.0` | `/git-rollback --branch release/v1 --target v1.2.0 --mode reset` | | Ops colleague pushed debug logs by mistake, need to generate reverse commit | `/git-rollback --branch main --target 3f2e7c9 --mode revert` | | Research historical bugs, guide newcomers through branch history | `/git-rollback` (full interactive, dry-run) |
---
1. **reset vs revert**
2. **Embedded repositories** often have large binary files; ensure LFS/submodule state consistency before rollback. 3. If repository has CI forced validation, rollback may trigger pipelines automatically; confirm control policies to avoid accidental deployment of old versions.
---
Repo: UfoMiao/zcf
Quickly add a new corporate sponsor to ZCF — sponsor list by default, with optional API preset and documentation ad placements
Create pull request based on current branch changes
Automate version release and code commit using changeset
Automatically check code changes since last tag and update documentation in docs/ directory (en, zh-CN, ja-JP) and CLAUDE.md to ensure consistency with actual…
Initialize or update BMad-Method (V6) in your project