test-writing-guide SKILL.md skillA

test-writing-guide from nowsprinting/unity-coding-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add nowsprinting/unity-coding-skills/test-writing-guide@git:20261016.6369daa

Pins git:20261016.6369daa in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
nowsprinting/unity-coding-skills
Path
skills/test-writing-guide/SKILL.md
Versions recorded
7
Latest version
git:20261016.6369daa, committed Oct 16, 2026
First version recorded
Jul 26, 2026
Size
10,038 bytes
Repository stars
20
License
Unlicense

Provides guidelines for writing test code for Unity projects. Make sure to use this skill whenever writing, creating, editing, or modifying test code files (files under Tests/). This includes implementing new tests, fixing test failures, adding test cases, or any task that results in test code changes. Even for small edits or one-line fixes, load this skill to ensure test conventions are followed.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

Guide for writing test code for Unity projects.

## Rules

- Before modifying any test file, check if the editor is in Play Mode. If it is, stop it using the `unity_play_control` tool first.
- Never create `.meta` files. Unity editor creates them automatically.
- When a test creates a `GameObject` or instantiates a prefab, apply `[CreateScene]` to the test method (not required if `[LoadScene]` is already present).
- When adding a test seam to production code (e.g., an `internal` accessor or a virtual override point to support injection), always wrap it with `#if UNITY_INCLUDE_TESTS` … `#endif` so it is excluded from non-test builds:
    ```csharp
    #if UNITY_INCLUDE_TESTS
    internal void SetStateForTest(State state) => _state = state;
    #endif
    ```

### Categories

- When implementing tests designed as integration tests, apply `[Category("Integration")]` to the test method.
- When implementing tests designed as visual verification tests, apply `[Category("VisualVerification")]` to the test method.
- When implementing tests designed as acceptance tests (marked `(acceptance test)` in the test case design), apply `[Category("Acceptance")]` to the test method.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add nowsprinting/unity-coding-skills/test-writing-guide@sha256:911abf8adf4de3dd

The line at the top of this page pins the label git:20261016.6369daa, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_fdgzqznfh7qfsbfz.svg)](https://markdownregistry.com/a/art_fdgzqznfh7qfsbfz)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 7 versions of this file, between Jul 26, 2026 and Oct 16, 2026, about one every 14 days.

versioncommittedcommitsizeaudit
git:20261016.6369daa latest2026-10-16 6369daa 10,038 BA view · diff
git:20260922.13c227b2026-09-22 13c227b 10,030 BA view · diff
git:20260824.7da4e3c2026-08-24 7da4e3c 10,012 BA view · diff
git:20260811.8d4580f2026-08-11 8d4580f 9,819 BA view · diff
git:20260811.2644dd42026-08-11 2644dd4 9,533 BA view · diff
git:20260726.599e44c2026-07-26 599e44c 10,303 BA view · diff
git:20260726.b460c842026-07-26 b460c84 9,909 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (10038 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

nowsprinting/unity-coding-skills · 20 stars · license Unlicense · pushed 2026-10-30 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_fdgzqznfh7qfsbfz
GET https://markdownregistry.com/api/v1/resolve?ref=nowsprinting/unity-coding-skills/test-writing-guide
GET https://markdownregistry.com/api/v1/blob/911abf8adf4de3dd3a824d01c2e4bf70e754bf40506e39dcb6baa85e0f4682b9

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from nowsprinting/unity-coding-skills

code-writing-guide SKILL.md skill
nowsprinting/unity-coding-skills · skills/code-writing-guide/SKILL.md · Provides coding guidelines for Unity projects. Make sure to use this skill whenever writing, creating, editing, or…
git:20260822.6a12221 · audit A · 20 stars
edit-scene SKILL.md skill
nowsprinting/unity-coding-skills · skills/edit-scene/SKILL.md · Creates and modifies Unity scene and prefab files. Use this skill whenever creating, editing, or modifying .unity scene…
git:20260922.13c227b · audit A · 20 stars
fix-bug SKILL.md skill
nowsprinting/unity-coding-skills · skills/fix-bug/SKILL.md · Diagnoses and fixes bugs using a test-first workflow (reproduce, diagnose, fix). Use this skill whenever the user…
git:20261016.1a93bbe · audit A · 20 stars
plan-feature SKILL.md skill
nowsprinting/unity-coding-skills · skills/plan-feature/SKILL.md · Orchestrates the test-first implementation planning workflow for feature implementation and spec changes. Use this…
git:20261016.4109665 · audit A · 20 stars
refine-tests SKILL.md skill
nowsprinting/unity-coding-skills · skills/refine-tests/SKILL.md · Reviews existing test code for conformance to the test-designing-guide and test-writing-guide, then applies the…
git:20261016.1a93bbe · audit A · 20 stars
resolve-diagnostics SKILL.md skill
nowsprinting/unity-coding-skills · skills/resolve-diagnostics/SKILL.md · Resolves IDE diagnostics (inspections and analyzer findings) at the `warning` or higher severity level for a given set…
git:20261016.e2b1e30 · audit A · 20 stars
run-tests SKILL.md skill
nowsprinting/unity-coding-skills · skills/run-tests/SKILL.md · Provides guidelines for running Unity tests using the run_unity_tests tool. Make sure to use this skill whenever…
git:20261016.6369daa · audit A · 20 stars
test-designing-guide SKILL.md skill
nowsprinting/unity-coding-skills · skills/test-designing-guide/SKILL.md · Provides test design methodology for Unity projects. Use this skill whenever designing test cases from requirements or…
git:20261016.6369daa · audit A · 20 stars
unity-yaml-editing-guide SKILL.md skill
nowsprinting/unity-coding-skills · skills/unity-yaml-editing-guide/SKILL.md · Provides guidelines for directly editing Unity YAML-serialized asset files for Unity projects. Make sure to use this…
git:20261016.6369daa · audit A · 20 stars

Every file in nowsprinting/unity-coding-skills

Browse by kind, by grade A, or by owner.