revert-rca-loop

Detect reverted AI-authored pull requests and create root-cause analysis issues.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/mattbutlerengineering/mattbutlerengineering --skill revert-rca-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: revert-rca-loop
Source: https://github.com/mattbutlerengineering/mattbutlerengineering/tree/main/.claude/skills/revert-rca-loop
Command: npx skills add https://github.com/mattbutlerengineering/mattbutlerengineering --skill revert-rca-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, gh, jq, bash.

What problem does it solve?

It helps teams quickly identify when an AI-authored pull request is reverted and ensures a root-cause analysis is performed so the same failure mode doesn’t repeat.

Core Features & Use Cases

  • Revert detection for AI-generated PRs: Scans recent revert commits and isolates those that correspond to PRs marked as generated by @mbe/agent-core.
  • Automatic RCA issue creation: Creates a labeled RCA GitHub issue with revert details and an analysis checklist, while avoiding duplicate issues.
  • Reflection-session triggering and tracking: Writes trigger events for downstream reflection, logs reverts for trend analysis, and escalates when revert rates exceed a threshold.

Quick Start

Invoke revert-rca-loop to automatically detect AI PR reverts from the last 24 hours and create RCA issues plus reflection triggers.

Frequently Asked Questions about revert-rca-loop

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

FAQPage Schema
How do I automate root cause analysis when an AI-generated pull request gets reverted?

You can automate root cause analysis by scanning recent revert commits on main, matching them to PR numbers via GitHub CLI, verifying the original PR generator marker, and creating structured RCA issues to prevent recurrence.

What is the best way to track AI-authored PR revert rates and trigger reflection sessions?

Tracking AI PR revert rates involves logging revert trend data and emitting reflection trigger events for downstream analysis, escalating when revert rates exceed a configured threshold to ensure proper incident tracking and quality gate enforcement.

Do I need GitHub CLI and jq to detect reverted AI pull requests in GitHub Actions?

Yes, detecting reverted AI PRs requires GitHub CLI for PR metadata queries and jq for parsing, along with git and bash, to match revert commits to original PR generator markers and deduplicate RCA issues.

Can I prevent duplicate RCA issues when monitoring for reverted AI-generated pull requests?

Duplicate RCA issues are prevented by using GitHub CLI queries to verify existing issues before creating a new labeled RCA issue with revert details and an analysis checklist for incident tracking.

How does revert detection for AI-generated PRs work with scheduled monitoring?

Scheduled revert detection scans recent revert commits on the main branch over a defined window like 24 hours, isolates those corresponding to PRs marked as AI-generated, and initiates root cause analysis workflows.

What are the limitations of using bash scripts for AI PR revert detection and RCA issue creation?

Bash-based revert detection relies on parsing commit messages and PR generator markers, limiting its effectiveness to environments where GitHub Actions, GitHub CLI, and consistent PR labeling conventions are strictly maintained.