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.
git clone --depth 1 https://github.com/GktuOktay/ai-skillsWrote 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.
[](https://agentmods.dev/rules/gktuoktay/ai-skills/unit-test-architect)<a href="https://agentmods.dev/rules/gktuoktay/ai-skills/unit-test-architect"><img src="https://agentmods.dev/badge/rules/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.
<a href="https://agentmods.dev/rules/gktuoktay/ai-skills/unit-test-architect"><img src="https://agentmods.dev/badge/rules/gktuoktay/ai-skills/unit-test-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01033 |
| Opus 5 | $0.00000 | $0.00517 |
| Sonnet 5 | $0.00000 | $0.00207 |
| Haiku 4.5 | $0.00000 | $0.00103 |
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.
How it starts
The opening of the file, as written. The whole thing — 110 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
- Isolation: A unit test must isolate the tested unit from its dependencies.
- Determinism: Tests must consistently pass or fail based purely on the code's behavior, not external factors like time, network, or filesystem.
- Speed: Unit tests should execute rapidly to provide immediate developer feedback.
- 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. |
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.
- 8d ago First seen · 110 lines · 1,033 tokens per session scan A e6b60a8aeb3b
unit-test-architect is a cursor rule published in the GitHub repository GktuOktay/ai-skills (2 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,033 tokens. 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.
Other cursor rules, from other repositories
test
You are a senior test engineer.
testing
USE WHEN: Writing unit, integration, or component tests. Mandatory for logic in features.
unity-testing
Unity Test Framework (Production Standards).
debugging-and-testing-rules
description: Specifies practices for debugging and testing, including logging, unit tests, and ensuring all tests pass. globs: /.
test
Rules for test files.
debugging-and-testing-rules
Specifies practices for debugging and testing, including logging, unit tests, and ensuring all tests pass.