git-revert-safety

Guide git revert and cherry-pick workflows to prevent version metadata regressions.

437|45|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill git-revert-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-revert-safety
Source: https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/git-revert-safety
Command: npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill git-revert-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the high-risk problem of failed git reverts that cause version metadata regressions, broken release artifacts, and contaminated main branches when undoing commits, merges, or recovering from accidental bad code pushes.

Core Features & Use Cases

  • Collateral Damage Assessment: Identifies all files touched by reverted commits that are at risk of corruption, including version manifests, package.json, CHANGELOG, and lockfiles.
  • Revert Strategy Decision Matrix: Guides selection between git revert and cherry-pick based on commit type (single, multi, merge, squash, octopus) and presence of release artifacts between commits.
  • Post-Revert Verification: Provides step-by-step checks to confirm version metadata, dependency lockfiles, and CI status are correct after a revert operation.
  • Branch Contamination Recovery: Outlines a clean-slate cherry-pick workflow to fully recover from wrong code merges without leaving behind corrupted release or dependency data.
  • Use Case: If a team accidentally merges a broken feature to main after a release-please run, this Skill prevents version number corruption by guiding you to create a fresh branch and cherry-pick only valid fix commits instead of attempting risky incremental cleanup.

Quick Start

Use the git-revert-safety skill to safely revert the last merge commit to main without corrupting version metadata or breaking CI.

Frequently Asked Questions about git-revert-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I revert a git merge commit without corrupting version metadata?

To revert a git merge commit without corrupting version metadata, you must assess collateral damage to version manifests and lockfiles, then use a clean-slate cherry-pick workflow or guided revert strategy to ensure no release artifacts are left corrupted.

What is the best way to undo a bad push to main when using release-please?

The best way to undo a bad push to main when using release-please is to create a fresh branch and cherry-pick only valid commits, avoiding risky incremental cleanup that can break version state and dependency graphs.

How do I safely revert multiple commits if there are release artifacts between them?

To safely revert multiple commits with release artifacts between them, use a revert strategy decision matrix to choose between git revert and cherry-pick based on commit type, ensuring post-revert metadata and CI verification confirms dependency lockfiles remain correct.

Does git revert work for octopus merges without breaking CI verification?

Git revert can work for octopus merges without breaking CI verification by following structured workflows for merge commit reversions and performing post-revert checks to confirm version metadata and CI status are correct.

When should I use cherry-pick recovery instead of git revert for branch contamination?

You should use cherry-pick recovery instead of git revert for branch contamination when a wrong code merge leaves behind corrupted release or dependency data, requiring a clean-slate branch recovery to fully restore repository integrity.