# Self correcting loop

> Self correcting loop is an open-source agent skill for developer tools. Runs fix-check-fix cycles on ABAP code until syntax, ATC, tests and activation pass. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/vigneshbarani24/sap-superpowers/tree/main/skills/development/self-correcting-loop
- **Repository:** https://github.com/vigneshbarani24/sap-superpowers
- **GitHub stars:** 14
- **License:** MIT
- **Skill name:** self-correcting-loop
- **Collection:** https://github.com/vigneshbarani24/sap-superpowers
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through repeated repair of ABAP code that has syntax errors, ATC findings, failing unit tests or activation problems. Each pass runs the full check suite, isolates the first failing check, traces its root cause and applies one targeted change before checking again. Every attempt is recorded in a fix history so the agent can spot circular fixes where correcting one issue breaks another.

The workflow is bounded: after ten iterations the agent stops and escalates to the user with the accumulated history rather than looping indefinitely. The skill also forbids shortcuts such as suppressing ATC findings or deleting failing tests, so a passing result means the code was actually corrected. Completion requires a clean run of every check and an activated set of objects in dependency order.

The skill expects an ABAP development environment with syntax checking, ATC, unit test execution and object activation available to the agent. It is designed to be invoked from a pipeline such as autopilot or from code generation and review skills, and it hands control back to the caller once the checks are green.

## When your agent uses it

> Use when generated or modified ABAP code has syntax errors, ATC findings, test failures, or activation issues. Runs an iterative fix-check-fix loop until the code is clean, tested, and activated. Equivalent to a persistent development TDD cycle.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/vigneshbarani24/sap-superpowers/tree/HEAD/skills/development/self-correcting-loop)
- [License: MIT](https://github.com/vigneshbarani24/sap-superpowers/tree/HEAD/skills/development/self-correcting-loop)

## Features

- **Iterative fix loop:** Repeats verify and repair cycles, re-running all checks after each single change.
- **Check suite coverage:** Covers syntax checks, ATC findings, unit tests and object activation.
- **ATC priority handling:** Requires P1 and P2 ATC findings to be resolved while documenting P3 findings.
- **Fix history logging:** Records each error, root cause, change and result to prevent circular fixes.
- **Iteration limit:** Stops after ten attempts and escalates to the user with the fix history.
- **No gate weakening:** Prohibits suppressing findings or deleting tests to make checks pass.

## Good for

- Fix syntax errors in a newly generated ABAP class
- Resolve ATC findings on modified ABAP code
- Repair failing ABAP unit tests after a logic change
- Get a set of ABAP objects to activate cleanly
- Document the fix history for a repeated ABAP repair attempt

## Install

### Claude Code

This skill ships in the `sap-superpowers` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add vigneshbarani24/sap-superpowers
/plugin install sap-superpowers@sap-superpowers
```

Or copy only this skill to `~/.claude/skills/self-correcting-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/self-correcting-loop &&
cp -R "$tmp/skills/development/self-correcting-loop" ~/.claude/skills/self-correcting-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/self-correcting-loop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/self-correcting-loop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/self-correcting-loop &&
cp -R "$tmp/skills/development/self-correcting-loop" ~/.agents/skills/self-correcting-loop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/self-correcting-loop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/self-correcting-loop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/self-correcting-loop &&
cp -R "$tmp/skills/development/self-correcting-loop" ~/.cursor/skills/self-correcting-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/self-correcting-loop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/vigneshbarani24/sap-superpowers.git --path skills/development/self-correcting-loop
```

Or copy the folder to `~/.gemini/skills/self-correcting-loop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/self-correcting-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/self-correcting-loop &&
cp -R "$tmp/skills/development/self-correcting-loop" ~/.copilot/skills/self-correcting-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/self-correcting-loop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers.git
```

Then copy `sap-superpowers/skills/development/self-correcting-loop` into your agent's skills folder as `self-correcting-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to start?

Before the loop begins, the code must be compilable or the first error identified, the check suite must be defined, and the fix history log must be initialized.

### What happens if the errors are not fixed after several attempts?

After ten iterations the agent stops and escalates to the user with the fix history instead of continuing.

### Can the skill suppress ATC findings or delete failing tests?

No. The skill requires fixing the code for ATC findings and fixing the logic for failing tests rather than suppressing or removing them.

### Which ATC findings must be resolved?

P1 and P2 findings must be resolved, while P3 findings are documented but not blocking.

### How do I install Self correcting loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/self-correcting-loop to use it in all your projects, or to .claude/skills/self-correcting-loop in one project. Or install the sap-superpowers plugin, which includes it: /plugin marketplace add vigneshbarani24/sap-superpowers, then /plugin install sap-superpowers@sap-superpowers.

### Does Self correcting loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Self correcting loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Self correcting loop?

The closest alternatives to Self correcting loop are Correct, Skill improver, Agent introspection debugging, Vibe quality loop and Principle fix root causes.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Correct](https://ai-powered.com/skills/correct): Correct is an open-source agent skill for developer tools.
- [Skill improver](https://ai-powered.com/skills/skill-improver): Skill improver is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Vibe quality loop](https://ai-powered.com/skills/vibe-quality-loop): Vibe quality loop is an open-source agent skill for developer tools.
- [Principle fix root causes](https://ai-powered.com/skills/principle-fix-root-causes): Principle fix root causes is an open-source agent skill for developer tools.
- [Continuous agent loop](https://ai-powered.com/skills/continuous-agent-loop): Continuous agent loop is an open-source agent skill for developer tools.
- [Code review loop](https://ai-powered.com/skills/code-review-loop): Code review loop is an open-source agent skill for developer tools.
- [Debug](https://ai-powered.com/skills/debug-jasgujral): Debug is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/self-correcting-loop
