[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS2VNE5KKGF9BS85WXFYF7":3,"skill-same:01M7CS2VNE5KKGF9BS85WXFYF7":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CS2VNE5KKGF9BS85WXFYF7","godot-testing",null,"Use when writing or running Godot tests - gdUnit4 or GUT (whichever the repo has), unit tests on typed GDScript classes, scene runners for frames, physics, input and signals, headless CLI with --import first, reports and exit codes, and C# tests via gdUnit4Net or plain dotnet test.","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgodot-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: godot-testing\ncategory: testing\ndescription: Use when writing or running Godot tests - gdUnit4 or GUT (whichever the repo has), unit tests on typed GDScript classes, scene runners for frames, physics, input and signals, headless CLI with --import first, reports and exit codes, and C# tests via gdUnit4Net or plain dotnet test.\ntech_stack: Godot\nsource: informed by the gdUnit4 and GUT documentation and the Godot 4 command-line docs; own wording\n---\n# Godot Testing\n\n## Overview\n\nGodot has two mature test frameworks: **gdUnit4** (GDScript and C#, fluent assertions, scene runner, mocks) and **GUT** (GDScript, simple assertions, doubles). Use the one in `addons\u002F`; if neither exists, add gdUnit4. Test plain typed classes directly; use a scene runner only for behaviour that needs frames, physics, input or the tree.\n\n**Core principle:** Unit-test the class, scene-test the wiring, and run it headless with an exit code you read.\n\n## gdUnit4\n\n```gdscript\n# res:\u002F\u002Ftest\u002Fcombat\u002Fhealth_component_test.gd\nclass_name HealthComponentTest extends GdUnitTestSuite\n\nfunc test_damage_beyond_health_clamps_to_zero() -> void:\n    var health: HealthComponent = auto_free(HealthComponent.new())\n    health.max_health = 50\n    health.reset()\n\n    health.damage(80)\n\n    assert_int(health.current).is_equal(0)\n\nfunc test_lethal_damage_emits_died() -> void:\n    var health: HealthComponent = auto_free(HealthComponent.new())\n    health.max_health = 10\n    health.reset()\n    monitor_signals(health)          # start collecting before the action, or an already-emitted signal is missed\n    health.damage(10)\n    await assert_signal(health).is_emitted(\"died\")\n\nfunc test_player_falls_onto_floor_and_is_grounded() -> void:\n    var runner := scene_runner(\"res:\u002F\u002Ftest\u002Fscenes\u002Fflat_floor_with_player.tscn\")\n    await runner.simulate_frames(90)\n    var player := runner.find_child(\"Player\") as Player\n    assert_bool(player.is_on_floor()).is_true()\n\nfunc test_jump_action_leaves_the_ground() -> void:\n    var runner := scene_runner(\"res:\u002F\u002Ftest\u002Fscenes\u002Fflat_floor_with_player.tscn\")\n    await runner.simulate_frames(30)\n    runner.simulate_action_pressed(\"jump\")\n    await runner.simulate_frames(5)\n    assert_float((runner.find_child(\"Player\") as Player).velocity.y).is_less(0.0)\n```\n\n- `auto_free()` frees the object after the test; nodes added to the tree go through the runner or `add_child(auto_free(node))`.\n- `mock(Class)` \u002F `spy(instance)` with `verify(...)` exist — prefer real collaborators and fakes; assert outcomes, not calls.\n- Parameterised tests: a default argument `test_parameters := [[...], [...]]`.\n\n## GUT\n\n```gdscript\n# res:\u002F\u002Ftest\u002Funit\u002Ftest_inventory.gd\nextends GutTest\n\nvar _inv: Inventory\n\nfunc before_each() -> void:\n    _inv = Inventory.new(4)\n\nfunc test_add_beyond_stack_limit_overflows_to_next_slot() -> void:\n    _inv.add(&\"potion\", 7, 5)\n    assert_eq(_inv.slots[0].count, 5)\n    assert_eq(_inv.slots[1].count, 2)\n\nfunc test_enemy_death_emits_signal() -> void:\n    var enemy: Enemy = add_child_autofree(preload(\"res:\u002F\u002Fenemies\u002Fslime.tscn\").instantiate())\n    watch_signals(enemy.health)\n    enemy.health.damage(9999)\n    assert_signal_emitted(enemy.health, \"died\")\n```\n\n`simulate(node, frames, delta)` advances `_process`\u002F`_physics_process` deterministically; `double(Script)` + `stub(...)` for doubles.\n\n## Naming and layout\n\nFollow the repository. Without a convention: `res:\u002F\u002Ftest\u002F\u003Carea>\u002F\u003Cthing>_test.gd` (gdUnit4) or `res:\u002F\u002Ftest\u002Funit\u002Ftest_\u003Cthing>.gd` (GUT), and test functions `test_\u003Cscenario>_\u003Cexpected>`. Small dedicated test scenes under `res:\u002F\u002Ftest\u002Fscenes\u002F`, never production levels.\n\n## Running headless\n\n```sh\nmkdir -p \u002Ftmp\u002Ftt-\u003Ctask key>\ngodot --headless --path . --import                       # builds the import and class_name caches; needed on a fresh checkout\n# gdUnit4\ngodot --headless --path . -s addons\u002FgdUnit4\u002Fbin\u002FGdUnitCmdTool.gd --ignoreHeadlessMode \\\n      -a res:\u002F\u002Ftest -rd \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgdunit > \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgdunit.log 2>&1; echo \"exit=$?\"\n# GUT\ngodot --headless --path . -s addons\u002Fgut\u002Fgut_cmdln.gd -gdir=res:\u002F\u002Ftest -ginclude_subdirs \\\n      -gjunit_xml_file=\u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgut.xml -gexit > \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgut.log 2>&1; echo \"exit=$?\"\n```\n\n- gdUnit4 refuses `--headless` without `--ignoreHeadlessMode`, because Godot does not deliver input events in headless mode. Pure logic, signal, physics and frame tests run fine headless; tests that simulate input need a display — run them without `--headless` (or under `xvfb-run` on Linux) or report them as not run.\n- gdUnit4 exit codes: 0 all passed, 100 failures, 101 warnings only. Its JUnit `results.xml` and HTML report land in the `-rd` directory. The `addons\u002FgdUnit4\u002Fruntest.sh` wrapper does the same using `GODOT_BIN`.\n- GUT: a `.gutconfig.json` in the project root is picked up by the CLI; `-gexit` makes it quit with a non-zero code on failure.\n- A parse error in any script fails the import or the run before tests start — read the log for `SCRIPT ERROR` \u002F `Parse Error`; zero tests run is not a pass.\n\n## C# projects\n\n- gdUnit4Net runs C# tests through `dotnet test` with a test adapter (it needs `GODOT_BIN` pointing at the .NET build of Godot).\n- Rules in plain C# classes with no `Godot` namespace can live in a separate class library tested with ordinary xUnit\u002FNUnit and `dotnet test` — this also runs when Godot is not installed (godot-csharp-and-gdextension).\n\n## No Godot binary here\n\nGDScript cannot run without the engine. Write the tests anyway, keep them small and obviously correct, and report: `NOT RUN: godot not found on PATH (project pins 4.7) — 3 gdUnit4 tests written in res:\u002F\u002Ftest\u002Fcombat\u002F`.\n\n## Common Mistakes\n\n- Skipping `--import` on a fresh checkout, then \"Could not find type HealthComponent\".\n- Testing a rule through a whole level scene.\n- Waiting with timers (`await get_tree().create_timer(1.0).timeout`) instead of simulating frames.\n- Leaking nodes: `Node.new()` without `auto_free` \u002F `autofree`, producing orphan warnings and cross-test pollution.\n\n## Red Flags\n\n- An input test reported as passing from a headless run (input events are not delivered there).\n- No exit-code check after the CLI run.\n- Tests that load production scenes and depend on their current layout.\n","# Godot Testing\n\n## Overview\n\nGodot has two mature test frameworks: **gdUnit4** (GDScript and C#, fluent assertions, scene runner, mocks) and **GUT** (GDScript, simple assertions, doubles). Use the one in `addons\u002F`; if neither exists, add gdUnit4. Test plain typed classes directly; use a scene runner only for behaviour that needs frames, physics, input or the tree.\n\n**Core principle:** Unit-test the class, scene-test the wiring, and run it headless with an exit code you read.\n\n## gdUnit4\n\n```gdscript\n# res:\u002F\u002Ftest\u002Fcombat\u002Fhealth_component_test.gd\nclass_name HealthComponentTest extends GdUnitTestSuite\n\nfunc test_damage_beyond_health_clamps_to_zero() -> void:\n    var health: HealthComponent = auto_free(HealthComponent.new())\n    health.max_health = 50\n    health.reset()\n\n    health.damage(80)\n\n    assert_int(health.current).is_equal(0)\n\nfunc test_lethal_damage_emits_died() -> void:\n    var health: HealthComponent = auto_free(HealthComponent.new())\n    health.max_health = 10\n    health.reset()\n    monitor_signals(health)          # start collecting before the action, or an already-emitted signal is missed\n    health.damage(10)\n    await assert_signal(health).is_emitted(\"died\")\n\nfunc test_player_falls_onto_floor_and_is_grounded() -> void:\n    var runner := scene_runner(\"res:\u002F\u002Ftest\u002Fscenes\u002Fflat_floor_with_player.tscn\")\n    await runner.simulate_frames(90)\n    var player := runner.find_child(\"Player\") as Player\n    assert_bool(player.is_on_floor()).is_true()\n\nfunc test_jump_action_leaves_the_ground() -> void:\n    var runner := scene_runner(\"res:\u002F\u002Ftest\u002Fscenes\u002Fflat_floor_with_player.tscn\")\n    await runner.simulate_frames(30)\n    runner.simulate_action_pressed(\"jump\")\n    await runner.simulate_frames(5)\n    assert_float((runner.find_child(\"Player\") as Player).velocity.y).is_less(0.0)\n```\n\n- `auto_free()` frees the object after the test; nodes added to the tree go through the runner or `add_child(auto_free(node))`.\n- `mock(Class)` \u002F `spy(instance)` with `verify(...)` exist — prefer real collaborators and fakes; assert outcomes, not calls.\n- Parameterised tests: a default argument `test_parameters := [[...], [...]]`.\n\n## GUT\n\n```gdscript\n# res:\u002F\u002Ftest\u002Funit\u002Ftest_inventory.gd\nextends GutTest\n\nvar _inv: Inventory\n\nfunc before_each() -> void:\n    _inv = Inventory.new(4)\n\nfunc test_add_beyond_stack_limit_overflows_to_next_slot() -> void:\n    _inv.add(&\"potion\", 7, 5)\n    assert_eq(_inv.slots[0].count, 5)\n    assert_eq(_inv.slots[1].count, 2)\n\nfunc test_enemy_death_emits_signal() -> void:\n    var enemy: Enemy = add_child_autofree(preload(\"res:\u002F\u002Fenemies\u002Fslime.tscn\").instantiate())\n    watch_signals(enemy.health)\n    enemy.health.damage(9999)\n    assert_signal_emitted(enemy.health, \"died\")\n```\n\n`simulate(node, frames, delta)` advances `_process`\u002F`_physics_process` deterministically; `double(Script)` + `stub(...)` for doubles.\n\n## Naming and layout\n\nFollow the repository. Without a convention: `res:\u002F\u002Ftest\u002F\u003Carea>\u002F\u003Cthing>_test.gd` (gdUnit4) or `res:\u002F\u002Ftest\u002Funit\u002Ftest_\u003Cthing>.gd` (GUT), and test functions `test_\u003Cscenario>_\u003Cexpected>`. Small dedicated test scenes under `res:\u002F\u002Ftest\u002Fscenes\u002F`, never production levels.\n\n## Running headless\n\n```sh\nmkdir -p \u002Ftmp\u002Ftt-\u003Ctask key>\ngodot --headless --path . --import                       # builds the import and class_name caches; needed on a fresh checkout\n# gdUnit4\ngodot --headless --path . -s addons\u002FgdUnit4\u002Fbin\u002FGdUnitCmdTool.gd --ignoreHeadlessMode \\\n      -a res:\u002F\u002Ftest -rd \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgdunit > \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgdunit.log 2>&1; echo \"exit=$?\"\n# GUT\ngodot --headless --path . -s addons\u002Fgut\u002Fgut_cmdln.gd -gdir=res:\u002F\u002Ftest -ginclude_subdirs \\\n      -gjunit_xml_file=\u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgut.xml -gexit > \u002Ftmp\u002Ftt-\u003Ctask key>\u002Fgut.log 2>&1; echo \"exit=$?\"\n```\n\n- gdUnit4 refuses `--headless` without `--ignoreHeadlessMode`, because Godot does not deliver input events in headless mode. Pure logic, signal, physics and frame tests run fine headless; tests that simulate input need a display — run them without `--headless` (or under `xvfb-run` on Linux) or report them as not run.\n- gdUnit4 exit codes: 0 all passed, 100 failures, 101 warnings only. Its JUnit `results.xml` and HTML report land in the `-rd` directory. The `addons\u002FgdUnit4\u002Fruntest.sh` wrapper does the same using `GODOT_BIN`.\n- GUT: a `.gutconfig.json` in the project root is picked up by the CLI; `-gexit` makes it quit with a non-zero code on failure.\n- A parse error in any script fails the import or the run before tests start — read the log for `SCRIPT ERROR` \u002F `Parse Error`; zero tests run is not a pass.\n\n## C# projects\n\n- gdUnit4Net runs C# tests through `dotnet test` with a test adapter (it needs `GODOT_BIN` pointing at the .NET build of Godot).\n- Rules in plain C# classes with no `Godot` namespace can live in a separate class library tested with ordinary xUnit\u002FNUnit and `dotnet test` — this also runs when Godot is not installed (godot-csharp-and-gdextension).\n\n## No Godot binary here\n\nGDScript cannot run without the engine. Write the tests anyway, keep them small and obviously correct, and report: `NOT RUN: godot not found on PATH (project pins 4.7) — 3 gdUnit4 tests written in res:\u002F\u002Ftest\u002Fcombat\u002F`.\n\n## Common Mistakes\n\n- Skipping `--import` on a fresh checkout, then \"Could not find type HealthComponent\".\n- Testing a rule through a whole level scene.\n- Waiting with timers (`await get_tree().create_timer(1.0).timeout`) instead of simulating frames.\n- Leaking nodes: `Node.new()` without `auto_free` \u002F `autofree`, producing orphan warnings and cross-test pollution.\n\n## Red Flags\n\n- An input test reported as passing from a headless run (input events are not delivered there).\n- No exit-code check after the CLI run.\n- Tests that load production scenes and depend on their current layout.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"informed by the gdUnit4 and GUT documentation and the Godot 4 command-line docs; own wording","testing","Godot","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgodot-testing",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill godot-testing",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill godot-testing",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill godot-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgodot-testing\u002FSKILL.md",true,[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]