بنقرة واحدة
debug-with-logs
Debug a bug using the user's description and the match log file from the most recent game.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Debug a bug using the user's description and the match log file from the most recent game.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Audit cards for data accuracy and engine correctness. Supports single-card audit (compare against UESP wiki, verify engine ops/targets/families, report PASS or NEEDS_FIX) or full-catalog batch audit with progress tracking.
Investigate and fix a card whose in-game effect is not working as described.
Add a reusable UI pattern to the catalog. Use when a new UI feature has been built and should be documented for future reuse — e.g. "add this animation pattern", "catalog this UI flow". Takes a description of the pattern and the relevant files.
Find a reusable UI pattern from the catalog given a description of what you need. Use when implementing a new card or mechanic and you want to check if an existing UI pattern applies — e.g. "I need an arrow from one creature to another", "show damage after an animation", "defer an effect until a visual plays".
Configure a test match scenario for manual gameplay testing. Use when user wants to test a card, mechanic, keyword, or interaction in-game — e.g. "test veteran", "set up a match with treasure hunt cards", "I want to try Consume". Creates a JSON config in data/test_match_configs/ so the user can press ? on the Match button to pick and launch it.
Process all error reports from res://reports/bug-reports/ — analyze each bug, fix it, run tests, commit, and delete the report file. Ask for guidance on unclear reports.
| name | debug-with-logs |
| description | Debug a bug using the user's description and the match log file from the most recent game. |
Takes a bug description from the user, reads the match log file, and uses it to diagnose and fix the issue.
$ARGUMENTS — A description of the bug (e.g., "Guard creature was ignored during attack", "Summon effect didn't trigger for Morkul Gatekeeper", "creature stats are wrong after equipping an item").
Read game_trace.txt from the project root. It contains a verbose trace of the most recent match (wiped clean at each match start), including both human-readable game events and [TRC] engine trace lines. It may be large — read it in chunks using offset/limit (500 lines at a time). Read the entire file; do not skip sections.
If the file is empty or missing, tell the user and ask them to play a match first, then re-run this skill.
Based on the user's bug description, search the fetched output for relevant evidence. Use these log line types to guide your search:
[TRC] — Engine trace lines showing function calls and internal state ([TRC]|frame|Node|method|vars). Use these for deep debugging of engine logic.[BOARD] — Board state snapshots at the start of each turn, showing creature stats and HP[PLAY] — A card was played from hand[SUMMON] — A creature entered a lane[TRIGGER] — An effect fired (shows family, effect op, and target)[DAMAGE] — Damage was dealt (shows source, target, amount)[DEATH] — A creature was destroyed[DRAW] — A card was drawn[RUNE] — A rune was broken[PROPHECY] — A prophecy window opened[MAGICKA] — A player gained or spent magicka>> WARNING: MISSING EFFECT — A card's effect_ids are not covered by triggered_abilities[TRIGGER] line followed for an expected effect[TRIGGER] fired but targeted the wrong thing[BOARD] snapshots that don't add up given prior eventsPresent your findings concisely:
Relevant log lines — Quote the specific lines that show the issue (or the absence of expected lines). Include surrounding context so the user can understand the sequence of events.
Analysis — Explain what the log shows happened vs what should have happened, based on the user's description.
Verdict — State clearly whether the log confirms the reported issue or not. If the evidence is ambiguous, say so and explain why.
If there is a gap in the log trace that would help diagnose the current issue (e.g., a code path with no [TRC] lines, a trigger that doesn't log its targets, a branch that silently fails), add the necessary logging to the relevant engine or effect code before proceeding with the fix. This makes the current investigation easier and may help diagnose future issues.
After fixing the bug, evaluate the logging you added: if it would be generally useful for debugging other issues that come up later, leave it in. If it's hyper-specific to this one investigation and would just be noise, remove it.
If the log confirms a bug:
Card-specific effect bug (wrong trigger, wrong target, wrong values, missing effect): invoke the /fix-card-effect skill with the card name and a summary of what went wrong.
System-level bug (engine logic, turn sequencing, rune logic, UI glitch, null reference): investigate and fix the relevant engine code directly. Use jCodemunch tools to locate the relevant source files, understand the code, and implement the fix.
Data bug (wrong stats, wrong keywords, wrong cost in card definition): fix the card data in the catalog/seeds directly.
After implementing a fix, add a regression test that exercises the fixed behavior. This prevents the bug from recurring silently.
timing_runner.gd for trigger fixes, extended_mechanics_runner.gd for custom effects, items_and_supports_runner.gd for item equip fixes, combat_runner.gd for combat bugs, golden_match_runner.gd for complex multi-step scenarios).ScenarioFixtures to set up a minimal match state that reproduces the scenario, invoke the relevant engine function (e.g., MatchTiming.process_triggers, MatchCombat.resolve_attack), and assert the correct outcome using VerificationAsserts._test_{description_of_what_was_fixed} (e.g., _test_guard_not_bypassed_with_cover, _test_drain_heals_on_lethal_kill)._run_all_tests() method.Run the relevant test runners to confirm the fix and new test pass. If the game is still running, suggest the user reproduce the scenario to verify the fix (they may need to restart the scene).