skills/isolate-before-iterate/SKILL.md
Before debugging via full pipelines (backtests, builds, deploys), isolate the suspect logic in a minimal standalone test. Prevents the anti-pattern of 30+ minute feedback loops when a 5-line script would answer the question in seconds.
npx skillsauth add nhouseholder/nicks-claude-code-superpowers isolate-before-iterateInstall 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.
Claude adds a print statement to a 13K-line algorithm, re-runs a 40-minute backtest, greps the output, finds nothing useful, adds another print, re-runs... for hours. Meanwhile, a 5-line script calling the suspect function with known inputs would have answered the question in 10 seconds.
Rule: Never use a full pipeline run as a debugging tool when the problem can be isolated.
Before ANY of these during a debugging session:
Write a standalone script (5-15 lines) that:
# BAD: Re-run 40-minute backtest with a print statement buried in line 8812
# GOOD:
from my_module import _get_public_betting_fields
import json
cache = json.load(open("ufc_line_movements.json"))
result = _get_public_betting_fields("Brandon Royval", "Tatsuro Taira", "Royval", -250, +200)
print(result) # See exactly what's returned in 1 second
If the function works in isolation but fails in the pipeline, the inputs differ. Compare:
| Feedback loop time | Action | |---|---| | < 30 seconds | Fine — run the full thing | | 30s - 5 minutes | Acceptable if this is the first attempt; isolate on second | | 5 - 15 minutes | Must isolate. No exceptions. | | 15+ minutes | Stop. Write an isolation script before doing anything else. |
Data matching bugs (most common):
# Print both sides of the match
for key in cache_keys[:5]:
print(f"Cache key: {repr(key)}")
print(f"Lookup: {repr(lookup_value)}")
# Instantly reveals: case mismatch, whitespace, encoding, format differences
Function returns wrong value:
# Call with known-good inputs, check each step
result = suspect_function(known_input)
print(f"Result: {result}")
# If correct here but wrong in pipeline → inputs differ
Data not loading:
import os
path = "the/cache/file.json"
print(f"Exists: {os.path.exists(path)}")
print(f"Size: {os.path.getsize(path)}")
data = json.load(open(path))
print(f"Keys: {len(data)}")
print(f"Sample: {list(data.items())[:2]}")
When testing "does value X vs Y improve results?", never run the full pipeline twice. Instead:
# BAD: Run full 71-event backtest twice with different MIN_OPP_UFC_FIGHTS values
# GOOD: Extract the specific calculation, run it on cached data
from algorithm import compute_sl_ratio
import json
fights = json.load(open("cached_fights.json"))
for min_fights in [1, 2, 3]:
results = [compute_sl_ratio(f, min_opp_fights=min_fights) for f in fights]
valid = [r for r in results if r is not None]
print(f"min_fights={min_fights}: {len(valid)} data points, avg={sum(valid)/len(valid):.3f}")
This answers the question in 2 seconds instead of 2 full pipeline runs (potentially hours with environment issues).
tools
Unified context management and session continuity skill. Combines total-recall, strategic-compact, /ledger, and session continuity. Runs in background to preserve critical context across compaction and sessions.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
tools
Suggest /ultraplan for complex planning tasks on Claude Code CLI (2.1.91+ only). Research preview.
tools
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.