Agent skill

Common Testing Conventions

by macalbert in macalbert/envilder

Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python).

MITAuto-check passedTesting & QA

Install Common Testing Conventions

skills CLI
$ npx skills add macalbert/envilder --skill common-testing-conventions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macalbert/envilder common-testing-conventions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macalbert/envilder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/common-testing-conventions .claude/skills/common-testing-conventions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
common-testing-conventions
GitHub stars
138
Token cost
~1.9k tokens
SKILL.md length
669 words
Files
6
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python).

  • Works in 5 steps: Test Production Behavior; Diagnose Test… → AAA Pattern (Mandatory) → Test Naming Convention → …
  • Changing test infrastructure
  • SKILL.md covers Code Style Rules, When to Use, Supporting Files and Core Principles, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Common Testing Conventions is an agent skill from macalbert/envilder. Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python). Use when writing tests or changing test infrastructure.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `dotnet.md`, `examples.md` and `python.md`).

It sits in Testing & QA, covering Unit testing. It works with TypeScript, Python and .NET. The repository describes itself as: One secret mapping for local dev, CI/CD, and runtime. Envilder resolves cloud secrets from your own vaults without SaaS middlemen, duplicated config, or .env drift. The licence is MIT.

When your agent uses it

  • Changing test infrastructure
  • Tasks that involve Unit testing

Example prompts

  • “/common-testing-conventions”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Test Production Behavior; Diagnose Test Support Only When Necessary
  2. AAA Pattern (Mandatory)
  3. Test Naming Convention
  4. Standard Variables
  5. Isolation During Concurrent Development

What it can do on your machine

Read from SKILL.md and the folder at commit b6a0327. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Common Testing Conventions loads about 1.9k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 669 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macalbert/envilder at commit b6a0327, republished under its MIT licence (© macalbert). 669 words, ~1,910 tokens.

Download SKILL.mdSave it as .claude/skills/common-testing-conventions/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
common-testing-conventions
description
Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python). Use when writing tests or changing test infrastructure.
user-invocable
false

Testing Conventions Skill

Mandatory testing conventions across all stacks. Stack-specific libraries and examples are documented in dedicated supporting files.

Code Style Rules

NEVER write unnecessary comments or XML summaries. Exception: // Arrange, // Act, // Assert comments are REQUIRED in tests.

RuleExample
Use class not recordpublic class OrderMother { ... }
Always use {} bracketsif (x) { return; } never if (x) return;
Aligned wrapped parametersAlign parameters with opening parenthesis

When to Use

  • Writing unit tests for handlers, services, or components
  • Writing integration tests with WebApplicationFactory
  • Writing E2E tests with Playwright
  • Setting up test class structure
  • Verifying mock interactions

Supporting Files

FileDescription
dotnet.md.NET testing stack (xUnit, AwesomeAssertions, NSubstitute, Bogus, Verify.Xunit, WireMock, Testcontainers)
typescript.mdTypeScript testing stack: CLI, SDK, CDK, Website (Vitest, Playwright, Biome)
python.mdPython testing stack (pytest, Mock/AsyncMock, pytest-snapshot, black, mypy, Pydantic)
examples.mdFull test examples for C# and TypeScript
reference.mdNaming rules, anti-patterns, checklist

Core Principles

1. Test Production Behavior; Diagnose Test Support Only When Necessary

Tests specify production behavior. Do not create tests whose subject is test-only code by default, including fixtures, mothers, builders, mocks, stubs, seeders, test containers, data loaders, or runner configuration. Shared, reusable, independently versioned, or public test-support code is still test-only code; those traits do not justify testing it directly.

Start by validating test-infrastructure changes through the production-behavior tests that consume them or a direct reproduction of the affected workflow. A focused test of support code is allowed only when those paths cannot identify a failure with enough diagnostic precision. It must target the smallest stable contract needed to localize the fault and state why consumer or workflow evidence is insufficient.

This is diagnostic instrumentation, not default behavioral verification. Never add it for coverage or to mirror implementation details.

2. AAA Pattern (Mandatory)

All tests MUST follow Arrange-Act-Assert with clear comments:

csharp
[Fact(Timeout = CancellationTokenForTest.ShortTimeout)] 
public async Task Should_CreateGroup_When_RequestIsValid()
{
    // Arrange
    var request = new CreateGroupRequest { Name = "Test Group" };
    var command = new CreateGroupCommand(request);

    // Act
    var actual = await _sut.Handle(command, CancellationToken.None);

    // Assert
    actual.Should().NotBeNull();
    actual.GroupId.Should().NotBeEmpty();
    _repository.Received(1).AddGroup(Arg.Any<Group>());
}

