image-extraction-debug
Debug Gemini/GPT vision API issues in puzzle image extraction
npx skills add majiayu000/claude-skill-registry --skill image-extraction-debug --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Image Extraction Debug Debug and fix issues with AI-powered puzzle image extraction (GPT-5.2 via OpenRouter). ## When to Use - Grid extraction returns wrong dimensions (e.g., 5×5 instead of 7×9) - Domino count mismatches (extracted 12 dominoes, expected 15) - Region detection failures (missing regions, wrong constraints) - Pip counting errors (AI reads "5" as "6") - Constraint badge misinterpretation (reads "Σ10" as "equal") - API errors or timeouts ## Architecture Overview **File:** `src/lib/services/gemini.ts` The extraction uses a **dual-image approach**: 1. **User crops image into two parts** (DualImageCropper component): - **Domino image**: Just the domino tiles - **Grid image**: Just the grid with constraints 2. **Domino extraction** (line 117-211): - Model: `openai/gpt-5.2` - Counts pips on each domino half - Returns: `[(3,5), (0,0), (2,6), ...]` 3. **Grid extraction** (line 260-400): - Model: `openai/gpt-5.2` - Identifies regions, constraints, holes - Returns: JSON with grid structure ## Common Issues & Solutions ### Issue 1: Wrong Grid Dimensions **Symptom**: AI extracts 5×5 grid but puzzle is 7×9 **Cause**: AI guesses dimensions from visible cells only, ignoring holes *
- When to Use
- Architecture Overview
- Common Issues & Solutions
- Issue 1: Wrong Grid Dimensions
- Issue 2: Domino Count Mismatch
- Issue 3: Wrong Pip Counts
- Issue 4: Constraint Badge Misinterpretation
- Issue 5: Region Contiguity Failures
- Issue 6: API Errors (401, 429, 500)
- Testing Extraction Changes
- Use Built-in Test Puzzles
- Add Debug Extraction Function
- Log Image Base64 Size
- Prompt Engineering Tips
Look for:
What does the image-extraction-debug skill do?
Debug Gemini/GPT vision API issues in puzzle image extraction
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill image-extraction-debug --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
