self-correcting-loop

self-correcting-loop is a skill for Claude Code from vigneshbarani24/sap-superpowers. It costs 57 tokens per session (1,488 once invoked), scanned A, original, MIT.

An iterative repair process for ABAP code that repeats fixing and checking until syntax, ATC, tests, and activation all pass. ATC is SAP's automated code-quality checker.

In plain words
What is it for?
It helps resolve ABAP syntax errors, ATC findings, failed tests, and activation problems through small, repeated fix-and-verify cycles.
Why use it?
It prevents stopping after a single fix and records each attempt so new errors are caught without weakening quality checks.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sap-superpowers plugin — 61 skills, 8 commands, 15 agents, 5 hooks shipped together

Good fit It helps resolve ABAP syntax errors, ATC findings, failed tests, and activation problems through small, repeated fix-and-verify cycles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vigneshbarani24/sap-superpowers/self-correcting-loop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vigneshbarani24/sap-superpowers --skill self-correcting-loop
Clone the repo
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers

Made for: Claude Code.

Or install sap-superpowers, the plugin that ships this one along with the rest of its 61 skills, 8 commands, 15 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-correcting-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/vigneshbarani24/sap-superpowers/self-correcting-loop/github.svg)](https://agentmods.dev/skills/vigneshbarani24/sap-superpowers/self-correcting-loop)
Your own site
<a href="https://agentmods.dev/skills/vigneshbarani24/sap-superpowers/self-correcting-loop"><img src="https://agentmods.dev/badge/skills/vigneshbarani24/sap-superpowers/self-correcting-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-correcting-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/vigneshbarani24/sap-superpowers/self-correcting-loop"><img src="https://agentmods.dev/badge/skills/vigneshbarani24/sap-superpowers/self-correcting-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01488
Opus 5 $0.00028 $0.00744
Sonnet 5 $0.00011 $0.00298
Haiku 4.5 $0.00006 $0.00149

Measured 7d ago against content hash 0168040369fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

self-correcting-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/development/self-correcting-loop/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self-Correcting Loop

This skill runs an iterative fix → verify → fix cycle on ABAP code until all quality gates pass. It does not stop after one fix attempt — it loops until the code is syntax-clean, ATC-clean, test-passing, and successfully activated.

Iron Laws

  1. NEVER DECLARE SUCCESS AFTER ONE FIX. A fix that resolves one error often introduces another. Always re-run the full verification after every fix. The loop is: fix → full check → assess → repeat.

  2. NEVER FIX MORE THAN ONE ISSUE AT A TIME. Batch fixes create cascading failures that are impossible to debug. Fix the first error, verify, then fix the next. Surgical precision, not shotgun patches.

  3. ALWAYS TRACK FIX HISTORY. Every fix attempt is logged with: what was wrong, what was changed, and whether the check passed. This prevents circular fixes (fixing A breaks B, fixing B breaks A).

  4. STOP AFTER 10 ITERATIONS. If 10 fix cycles cannot resolve the issue, the problem is architectural, not syntactical. Escalate to the user with the fix history — do not loop forever.

  5. NEVER WEAKEN THE CHECK TO PASS THE GATE. If ATC flags a finding, fix the code — do not suppress the finding. If a test fails, fix the logic — do not delete the test. Weakening gates is not fixing.

Rationalization Table

Agent Will Try To... Why It Seems Reasonable Why It Fails Counter
Fix multiple errors at once "I can see three errors, let me fix them all" Multi-fix creates merge conflicts in your own reasoning. One change triggers side effects in others. Iron Law 2. One fix per iteration.
Suppress ATC findings instead of fixing "This is a false positive, I'll add a pragma" If it were a false positive, explain why. Most "false positives" are real findings the developer doesn't want to fix. Iron Law 5. Fix the code.
Skip re-running tests after a fix "I only changed a comment, tests don't need to re-run" You think you only changed a comment. Verify. Iron Law 1. Full check after every fix.
Continue past 10 iterations "I'm so close, one more try" 10 failed attempts means the approach is wrong. More iterations won't help. Iron Law 4. Escalate to user.
Delete a failing test "The test is wrong, not the code" Maybe. Document why the test is wrong. Write a better test. Don't delete evidence. Iron Law 5. Fix tests, don't delete them.

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 140 lines · 57 tokens per session scan A 0168040369fe

Subscribe to this mod's changes

self-correcting-loop is a skill published in the GitHub repository vigneshbarani24/sap-superpowers (9 stars, last pushed 18d ago), licensed MIT. It adds 57 tokens to every session and 1,488 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

test-first-bugs

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

jamditis/claude-skills-journalism · 35 tokens

lsp-refactoring

Intelligent code refactoring using IDE-level tools (rename, find-references, go-to-definition), AST-aware pattern matching, and TDD verification. Use for safe, large-scale refactoring with precision.

ArabelaTso/Skills-4-SE · 46 tokens

vibe-slice-migrator

Progressively migrates legacy prototype routes and features to a clean architecture layer slice-by-slice, verifying them against characterization tests, running purity/drift checks, and executing completion certifications.

richfrem/agent-plugins-skills · 44 tokens

fixing-bugs

Fix a bug using strict TDD — UNDERSTAND → REPRODUCE (RED) → VERIFY RED → FIX → VERIFY GREEN → VALIDATE → REFACTOR. Use when the user reports a bug, asks to fix something, mentions a Sentry/error/regression, or pastes a stack trace. Bugs require a failing test that proves the bug existed before any code change. For…

Cristhianzl/claude-skills-czl · 105 tokens

triage-issue

Invoked helper skill for deep bug diagnosis, usually delegated from /qa when a reported issue needs root-cause analysis and a TDD fix plan before implementation. Use when the cause is unclear, the bug is a regression, or the user explicitly wants diagnosis. Not for lightweight QA intake (use /qa) or already-clear…

chrislacey89/skills · 77 tokens

test-first-bugfix

Test-driven bug fixing — reproduce before you fix. Use this skill whenever the user reports a bug, describes unexpected behavior, says something is broken, mentions a regression, or asks you to fix an error. This includes phrases like "this is broken", "X doesn't work", "there's a bug in", "getting an error when", "it…

The-Artificer-of-Ciphers-LLC/skills-from-the-artificer · 138 tokens