Test Audit logo

Test Audit

OrganizationPopular
udecode
test-audit

Audit existing tests for low-value, duplicated or implementation-coupled cases and the test-only code they keep alive, then remove or rewrite them on evidence. Use for test-audit, /test-audit <scope>, a test sweep, or pruning tests. Not for writing a new test; the project's Tests rule gates that.

Overview

Publisherudecode
Repositorydotai
Skill nametest-audit
Stars
1.2K
Forks
82
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by udecode on GitHub. Read the source before you install it.

Installation

Install the Test Audit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/udecode/dotai/tree/main/skills/test-audit
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/udecode/dotai.git /tmp/dotai
mkdir -p .claude/skills
cp -r /tmp/dotai/skills/test-audit .claude/skills/test-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Test Audit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Test Audit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Test Audit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Test audit

Adapted from openclaw's test-audit skill (MIT, OpenClaw Foundation; see LICENSE).

Judge the result by how much the remaining tests can be trusted, never by how many were deleted. A test is worth keeping when it protects observable behavior, a credible regression, or an independent contract: a public API, protocol, config, migration, storage, security, platform, default, generated, package, release or architecture contract. Static or slow is never a reason to delete.

Scope

Take the user's scope, or the files they name. Read the root and scoped AGENTS.md first; their Tests rule is the bar for every test this audit keeps, rewrites or moves. Leave out skills and code installed from another repository.

Discover, read-only

  1. For a broad scope, split it into read-only lanes by owner area and run them in parallel.
  2. For each candidate, read the whole test, its production owner, the owner's callers, the overlapping tests, CI routing and history. When a test claims behavior a dependency provides, read that dependency.
  3. Prove what a test catches by mutating a scratch copy of its owner and running the test against it, never by editing the checkout.
  4. Prefer a few high-confidence candidates over a long speculative list. Report the evidence before editing.

Junk patterns

  • Assertion-free coverage probes.
  • Self-comparisons and identity copiers.
  • Copied fixtures, inventories, manifests or export lists.
  • Exact source, import or string greps, and regexes over prose.
  • Private predicate or call-shape tests that a test at the real boundary duplicates.
  • Duplicate invocations of the same contract, including a test this run just added and a test that builds its own fixture to recheck what a shared fixture already covers.
  • Tests whose only purpose is keeping a test-only export, global or wrapper alive.
  • Dead production code whose only callers are tests.
  • Expected values produced by the helper or renderer under test.
  • Mocks that implement the asserted behavior, or one mock standing in for different APIs.
  • Fixtures that supply what the owner should produce, or persistence asserted against a store the path never writes.
  • Assertions on a value the code returns as a constant.
  • Negative controls that pass for an unrelated reason, such as a crash or a denial from a different guard.
  • Names or fixtures that promise more than the input exercises.
  • Tests coupled to historical documents or plans whose content keeps changing.

Retention bar

Keep a test that independently enforces one of the contracts listed at the top, and keep:

  • call ordering when the order is observable behavior;
  • a regression with a credible failure mode;
  • a source inspection that is the cheapest independent guard, failing when the user-facing key, byte or path changes and surviving an identifier rename; when the project's Tests rule bans source-text tests, the guard moves to its lint or a check script;
  • a test that fails on the current tree. Treat it as a possible bug, reproduce it and repair the owner or the fixture instead of deleting it.

A test that resembles the implementation may still be the independent contract. Prove otherwise before removing it.

Candidate evidence

Record every field before editing; a missing field means the candidate is not ready:

  • the exact test name and location;
  • the failure it can actually detect, shown by a mutant;
  • the non-test callers of the covered code;
  • the stronger owner-boundary proof that remains, or why none is needed;
  • the history and the reason the test or seam exists;
  • the production or test-support deletion it unlocks;
  • the risk and the focused validation command.

Edit shape

Change one coherent owner-boundary batch at a time. Delete obsolete test-only exports, globals, wrappers and dead production paths instead of keeping aliases. Move a retained regression to its canonical owner, and fold near-duplicates into the shared fixture. Prefer a change that removes more production lines than it adds. Add no replacement test that restates the implementation, and never turn an uncertain candidate into a deletion to raise the count. Before the first edit to a file that holds another session's work, copy it to scratch.

Validate

  1. Run the owner's and its siblings' tests with the project's own runners.
  2. Run each rewritten test against its named mutant and see it fail.
  3. For a removed grep or plan assertion, run the executable that owns the real contract.
  4. Regenerate anything the edited files feed, such as skill mirrors or a manifest, and run its check.
  5. Report production and test line counts separately, measured against the scratch copies when the index holds other sessions' work.

Review and delivery follow the project's AGENTS.md.

Handoff

Report the removed low-value categories, the production simplifications, the retained false positives and why they stay, the proof actually run, production and test line counts, the commit or PR state, and named follow-ups with owners. In a project with plan pages, write this in the plan's ## Close.

Frequently asked questions

What does the Test Audit AI skill do?

Audit existing tests for low-value, duplicated or implementation-coupled cases and the test-only code they keep alive, then remove or rewrite them on evidence. Use for test-audit, /test-audit <scope>, a test sweep, or pruning tests. Not for writing a new test; the project's Tests rule gates that.

Why use Test Audit on TypingMind?

Because you install it once and use it with any model. Test Audit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Test Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/udecode/dotai/tree/main/skills/test-audit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Test Audit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Test Audit?

As many as you like. As long as a model supports skills, you can use Test Audit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Test Audit AI skill free?

It is published on GitHub by udecode. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