Rules:

  • Each comment (// Arrange, // Act, // Assert) appears AT MOST ONCE per test: if you need two actions, write two tests
  • Act = one single invocation on the SUT. Multiple statements in Act only if they are genuinely part of the same logical action (rare and exceptional). Two independent operations = two tests.
  • AAA markers are mandatory in ALL tests: including structural guards, static completeness checks, and data validation tests. No exceptions.
  • Each section clearly separated by comments
  • Never mix phases
  • All assertions belong in Assert only. No expect(), .Should(), assert, or any verification statement in Arrange or Act. If you feel tempted to assert in Arrange (precondition check), extract it to a separate test or use a guard clause that throws: not an assertion.
  • No if, switch, or conditional logic inside Arrange, Act, or Assert blocks
  • No try/catch/finally inside tests: use framework teardown (IAsyncLifetime, [ClassCleanup], pytest yield fixtures)
  • No // Act & Assert combined blocks: Act and Assert are ALWAYS separate phases
  • For exceptions: C# → AwesomeAssertions .Should().ThrowAsync<T>() | Python → lambda + pytest.raises() | Vitest → expect(...).rejects.toThrow()
  • Omit comment if section is empty
  • If a test needs branching, split it into separate test methods (one per scenario)
Show full SKILL.md (186 more words)Show less
3. Test Naming Convention
txt
Should_{ExpectedBehavior}_When_{Condition}
✓ Good✗ Bad
Should_CreateGroup_When_RequestIsValidTestCreateGroup
Should_ThrowNotFound_When_UserDoesNotExist"should login"
Should_ReturnEmptyList_When_NoRecordsFoundShould_Work
4. Standard Variables
PurposeName
Subject under testsut
Expected valueexpected
Actual resultactual
csharp
var expected = GroupMother.Create(id: groupId);
var actual = await _sut.Handle(query, CancellationToken.None);
actual.Id.Should().Be(expected.Id);
5. Isolation During Concurrent Development

Tests must run safely in parallel while a development environment is active on the same machine.

  • Use isolated ephemeral infrastructure where mutable state or external resources are required.
  • Never share mutable state with development, another test, or another CI worker.
  • Never rely on fixed ports, resource names, or execution order when isolation is required.
  • If deterministic isolation is not practical, select a different verification mechanism or report the limitation explicitly.

Test Class Structure (C#)

csharp
public class CreateGroupCommandHandlerTests
{
    private readonly Fixture _fixture;
    private readonly CreateGroupCommandHandler _sut;
    private readonly IEnvilderRepository _repository;

    public CreateGroupCommandHandlerTests()
    {
        _fixture = new();
        _repository = Substitute.For<IEnvilderRepository>();
        _sut = new(_repository);
    }

    [Fact(Timeout = CancellationTokenForTest.ShortTimeout)] 
    public async Task Should_CreateGroup_When_RequestIsValid()
    {
        // Test implementation
    }
}

Libraries by Stack

See the dedicated supporting file for each stack:

  • .NET Backend: dotnet.md: xUnit, AwesomeAssertions, NSubstitute, AutoFixture, Bogus, Verify.Xunit, WireMock.Net, Testcontainers (PostgreSQL, LocalStack)
  • TypeScript (CLI, SDK, CDK, Website): typescript.md: Vitest (CLI/SDK/CDK/Website), Playwright, Biome
  • Python: python.md: pytest, pytest-asyncio, pytest-snapshot, unittest.mock, black, mypy, Pydantic
StackConventionsTest Doubles
.NETdotnet-testingdotnet-test-doubles
TypeScripttypescript-testingtypescript-test-doubles
Pythonpython-testingpython-test-doubles

Cross-stack:

  • sdk-acceptance-testing: TestContainers, LocalStack, Lowkey Vault (all SDKs)
  • typescript-cdk-testing: CDK snapshot + fine-grained assertions (Vitest)
  • core-testing: Envilder CLI/Core specific testing procedure (Vitest)

© macalbert, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in .github/skills/common-testing-conventions of macalbert/envilder.

  • SKILL.md
  • dotnet.md
  • examples.md
  • python.md
  • reference.md
  • typescript.md

Open the folder on GitHubat commit b6a0327

Compare with similar skills

Common Testing Conventions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Common Testing Conventions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Common Testing Conventions this skillmacalbert/envilder138—~1.9kAutomated safety check: PassMIT
Test Analysis Extensionsmicrosoft/testfx1k2 repos~1.1kAutomated safety check: PassMIT
Assertion Qualitymicrosoft/testfx1k—~4.1kAutomated safety check: PassMIT
Test Gap Analysismicrosoft/testfx1k—~4kAutomated safety check: PassMIT
Test Anti Patternsmicrosoft/testfx1k—~4.9kAutomated safety check: PassMIT
Zizkadb TestZIZKA-AI-SL/ZizkaDB124—~358Automated safety check: PassCustom licence

Similar skills

  • Test Analysis Extensions

    microsoft/testfx

    Official

    Provides file paths to language-specific reference files for the test ANALYSIS skills (assertion-quality, test-anti-patterns, test-gap-analysis, test-smell-detection, test-tagging).

    1k GitHub starsUsed in 2 repos~1.1k tokens
    Testing & QAAuto-check passed
  • Assertion Quality

    microsoft/testfx

    Official

    Analyzes the variety and depth of assertions across test suites in any language.

    1k GitHub stars~4.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Gap Analysis

    microsoft/testfx

    Official

    Performs pseudo-mutation analysis on production code in any language to find gaps in existing test suites.

    1k GitHub stars~4k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Anti Patterns

    microsoft/testfx

    Official

    Audits existing test code in any language for anti-patterns and quality issues — produces a severity-ranked report (Critical / Warning / Info) with concrete code-level fixes.

    1k GitHub stars~4.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Zizkadb Test

    ZIZKA-AI-SL/ZizkaDB

    Run the full ZizkaDB test suite across all layers — lint, Python unit tests, SDK tests, MCP tests, TypeScript tests, and dashboard build verification.

    124 GitHub stars~358 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Typescript Testing

    ComposioHQ/composio

    Select and run TypeScript SDK verification for packages, examples, type checks, linting, builds, Vitest suites, Effect v4 CLI tests, and runtime E2E tests.

    30k GitHub stars~222 tokensUpdated today
    Testing & QAAuto-check passed

More from macalbert/envilder

All 30 skills in this repo
  • Code Review Perspectives

    macalbert/envilder

    Five independent analysis perspectives for code review: correctness, architecture, security, conventions, and complexity.

    138 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Index of Architecture Decision Records (ADRs) for cross-cutting technical decisions.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Common Git

    macalbert/envilder

    Git commit messages, PR workflow, and branching strategy using Conventional Commits and Semantic Versioning.

    138 GitHub stars~991 tokensUpdated 2 days ago
    Auto-check passed
  • Doc Maintenance

    macalbert/envilder

    Workflow for maintaining changelogs, READMEs, and documentation files.

    138 GitHub stars~904 tokensUpdated 2 days ago
    Auto-check passed
  • Doc Sync

    macalbert/envilder

    Audit and synchronize documentation across website, READMEs, and docs/.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Dotnet Test Doubles

    macalbert/envilder

    Test doubles including Fakes (Bogus), Dummies (AutoFixture), Stubs, Spies, and Mocks (NSubstitute).

    138 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Common Testing Conventions

What does Common Testing Conventions do?

Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python). Common Testing Conventions is an agent skill from macalbert/envilder.NET, TypeScript, Python).

