unit-test-architect

unit-test-architect is a skill for Claude Code, Codex from GktuOktay/ai-skills. It costs 60 tokens per session (1,038 once invoked), scanned A, original, MIT.

A guide to writing unit tests, which check individual pieces of code in isolation, using mocks and stubs to replace outside dependencies.

In plain words
What is it for?
Use it to structure tests with Arrange, Act, Assert; isolate dependencies; and cover unusual inputs and side effects.
Why use it?
It helps catch incorrect behavior and edge cases without relying on networks, files, clocks, or other factors that can make tests unreliable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to structure tests with Arrange, Act, Assert; isolate dependencies; and cover unusual inputs and side effects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gktuoktay/ai-skills/unit-test-architect
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.

Any agent
npx skills add GktuOktay/ai-skills --skill unit-test-architect
Clone the repo
git clone --depth 1 https://github.com/GktuOktay/ai-skills

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 unit-test-architect

README.md
[![agentmods](https://agentmods.dev/badge/skills/gktuoktay/ai-skills/unit-test-architect/github.svg)](https://agentmods.dev/skills/gktuoktay/ai-skills/unit-test-architect)
Your own site
<a href="https://agentmods.dev/skills/gktuoktay/ai-skills/unit-test-architect"><img src="https://agentmods.dev/badge/skills/gktuoktay/ai-skills/unit-test-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unit-test-architect

Your own site · 80×15
<a href="https://agentmods.dev/skills/gktuoktay/ai-skills/unit-test-architect"><img src="https://agentmods.dev/badge/skills/gktuoktay/ai-skills/unit-test-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00060 $0.01038
Opus 5 $0.00030 $0.00519
Sonnet 5 $0.00012 $0.00208
Haiku 4.5 $0.00006 $0.00104

Measured 8d ago against content hash feb0e41f5e2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

unit-test-architect 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 8d 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.

.agents/skills/unit-test-architect/SKILL.md · 112 lines

How it starts

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

Unit Test Architect Guidelines

As a Unit Test Architect, your goal is to ensure the reliability, maintainability, and correctness of individual code units by applying rigorous testing methodologies. You focus on isolated behavior, minimizing side effects, and ensuring edge cases are fully covered.

Core Philosophy

  1. Isolation: A unit test must isolate the tested unit from its dependencies.
  2. Determinism: Tests must consistently pass or fail based purely on the code's behavior, not external factors like time, network, or filesystem.
  3. Speed: Unit tests should execute rapidly to provide immediate developer feedback.
  4. Clarity: Test failures must immediately point to the exact issue.

The AAA Pattern (Arrange, Act, Assert)

Every unit test should be structured logically using the AAA pattern:

  • Arrange: Set up the environment, initialize objects, establish mocks/stubs, and prepare data.
  • Act: Invoke the method or behavior being tested.
  • Assert: Verify that the expected outcome occurred (return values, state changes, or interactions).

Code Example: AAA Pattern

// Example using Jest
describe('ShoppingCart', () => {
  it('should calculate the total price with tax correctly', () => {
    // Arrange
    const cart = new ShoppingCart();
    const item = new Item('Laptop', 1000);
    cart.addItem(item);
    const taxRate = 0.10; // 10%

    // Act
    const total = cart.calculateTotal(taxRate);

    // Assert
    expect(total).toBe(1100);
  });
});

Mocking vs. Stubbing

Understanding the distinction is critical for writing meaningful tests without over-mocking.

Concept Definition When to Use
Stub An object that holds predefined data and uses it to answer calls during tests. It does not fail the test. When your unit needs data from an external dependency to execute a path.
Mock An object that registers calls they receive. In test assertion we can verify that all expected actions were performed. When you want to verify that an external dependency was called correctly (e.g., saving to DB, sending an email).
Spy A wrapper around a real function that tracks calls, arguments, and return values without necessarily altering behavior. When you need real behavior but also want to track interactions.

Read the full file on GitHub · 112 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. 8d ago First seen · 112 lines · 60 tokens per session scan A feb0e41f5e2b

Subscribe to this mod's changes

unit-test-architect is a skill published in the GitHub repository GktuOktay/ai-skills (2 stars, last pushed 8d ago), licensed MIT. It adds 60 tokens to every session and 1,038 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

test-engineer

QA and testing agent that writes unit tests, integration tests, and edge case coverage for the codebase. Triggers on: write tests, test coverage, QA, quality assurance, unit tests, integration tests, edge cases.

Aizaz-Noor/Agent-Startup-Skills · 49 tokens

python-testing-patterns

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

tmolavi/mcp-agent-skills-hub · 38 tokens

javascript-testing-patterns

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

tmolavi/mcp-agent-skills-hub · 63 tokens

bats-testing-patterns

Master Bash Automated Testing System (Bats) for comprehensive shell script testing. Use when writing tests for shell scripts, CI/CD pipelines, or requiring test-driven development of shell utilities.

tmolavi/mcp-agent-skills-hub · 42 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…

samber/cc-skills-golang · 97 tokens