skills/self-correction/SKILL.md
Recognize repetitive work patterns and switch to bulk fix strategies before getting stuck in a loop. Triggers on: stuck in a loop, same error, same fix, repetitive pattern, bulk fix.
npx skillsauth add mdmagnuson-creator/yo-go self-correctionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
⚠️ Recognize repetitive work patterns BEFORE getting stuck in a loop.
If you're fixing the same issue type across multiple files one-by-one, STOP and consider a bulk approach.
You are likely in a repetitive loop when:
| Pattern | Example | Stuck Signal |
|---------|---------|--------------|
| Same test failure type | launchElectronApp usage bug in 8 test files | Fixing files 1, 2, 3... individually |
| Same lint error | Missing import across 15 files | Running lint → fix → lint → fix |
| Same type error | Interface mismatch after refactor | Updating files one at a time |
| Same pattern change | Renaming a function/variable | Find-and-replace manually file by file |
After fixing the same issue type 3 times, pause and ask yourself:
LOOP CHECK:
1. Am I fixing the same issue type repeatedly?
2. How many more files likely have this issue?
3. Can I grep/search to find ALL instances at once?
4. Would a bulk fix be faster than continuing one-by-one?
If the answer to #4 is YES, switch to bulk fix protocol.
When you detect a repeating pattern:
# Example: Find all files with the broken pattern
grep -r "launchElectronApp" tests/ --include="*.ts" -l
| Scope | Strategy | |-------|----------| | 2-3 files | Continue one-by-one (it's fine) | | 4-10 files | Batch into 2-3 groups, fix each group together | | 10+ files | Use find/replace, sed, or codemod; fix ALL at once |
Bad (what triggers the loop):
Fix test1.ts → run tests → Fix test2.ts → run tests → Fix test3.ts → run tests...
(8 cycles later, user asks "are you stuck?")
Good (bulk approach):
Grep for pattern → Found in 8 files → Fix all 8 files → Run tests once → Done
When you recognize you were in a loop and switch to bulk:
📊 PATTERN DETECTED — SWITCHING TO BULK FIX
I've been fixing the same issue individually. Let me step back:
• Pattern: `launchElectronApp` used incorrectly (assigning result instead of destructuring)
• Scope: Found in 8 test files
• Approach: Fix all 8 files at once, then run full test suite
This will be faster and more reliable than continuing one-by-one.
When implementing a "fix loop" (e.g., 3 attempts to fix a test):
After 3 failed fix attempts with no progress:
═══════════════════════════════════════════════════════════════════════
❌ FIX LOOP EXHAUSTED
═══════════════════════════════════════════════════════════════════════
Failed after 3 fix attempts.
Attempted fixes:
1. [description of fix 1]
2. [description of fix 2]
3. [description of fix 3]
Options:
[M] Fix manually, then type "retry"
[S] Skip this item
[D] Debug with @developer
> _
═══════════════════════════════════════════════════════════════════════
data-ai
Generate verification contracts before delegating tasks to sub-agents, defining how success will be measured. Triggers on: verification contract, delegation contract, task verification, contract-first delegation.
testing
Verify that Vercel environment variables point to the correct Supabase project for each environment to prevent staging/production cross-wiring. Triggers on: vercel supabase check, environment alignment, env var check, supabase environment.
development
Manage codebase and database vectorization for semantic search. Use when initializing, refreshing, or querying the vector index. Triggers on: vectorize init, vectorize refresh, vectorize search, semantic search, vector index, enable vectorization.
testing
Patterns for XCUITest UI tests for native Apple apps (macOS/iOS). Use when writing or reviewing XCUITest tests for Swift apps. Triggers on: XCUITest, xcuitest, native app testing, Apple UI tests, SwiftUI tests, AppKit tests, UIKit tests.