Unit Test Project Conformant logo

Unit Test Project Conformant

Organization
opendatahub-io
unit-test-project-conformant

Use this skill to write unit tests that strictly conform to the project's existing testing structure, patterns, and style by learning from similar tests before writing anything new.

Overview

Publisheropendatahub-io
Repositoryai-helpers
Skill nameunit-test-project-conformant
Stars
39
Forks
76
Bundled files
Instructions only
LicenseApache-2.0
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 opendatahub-io on GitHub. Read the source before you install it.

Installation

Install the Unit Test Project Conformant 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/opendatahub-io/ai-helpers/tree/main/plugins/odh-code-quality/skills/unit-test-project-conformant
  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/opendatahub-io/ai-helpers.git /tmp/ai-helpers
mkdir -p .claude/skills
cp -r /tmp/ai-helpers/plugins/odh-code-quality/skills/unit-test-project-conformant .claude/skills/unit-test-project-conformant
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Unit Test Project Conformant 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 Unit Test Project Conformant 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 Unit Test Project Conformant 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.

Unit Test (Project-Conformant) Skill

This skill ensures the agent does not invent test structure and instead learns how the project already tests similar code, then writes the new test in the same style, location, and pattern.

The goal is for the new test to be indistinguishable from existing tests.

When to Use

  • Use this skill every time a unit test must be written or modified.
  • Use this skill when adding coverage for new functions, classes, or behavior.
  • Use this skill when refactoring code that requires corresponding test updates.
  • This skill is required whenever the agent is tempted to create a “clean” or “ideal” test structure.

Instructions

Step 1 — Discover How the project Tests Similar Code

Before writing any test:

  • Identify the file, function, or class to be tested.
  • Search the project for tests covering:
    • The same module
    • The same directory
    • Similar functions
    • Similar classes
    • Similar behavior
  • Use search terms such as:
    • Function name
    • Class name
    • Module name
    • Error messages
    • Public API names

You must examine at least 2–3 similar tests before proceeding.


Step 2 — Extract the Test Pattern

From the discovered tests, learn:

  • Where tests are located
  • File naming conventions
  • Test naming conventions
  • Whether tests are:
    • Standalone functions
    • Inside classes
    • Parametrized
    • Fixture-driven
    • Integration-style
  • Assertion style
  • Mocking style
  • Helper utilities used
  • What is intentionally not tested

You are learning the project’s testing contract.


Step 3 — Decide Where the Test Belongs

Follow existing structure exactly:

  • If similar code is tested in a shared file → add to that file
  • If similar code is tested inside a class → add a method there
  • If similar tests extend parametrization → extend it
  • If similar behavior is only tested indirectly → do the same

Do not create a new test file unless similar tests do.


Step 4 — Match Style Exactly

Mirror the project’s style for:

  • Function and variable names
  • Imports
  • Assertion style
  • Fixtures
  • Mocking
  • Test utilities
  • Formatting and layout

Do not introduce new libraries, helpers, or patterns.


Step 5 — Respect How the project Chooses to Test

If similar methods:

  • Are tested indirectly
  • Are tested via integration tests
  • Are not given standalone unit tests

Then you must follow the same pattern.

Do not create standalone unit tests if the project does not.


Step 6 — Match the Level of Coverage

Match the project’s expectations:

  • If tests check only success paths → do the same
  • If tests include edge cases → include them
  • If tests include error cases → include them
  • If tests use heavy mocking → do the same
  • If tests avoid mocking → avoid it

Do not over-test compared to existing patterns.


Step 7 — Reuse Existing Helpers and Fixtures

Search for and reuse:

  • Fixtures
  • Base test classes
  • Utilities
  • Custom assertions
  • Shared setup logic

Do not recreate logic that already exists.


Step 8 — Write the Test Last

Only after completing all discovery steps should you write the test.

The result should look like it was written by the same author as the surrounding tests.


Anti-Patterns (Never Do These)

  • Creating new test structure because it seems “better”
  • Writing standalone tests when the project does not
  • Introducing new testing frameworks
  • Adding excessive assertions not seen elsewhere
  • Adding mocks where the project avoids them
  • Guessing where tests belong without searching

Final Checklist

Before finishing, confirm:

  • Test is in the correct location
  • Naming matches existing tests
  • Structure matches existing tests
  • Assertions match existing tests
  • Fixtures/helpers are reused
  • No new patterns introduced
  • Coverage level matches similar tests

Gotchas

  • Always search for at least 2-3 similar tests before writing anything; skipping discovery leads to non-conformant structure.
  • Do not create a new test file unless the project already uses separate files for similar test scopes.
  • Match the project's mocking strategy exactly — introducing mocks where the project avoids them (or vice versa) will make the test inconsistent.

Examples

text
/unit-test-project-conformant write a test for the parse_config() function in src/config.py
text
/unit-test-project-conformant add test coverage for the new validate_input method in models/user.py

Use the ask questions tool if you need to clarify requirements with the user.

Frequently asked questions

What does the Unit Test Project Conformant AI skill do?

Use this skill to write unit tests that strictly conform to the project's existing testing structure, patterns, and style by learning from similar tests before writing anything new.

Why use Unit Test Project Conformant on TypingMind?

Because you install it once and use it with any model. Unit Test Project Conformant 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 Unit Test Project Conformant in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-code-quality/skills/unit-test-project-conformant. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Unit Test Project Conformant?

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 Unit Test Project Conformant?

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

Is the Unit Test Project Conformant AI skill free?

Yes. It is published on GitHub by opendatahub-io under the Apache-2.0 license. 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 👇