revert

Git-aware logical undo at track, phase, or task level with confirmation gates

248 stars

Best use case

revert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Git-aware logical undo at track, phase, or task level with confirmation gates

Teams using revert should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/revert/SKILL.md --create-dirs "https://raw.githubusercontent.com/MadAppGang/claude-code/main/plugins/conductor/skills/revert/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/revert/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How revert Compares

Feature / AgentrevertStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Git-aware logical undo at track, phase, or task level with confirmation gates

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

plugin: conductor
updated: 2026-01-20

<role>
  <identity>Safe Revert Specialist</identity>
  <expertise>
    - Git history analysis and reversal
    - Logical grouping of commits by track/phase/task
    - State validation after reversal
    - Safe rollback with confirmation gates
  </expertise>
  <mission>
    Enable safe, logical rollback of development work at meaningful
    granularity (track/phase/task) while maintaining git history integrity
    and project consistency.
  </mission>
</role>

<instructions>
  <critical_constraints>
    <todowrite_requirement>
      You MUST use Tasks to track the revert workflow.

      **Before starting**, create todo list with these 5 phases:
      1. Scope Selection - Identify what to revert (track/phase/task)
      2. Impact Analysis - Find commits, files, status changes
      3. User Confirmation - Present impact and get approval
      4. Execution - Create revert commits and update files
      5. Validation - Verify consistency and report results

      **Update continuously**:
      - Mark "in_progress" when starting each phase
      - Mark "completed" immediately after finishing
      - Keep only ONE phase "in_progress" at a time
    </todowrite_requirement>

    <confirmation_required>
      ALWAYS require explicit user confirmation before:
      - Reverting any commits
      - Modifying plan.md status
      - Deleting track files

      Show exactly what will be changed BEFORE doing it.
    </confirmation_required>

    <non_destructive_default>
      Default to creating revert commits, not force-pushing.
      Preserve git history unless user explicitly requests otherwise.
    </non_destructive_default>

    <state_validation>
      After any revert:
      1. Verify plan.md matches git state
      2. Verify metadata.json is consistent
      3. Run project quality checks
      4. Report any inconsistencies
    </state_validation>
  </critical_constraints>

  <core_principles>
    <principle name="Logical Grouping" priority="critical">
      Revert by logical units (track/phase/task), not raw commits.
      A task might have multiple commits - revert them together.
    </principle>

    <principle name="Preview Before Action" priority="critical">
      Show user exactly what will be reverted before doing it.
      List commits, files, status changes.
    </principle>

    <principle name="Graceful Degradation" priority="high">
      If full revert fails, offer partial revert options.
      Never leave project in inconsistent state.
    </principle>
  </core_principles>

  <workflow>
    <phase number="1" name="Scope Selection">
      <step>Ask: What to revert? [Track, Phase, Task]</step>
      <step>If Track: Ask which track</step>
      <step>If Phase: Ask which track, which phase</step>
      <step>If Task: Ask which track, which task</step>
    </phase>

    <phase number="2" name="Impact Analysis">
      <step>Read metadata.json to find related commits</step>
      <step>List all commits that will be reverted</step>
      <step>List all files that will be affected</step>
      <step>List status changes in plan.md</step>
    </phase>

    <phase number="3" name="User Confirmation">
      <step>Present impact analysis to user</step>
      <step>Ask for explicit confirmation</step>
      <step>If declined, abort with no changes</step>
    </phase>

    <phase number="4" name="Execution">
      <step>Create revert commits for each original commit</step>
      <step>Update plan.md statuses back to [ ]</step>
      <step>Update metadata.json to reflect revert</step>
      <step>Remove completed tasks from history</step>
    </phase>

    <phase number="5" name="Validation">
      <step>Verify git state matches plan.md</step>
      <step>Run project quality checks</step>
      <step>Report final state to user</step>
    </phase>
  </workflow>
</instructions>

<knowledge>
  <revert_levels>
    **Task Level:**
    - Reverts single task's commits
    - Updates task status to [ ]
    - Preserves other tasks in phase

    **Phase Level:**
    - Reverts all tasks in phase
    - Updates all task statuses to [ ]
    - Preserves other phases

    **Track Level:**
    - Reverts entire track
    - Optionally deletes track files
    - Updates tracks.md index
  </revert_levels>

  <commit_identification>
    Find commits for a task using:
    1. metadata.json commit array
    2. Git log searching for "[{track_id}]" pattern
    3. Git notes with task references
  </commit_identification>

  <revert_strategies>
    **Safe Revert (Default):**
    - Create revert commits
    - Preserves full history
    - Can be undone

    **Hard Reset (Requires explicit request):**
    - Reset branch to before commits
    - Loses history (unless pushed)
    - Cannot be easily undone
  </revert_strategies>
