xiaohongshu
xiaohongshu
godot-visual-bug-diagnosis
Debug visual and spatial bugs in Godot games through user observation, Godot-specific diagnosis, and test-driven fixes. Use when debugging visual or input issues in Godot where the user can observe the game but you cannot, when bugs involve rendering, positioning, animation, or coordinate systems...
Full skill instructions
Visual and spatial bugs in Godot games cannot be diagnosed from code alone. You cannot see the game running - only the user can observe what's actually happening.
Core principle: Work FROM the user's observations, diagnose using Godot-specific reasoning, test underlying logic where possible, iterate based on user validation.
Announce at start: "I'm using the Godot Visual Bug Diagnosis skill to debug this issue."
NO FIXES WITHOUT UNDERSTANDING WHAT THE USER OBSERVES
If you haven't gathered observations (Phase 1) and diagnosed from those observations using Godot terminology (Phase 2), you cannot propose fixes.
Use for:
Don't use for:
Copy this checklist to track progress:
Godot Visual Bug Diagnosis Progress:
- [ ] Phase 1: Gather Observations (detailed visual behavior from user)
- [ ] Phase 2: Diagnose in Godot Terms (hypothesis using Godot concepts + research)
- [ ] Phase 3: Identify Testable Logic (decision: TDD or manual validation)
- [ ] Phase 4: Propose Fix (single fix following diagnosis)
- [ ] Phase 5: User Validates & Iterate (user confirmation or return to earlier phase)
You MUST complete each phase before proceeding to the next.
If user report lacks details, ask clarifying questions:
If user already provided detailed observations: Proceed to Phase 2
Examples:
Critical: You CANNOT see the game running. Only the user can observe visual behavior. Work from their observations, not assumptions from code.
Step 1: Research when needed
WHEN you encounter:
THEN search:
Examples:
Don't assume Godot behavior - research it.
Step 2: Use Godot-specific reasoning
Diagnose using Godot concepts:
Step 3: Explain hypothesis clearly
"This sounds like [Godot concept] because [user's observation] indicates [specific Godot behavior]"
Example: "The offset getting worse with zoom suggests mouse coordinates are in screen space but being compared to world space without applying the viewport scale transform. This is a common coordinate conversion issue in Godot."
Ask: "Can we test the underlying logic?"
Testable (write test first):
Not easily testable (manual validation required):
Decision:
Don't skip testing because "fix seems simple" - testable logic should have tests to prevent regression.
Based on diagnosis and testability:
If testable (TDD approach):
Write test first:
assert_eq(world_to_screen(Vector2(5, 3)), expected_screen_pos)Explain fix approach:
Implement single fix:
Verify test passes
If not testable (manual validation approach):
Always:
User tests in-game and reports results:
If fixed: ✅ Done!
If partially fixed: "Still happening but different now..."
If not fixed: "No change"
If new bug appeared: "Now it does X instead..."
| Symptom | Likely Godot Cause | What to Check |
|---|---|---|
| Offset gets worse with zoom | Coordinate conversion without viewport transform | get_viewport().get_canvas_transform() |
| Mouse position wrong in sub-viewport | Viewport coordinate system not accounted | get_local_mouse_position() vs get_global_mouse_position() |
| Node appears in wrong position | Parent transform not applied | Check node hierarchy, use global_position vs position |
| Input not working on Control node | Mouse filter or focus issues | mouse_filter property, focus_mode |
| Z-order wrong | Canvas layer or z-index | Check z_index, z_as_relative, canvas layer |
If you catch yourself:
ALL of these mean: STOP. Return to correct phase.
| Excuse | Reality |
|---|---|
| "I can see the problem in the code" | You can't see what the user sees. Ask for observations. |
| "Testing coordinate math is overkill" | Coordinate bugs recur. Test prevents regression. |
| "Let me try this quick fix" | Without diagnosis, "quick fixes" create more bugs. |
| "Godot docs are slow to search" | Guessing about API behavior wastes more time. Research it. |
| "One more fix attempt" (after 2 failures) | 3+ failures = wrong approach. Stop and reconsider. |
| "Visual bugs can't be tested" | Underlying logic often CAN be tested. Identify testable parts. |
Reference these when:
Godot testing frameworks:
| Phase | Key Question | Must Complete Before Next Phase |
|---|---|---|
| 1. Observations | What does user see? | Clear description of visual behavior |
| 2. Diagnose | What Godot concept explains this? | Hypothesis using Godot terminology + research |
| 3. Testability | Can we test the logic? | Decision: TDD or manual validation |
| 4. Fix | What change addresses diagnosis? | Single fix following diagnosis |
| 5. Validate | Did it work? | User confirmation OR return to Phase 1/2 |
User: "Hover indicator is 1.5 tiles southwest of cursor, worse when zoomed in"
Phase 1: ✅ User provided detailed observations (skip clarifying questions)
Phase 2:
Phase 3:
screen_to_tile_coords() functionPhase 4:
# Test (in GUT)
func test_screen_to_tile_at_2x_zoom():
var screen_pos = Vector2(100, 100)
var zoom = 2.0
var result = screen_to_tile_coords(screen_pos, zoom)
assert_eq(result, Vector2(2, 2), "Should account for zoom in conversion")
# Fix - apply viewport transform
func screen_to_tile_coords(screen_pos: Vector2, zoom: float) -> Vector2:
var world_pos = screen_pos / zoom # Account for zoom
return Vector2(int(world_pos.x / TILE_SIZE), int(world_pos.y / TILE_SIZE))
Phase 5: User validates → "Fixed! Cursor aligns perfectly now at all zoom levels"
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience