feedback-loop

kamushadenes's avatarfrom kamushadenes

Update CLAUDE.md or rules when patterns of errors emerge

0stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Feedback Loop skill is designed to optimize AI agent performance by systematically capturing learnings from repeated errors. It automates the process of updating CLAUDE.md or global system rules when patterns of mistakes emerge, ensuring that the agent maintains a persistent, evolving memory of project-specific conventions and technical constraints to prevent future regressions.

Use Cases

  • Automating the documentation of project-specific CLI flags (e.g., Nix --impure) to ensure the agent uses correct command syntax in future turns.
  • Enforcing architectural standards by updating CLAUDE.md whenever the agent violates a project's specific design patterns more than once.
  • Creating a global knowledge base of personal coding preferences in ~/.claude/rules/ to maintain consistency across multiple repositories.
  • Capturing edge-case solutions discovered during debugging sessions to serve as a permanent reference for the agent, reducing repetitive troubleshooting.
namefeedback-loop
descriptionUpdate CLAUDE.md or rules when patterns of errors emerge
triggersrepeated errors, learning from mistakes, updating rules, improving CLAUDE.md, capturing conventions, documenting patterns

Feedback Loop

When Claude makes the same mistake repeatedly, capture the learning.

When to Use

  • Same error type 2+ times
  • Project convention violated
  • Important pattern discovered

Process

  1. Identify Pattern - What mistake? What's correct?
  2. Choose Location
    • Project-specific: Add to project's CLAUDE.md
    • Global: Add to ~/.claude/rules/ via Nix
  3. Write the Rule
  4. Verify - Clear and actionable?

Example

After repeatedly missing --impure flag:

## Nix Flakes

- Always use `--impure` flag (required for private submodule)
- Use `rebuild` alias instead of raw commands