Agent Self-Correction
Enables AI agents to self-correct through error detection, validation loops, and iterative refinement for improved reliability and quality.
Install this skill
Security score
The Agent Self-Correction skill was audited on Feb 9, 2026 and we found 20 security issues across 2 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 90 | message: `Potential hallucination: "${fact}" not in context`, |
Template literal with variable interpolation in command context
| 184 | console.log(`Iteration ${iteration + 1}: Validation failed`) |
Template literal with variable interpolation in command context
| 194 | throw new Error(`Validation failed after ${this.maxIterations} iterations`) |
Template literal with variable interpolation in command context
| 235 | const prompt = `Fix the following issues in this code: |
Template literal with variable interpolation in command context
| 399 | console.log(`Applying recovery strategy: ${strategy.name}`) |
Template literal with variable interpolation in command context
| 404 | throw new Error(`No recovery strategy found for error: ${error.message}`) |
Template literal with variable interpolation in command context
| 436 | `Rephrase this request to be clearer: ${context.originalRequest}` |
Template literal with variable interpolation in command context
| 448 | `Simplify this request: ${context.originalRequest}` |
Template literal with variable interpolation in command context
| 478 | console.log(`Iteration ${iteration + 1}:`) |
Template literal with variable interpolation in command context
| 479 | console.log(` Current score: ${currentScore}`) |
Template literal with variable interpolation in command context
| 480 | console.log(` Refined score: ${refinedScore}`) |
Template literal with variable interpolation in command context
| 481 | console.log(` Improvement: ${(improvement * 100).toFixed(2)}%`) |
Template literal with variable interpolation in command context
| 542 | const prompt = `Improve this code based on feedback: |
Template literal with variable interpolation in command context
| 584 | const prompt = `Reflect on this output for the given task: |
Template literal with variable interpolation in command context
| 601 | const prompt = `Refine this output to address the following issues: |
Template literal with variable interpolation in command context
| 632 | (output, errors) => llm.generate(`Fix: ${errors.join(', ')}\nOutput: ${output}`) |
External URL reference
| 665 | - [Self-Correction in LLMs](https://arxiv.org/abs/2303.05198) |
External URL reference
| 666 | - [Chain of Thought Prompting](https://arxiv.org/abs/2201.11903) |
External URL reference
| 667 | - [Reflexion: Language Agents with Verbal Reinforcement Learning](https://arxiv.org/abs/2303.11366) |
External URL reference
| 668 | - [Self-Consistency](https://arxiv.org/abs/2203.11171) |