When should I use Common Testing Conventions?

Common Testing Conventions fits situations like: changing test infrastructure; tasks that involve Unit testing.

How do I install Common Testing Conventions in Claude Code?

Run `npx skills add macalbert/envilder --skill common-testing-conventions -a claude-code`. Or copy the skill folder (.github/skills/common-testing-conventions in macalbert/envilder) into .claude/skills/common-testing-conventions in your project. Claude Code loads it when a task matches its description.

How do I install Common Testing Conventions in Codex?

Run `npx skills add macalbert/envilder --skill common-testing-conventions -a codex`. Or copy the skill folder (.github/skills/common-testing-conventions in macalbert/envilder) into .agents/skills/common-testing-conventions in your project. Codex loads it when a task matches its description.

Can I use Common Testing Conventions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macalbert/envilder --skill common-testing-conventions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/common-testing-conventions, .gemini/skills/common-testing-conventions, .github/skills/common-testing-conventions and .opencode/skills/common-testing-conventions in your project.

What does Common Testing Conventions need to run?

SKILL.md names no scripts, command-line tools or credentials: Common Testing Conventions is instructions for the agent only. Our summary lists: Python 3.

Does Common Testing Conventions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Common Testing Conventions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Common Testing Conventions use?

Common Testing Conventions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Common Testing Conventions use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Common Testing Conventions?

Skills that share tags, products or a category with Common Testing Conventions: Test Analysis Extensions (microsoft/testfx, 1k stars), Assertion Quality (microsoft/testfx, 1k stars), Test Gap Analysis (microsoft/testfx, 1k stars) and Test Anti Patterns (microsoft/testfx, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Common Testing Conventions?

macalbert (a GitHub user) maintains it in macalbert/envilder, which has 138 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 5, 2026.

Source: macalbert/envilder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.