Skip to content
cccskills
FreePublished on GitHub

test-quality

Write or review Cataclysm-BN automated tests that produce repeatable results. It guides fixture selection, controls for time and global state, reproducing random failures, and matching CI test runs so a fix is checked under the same conditions.

OriginalShow the original description

Write or review Cataclysm-BN tests that avoid flakes, use deterministic fixtures, and clean up global state.

cataclysmbn/Cataclysm-BN1,289 stars(GitHub 1,289 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a repeatable automated test for a game behavior
  • Reviewing a test that fails intermittently
  • Checking a test fix against the same CI shard

Files included (1)

  • SKILL.md1.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Test Quality

Use when adding or changing automated tests.

Gates

  • Test one behavior contract, not incidental implementation details.
  • Use deterministic fixtures from data/mods/TEST_DATA for data with random, balance, or evolving behavior.
  • Avoid assertions that rely on probability, wall-clock time, locale, file order, or current global options unless the test pins them.
  • Reproduce reported flakes with the failing --rng-seed before accepting the fix.
  • When CI test jobs fail, inspect the job log for the exact test command, filters, shard split, user-dir, order-sensitive included tests, --rng-seed, and backend flags. Run that same shard command on the final rebased HEAD before declaring the fix validated; do not substitute a narrower tag filter or a different full-test command.
  • Before pushing test fixes that touch global state, NPCs, maps, overmaps, player position, RNG, options, or fixtures, run both the relevant focused test and the CI-equivalent shard/full command that can expose state bleed from earlier tests.
  • Keep Lua/C++ integration tests on real bound objects when the binding behavior is under test.
  • Expected DebugLog(DL::Error, ...) still makes the test process fail even when assertions pass. Use capture_debug_errors_during for the injected failure only and assert its exact messages; never clear the global observed-error flag or disable the test runner's error check.

Cleanup

  • Restore global state with restore_on_out_of_scope for calendar, options, globals, and singleton state.
  • Use clear_map() and explicit player placement when map contents matter.
  • Do not leave creatures, items, hooks, worlds, temp files, or option changes that can affect later tests.
  • Prefer new TEST_DATA fixtures over mutating base-game data in the test body.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill to expose Cataclysm-BN game functions and utilities to Lua. It guides you through organizing functions into libraries, registering constants and callbacks, documenting the API, and handling errors so Lua scripts can use the new bindings.

  • Expose game or map functions to Lua
  • Add constants or utility functions to a Lua library
  • Let Lua scripts register callbacks
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

Expose complex C++ classes to Lua by adding bindings for methods, inheritance, constructors, properties, and operators. The skill also guides ownership handling and registration so Lua scripts can use the intended class interface.

  • Exposing a C++ class to Lua
  • Binding inherited class methods
  • Adding constructors and properties
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

Add Lua bindings that let Cataclysm-BN scripts access simple C++ types, including string IDs, enums, and basic read-only classes. The skill guides documentation macros, registration in the appropriate source file, and build and in-game checks.

  • Exposing a C++ string ID to Lua
  • Registering an enum for Lua scripts
  • Making a basic read-only C++ type available to Lua
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

changelog-gen

FreeSummary

Generate and synchronize player-facing changelog files across English, Korean, and Japanese from a Git reference range. It groups related changes, organizes featured updates and fixes, and preserves localized labels and relevant media.

  • Preparing changelogs between two Git refs
  • Updating English, Korean, and Japanese release notes
  • Grouping related player-facing changes
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

deno-script

FreeSummary

Create or update Deno and TypeScript scripts for Cataclysm-BN, following the project’s conventions. Use it for command-line tools, data migrations, code or documentation generators, Git hooks, and other development utilities.

  • Creating a Deno command-line utility
  • Writing a data migration script
  • Generating code or documentation
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

i18n-context

FreeSummary

Use this skill when the same English text needs different translations in different parts of an application. It adds gettext context at the source, updates affected PO entries, and guides validation of translations and formatting checks for the touched locale.

  • Separate translations for an ambiguous label
  • Add context to translated JSON strings
  • Update and validate affected PO entries
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

See all skills by cataclysmbn

Report a problem with this skill