self-correction-loop

Capture user corrections and persist generalized rules in MEMORY.md.

1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill self-correction-loop-trossitec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-correction-loop
Source: https://github.com/Trossitec/dotnet-claude-kit/tree/main/skills/self-correction-loop
Command: npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill self-correction-loop-trossitec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of repeated Claude mistakes by converting user corrections into durable project-specific knowledge stored in MEMORY.md, so the system gets better over time.

Core Features & Use Cases

  • Capture and generalize corrections: Detects when a user corrects an output, extracts a class-level rule, and generalizes overly specific fixes into reusable guidance.
  • Deduplicate and update memory: Scans existing memory for overlaps and updates related rules instead of adding near-duplicates.
  • Enforce proactive session learning: Ensures MEMORY.md is reviewed at session start and used as the baseline so rules are applied immediately rather than forgotten until the next reminder.

Use case: A developer tells Claude to replace DateTime.Now with TimeProvider in one module, and the skill generalizes that correction into a reusable rule that applies across all production code.

Quick Start

Load the self-correction-loop skill and, after you correct Claude’s output, tell Claude to remember the correction so it can store the generalized rule in MEMORY.md.

Frequently Asked Questions about self-correction-loop

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

FAQPage Schema
How do I stop Claude from repeating the same coding mistakes in a project?

To stop Claude from repeating coding mistakes, you can use a self-correction loop that captures your feedback, extracts generalized rules, and stores them permanently in a MEMORY.md file. This ensures the AI applies your corrections automatically in future sessions.

How does a self-correction mechanism convert specific feedback into reusable rules?

A self-correction mechanism converts specific feedback into reusable rules by detecting when you reject an output, generalizing the specific fix into a category-level rule, and deduplicating it against existing memory entries before storing it in MEMORY.md.

Can I persist developer productivity rules in MEMORY.md across different Claude sessions?

Yes, you can persist developer productivity rules across different Claude sessions by storing generalized corrections in MEMORY.md. The system reviews this file at the start of each session to apply existing rules immediately as a baseline.

What is the best way to deduplicate memory entries when saving AI corrections?

The best way to deduplicate memory entries when saving AI corrections is to scan existing memory for overlaps and update related rules instead of adding near-duplicates. This maintains a clean knowledge base and prevents redundant guidance.

Does this memory management approach require any specific dependencies or components?

No, this memory management approach requires no specific dependencies or components. It operates independently by using deterministic storage formatting to write generalized rules directly into your project's MEMORY.md file.

When should I not use a self-correction loop for prompt improvement?

You should not use a self-correction loop for prompt improvement if your session involves one-off, highly specific tasks that will not recur. The system is designed to generalize corrections into permanent rules, which adds unnecessary overhead for isolated interactions.