self-correction-loop

Capture user corrections and generalize them into reusable MEMORY.md rules.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill self-correction-loop-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-correction-loop
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/self-correction-loop
Command: npx skills add https://github.com/Resgrid/Core --skill self-correction-loop-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It captures and compounds user corrections so repeated mistakes stop happening by converting feedback into reusable rules stored in project memory.

Core Features & Use Cases

  • Correction detection and capture: Recognizes when a user corrects Claude’s output and initiates an explicit memory-writing workflow.
  • Generalization of lessons: Converts specific fixes into broader, class-level rules that apply across modules rather than one-off patches.
  • Deduplication and update behavior: Scans existing MEMORY.md rules, updates overlapping guidance, and avoids memory bloat.
  • Session-start memory review: Ensures rules are reviewed and applied proactively when a new session begins to prevent regressions.

Use cases include fixing coding patterns after a review, standardizing architecture or code style expectations, and iteratively reducing error rates over time.

Quick Start

Tell Claude to remember the correction you just gave (for example, “Don’t do that again—learn from this correction and update memory”).

Frequently Asked Questions about self-correction-loop

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

FAQPage Schema
How do I make Claude remember code review corrections across sessions?

To stop repeated coding mistakes, convert specific user corrections into generalized, class-level project rules written to MEMORY.md. This deduplicates existing guidance and applies the updated rules proactively at session start to prevent regressions.

What is the best way to enforce project standards for code style automatically?

To enforce project standards for code style automatically, detect user corrections during code review, generalize the feedback into broad rules, and write them to MEMORY.md by category. This ensures architecture and style expectations are applied consistently.

How do I prevent Claude from repeating the same code generation errors?

You prevent Claude from repeating code generation errors by initiating an explicit memory-writing workflow when corrections occur. This captures the fix, generalizes it into a broader rule, and stores it in MEMORY.md to be reviewed at the start of future sessions.

Does the self-correction loop skill deduplicate overlapping rules in MEMORY.md?

Yes, the self-correction loop deduplicates overlapping rules in MEMORY.md. When capturing a correction, it scans existing project memory, updates overlapping guidance, and writes categorized rules to prevent memory bloat and maintain concise standards.

How do I apply existing MEMORY.md rules when starting a new coding session?

To apply existing MEMORY.md rules when starting a new coding session, use session initialization to review stored project standards proactively. This ensures past corrections and generalized rules are loaded to prevent regressions immediately.

When should I avoid using a self-correction loop for project memory management?

You should avoid using a self-correction loop for project memory management if your corrections are one-off fixes that do not need to be generalized into class-level rules. It is designed for iteratively reducing error rates over time through deduplicated memory updates.