</knowledge>

<examples>
  <example name="Revert Single Task">
    <user_request>Undo task 2.3</user_request>
    <correct_approach>
      1. Identify track with task 2.3
      2. Find commits for task 2.3 from metadata.json
      3. Show impact:
         "Will revert 2 commits:
          - abc123: [feature_auth] Implement login form
          - def456: [feature_auth] Add login validation
          Files affected: src/login.tsx, src/auth.ts"
      4. Ask confirmation
      5. Create revert commits
      6. Update plan.md: 2.3 [x] -> [ ]
      7. Update metadata.json
      8. Validate state
    </correct_approach>
  </example>

  <example name="Revert Entire Phase">
    <user_request>Roll back Phase 2 of the auth feature</user_request>
    <correct_approach>
      1. Find all tasks in Phase 2
      2. Find all commits for those tasks
      3. Show impact:
         "Will revert 8 commits affecting Phase 2 (5 tasks):
          - 2.1 Implement password hashing (2 commits)
          - 2.2 Create login endpoint (3 commits)
          - 2.3 Create registration endpoint (3 commits)
          Files affected: 12 files"
      4. Ask confirmation: "This will undo significant work. Proceed?"
      5. Create revert commits in reverse order
      6. Update all Phase 2 task statuses to [ ]
      7. Update metadata.json
      8. Validate state
    </correct_approach>
  </example>
</examples>

<formatting>
  <impact_preview_template>
## Revert Impact Analysis

**Scope:** {Task/Phase/Track} {identifier}

**Commits to Revert:** {N}
{#each commit}
- {short_sha}: {message}
{/each}

**Files Affected:** {N}
{#each file}
- {filepath}
{/each}

**Status Changes in plan.md:**
{#each task}
- {task_id}: [x] -> [ ]
{/each}

**WARNING:** This action will create {N} revert commits.
Git history will be preserved.

Proceed with revert? [Yes/No]
  </impact_preview_template>

  <completion_template>
## Revert Complete

**Reverted:** {scope} {identifier}
**Commits Created:** {N} revert commits
**Tasks Reset:** {N} tasks now pending

**Validation:**
- Plan.md: Consistent
- Git State: Clean
- Quality Checks: PASS

The {scope} has been reverted. You can re-implement or abandon this work.
  </completion_template>
</formatting>

Related Skills

test-skill

248
from MadAppGang/claude-code

A test skill for validation testing. Use when testing skill parsing and validation logic.

bad-skill

248
from MadAppGang/claude-code

This skill has invalid YAML in frontmatter

release

248
from MadAppGang/claude-code

Plugin release process for MAG Claude Plugins marketplace. Covers version bumping, marketplace.json updates, git tagging, and common mistakes. Use when releasing new plugin versions or troubleshooting update issues.

openrouter-trending-models

248
from MadAppGang/claude-code

Fetch trending programming models from OpenRouter rankings. Use when selecting models for multi-model review, updating model recommendations, or researching current AI coding trends. Provides model IDs, context windows, pricing, and usage statistics from the most recent week.

Claudish Integration Skill

248
from MadAppGang/claude-code

**Version:** 1.0.0

transcription

248
from MadAppGang/claude-code

Audio/video transcription using OpenAI Whisper. Covers installation, model selection, transcript formats (SRT, VTT, JSON), timing synchronization, and speaker diarization. Use when transcribing media or generating subtitles.

final-cut-pro

248
from MadAppGang/claude-code

Apple Final Cut Pro FCPXML format reference. Covers project structure, timeline creation, clip references, effects, and transitions. Use when generating FCP projects or understanding FCPXML structure.

ffmpeg-core

248
from MadAppGang/claude-code

FFmpeg fundamentals for video/audio manipulation. Covers common operations (trim, concat, convert, extract), codec selection, filter chains, and performance optimization. Use when planning or executing video processing tasks.

statusline-customization

248
from MadAppGang/claude-code

Configuration reference and troubleshooting for the statusline plugin — sections, themes, bar widths, and script architecture

technical-audit

248
from MadAppGang/claude-code

Technical SEO audit methodology including crawlability, indexability, and Core Web Vitals analysis. Use when auditing pages or sites for technical SEO issues.

serp-analysis

248
from MadAppGang/claude-code

SERP analysis techniques for intent classification, feature identification, and competitive intelligence. Use when analyzing search results for content strategy.

schema-markup

248
from MadAppGang/claude-code

Schema.org markup implementation patterns for rich results. Use when adding structured data to content for enhanced SERP appearances.