test-fixer

test-fixer is a skill for Claude Code, Codex from mitchdenny/hex1b. It costs 39 tokens per session (6,236 once invoked), scanned A, original, MIT.

Troubleshooting guidance for flaky terminal-interface tests in the Hex1b .NET test suite. These are tests that sometimes pass and sometimes fail because of timing or shared state.

In plain words
What is it for?
Use it to diagnose timing races, missing waits, snapshots taken too early, Ctrl+C issues, test interference, and platform-specific failures.
Why use it?
It helps explain failures that appear in continuous integration even when the same tests pass on a developer's machine.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mitchdenny/hex1b/test-fixer
Any agent
npx skills add mitchdenny/hex1b --skill test-fixer
Clone the repo
git clone --depth 1 https://github.com/mitchdenny/hex1b

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-fixer

README.md
[![agentmods](https://agentmods.dev/badge/skills/mitchdenny/hex1b/test-fixer.svg)](https://agentmods.dev/skills/mitchdenny/hex1b/test-fixer)
Your own site
<a href="https://agentmods.dev/skills/mitchdenny/hex1b/test-fixer"><img src="https://agentmods.dev/badge/skills/mitchdenny/hex1b/test-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.06236
Opus 5 $0.00019 $0.03118
Sonnet 5 $0.00008 $0.01247
Haiku 4.5 $0.00004 $0.00624

Measured 5d ago against content hash 771e9bddf335, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/test-fixer/SKILL.md · 750 lines

How it starts

The opening of the file, as written. The whole thing — 750 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Fixer Skill

This skill provides guidelines for AI agents to diagnose and fix flaky tests in the Hex1b TUI library test suite. These tests use MSTest 4 (MSTest.Sdk/4.2.3, OutputType=Exe) with Microsoft.Testing.Platform and Hex1bTerminalInputSequenceBuilder to simulate user interactions with terminal applications. global.json configures dotnet test to use MTP, and test projects can also be run as executables with dotnet run --project tests/SomeProject/.

Quick Reference: Common Flaky Test Patterns

Pattern Symptom Fix
Snapshot After Exit Test passes locally, fails on Linux CI Move WaitUntil before Capture, ensure Capture is before exit
Missing WaitUntil Intermittent assertion failures Add WaitUntil for expected state before Capture
Race with Ctrl+C Snapshot missing expected content Add WaitUntil between last action and Capture
Task.WhenAny Race Test sometimes times out Replace with proper WaitUntil or increase timeout
Test Interference Pass isolated, fail in suite Check for shared state, file locks, or parallel execution issues
Platform-Specific Fails consistently on Windows/Linux Add TestCategory/Ignore or fix platform-specific code
Task.Delay for Async Events Flaky on slower CI runners Replace Task.Delay with TaskCompletionSource signal
Helper Partial Wait Tests using multi-line helpers fail intermittently Wait for all/last content, not just first line

Pattern 1: Snapshot Captured After App Exit

⚠️ This is the most common flaky test issue

Symptoms
  • Test passes consistently on Windows
  • Test fails on Linux CI (GitHub Actions ubuntu-latest)
  • Assertion fails with content that "should" be there
  • Error messages like Assert.IsTrue failed or An item should be selected with indicator

Read the full file on GitHub · 750 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 750 lines · 39 tokens per session scan A 771e9bddf335

Subscribe to this mod's changes

test-fixer is a skill published in the GitHub repository mitchdenny/hex1b (175 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 6,236 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

react-ink

Use this skill when building terminal user interfaces with React Ink - interactive CLI apps, terminal dashboards, progress displays, or keyboard-driven TUI components. Triggers on React Ink, Ink components, terminal UI with React, useInput, useFocus, Box/Text layout, create-ink-app, and any task requiring rich…

pass-agent/loomkin · 77 tokens

dpg-migration

Migration logic for Azure SDK for .NET data-plane libraries migrating from AutoRest/Swagger to TypeSpec-based generation. Uses MCP tools from the generator-agent server for automated deterministic fixes.

Azure/azure-sdk-for-net · 41 tokens

mitigate-breaking-changes

Patterns and techniques for mitigating breaking changes in Azure management-plane SDKs. Covers SDK-side customizations (partial classes, CodeGenType, CodeGenSuppress) and TypeSpec decorator customizations (clientName, access, markAsPageable, alternateType, hierarchyBuilding).

Azure/azure-sdk-for-net · 60 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

nunit-code-style

Use when writing or modifying C# method bodies, type declarations, or non-trivial logic in NUnit source. Covers NUnit's taste-and-judgment conventions — exception construction, simplification, naming intent, StringComparison, non-null check form, and var usage — that aren't already caught at build time.

nunit/nunit · 69 tokens