MoAI TDD Workflow
modu-ai/moai-adk
Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.
Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.
$ npx skills add amElnagdy/guard-skills --skill test-guard -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install amElnagdy/guard-skills test-guard --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/test-guard .claude/skills/test-guard && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .claude/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guardType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add amElnagdy/guard-skills --skill test-guard -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install amElnagdy/guard-skills test-guard --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/test-guard .agents/skills/test-guard && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .agents/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add amElnagdy/guard-skills --skill test-guard -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install amElnagdy/guard-skills test-guard --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/test-guard .cursor/skills/test-guard && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .cursor/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/amElnagdy/guard-skills.git --path skills/test-guard--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add amElnagdy/guard-skills --skill test-guard -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install amElnagdy/guard-skills test-guard --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/test-guard .gemini/skills/test-guard && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .gemini/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install amElnagdy/guard-skills test-guardInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add amElnagdy/guard-skills --skill test-guard -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/test-guard .github/skills/test-guard && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .github/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add amElnagdy/guard-skills --skill test-guard -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install amElnagdy/guard-skills test-guard --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/test-guard .opencode/skills/test-guard && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "test-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard into .opencode/skills/test-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-guard", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
test-guardReviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.
Test Guard acts as a quality gate after an agent writes, edits or refactors tests. It targets three habits it says agents fall into: unit tests packed with mocks that assert implementation details, near-identical tests that differ by a single value, and tests that merely re-check the framework instead of the project's own logic.
Before judging anything, it reads the project's own agent instructions and testing docs, which win over its rules, then identifies the test stack and loads the matching reference for pytest, PHPUnit and Pest, or Jest and Vitest. A fourth reference covers projects that call LLM APIs. Findings are reported briefly with the rule number, location, reason and a suggested fix, and the skill can also guide test writing when invoked up front. It is not meant for reviewing production code, CI setup or running tests.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ffa2603. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Test Guard loads about 2.1k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 207 tokens; SKILL.md has 1,045 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from amElnagdy/guard-skills at commit ffa2603, republished under its MIT licence (© amElnagdy). 1,045 words, ~2,131 tokens.
.claude/skills/test-guard/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.You are reviewing generated or changed test code before it ships. Enforce the rules below after the first test-writing pass and before the tests are presented, committed, or merged. Be a sharp reviewer, not a pedantic one: flag what wastes maintenance effort or hides real bugs, ignore cosmetic preferences.
These rules exist because coding agents over-generate tests. The common failure modes: mock-heavy unit tests that assert implementation details, near-duplicate test bodies that differ by one value, and tests that re-verify the framework instead of the project's logic. Each looks productive in a diff and costs maintenance forever.
These rules are universal, but their application is not. Before reviewing:
When writing new tests, ask for each test: "What specific bug does this catch that no other test in this suite catches?" If you can't answer clearly, don't write it.
Test what code does from the caller's perspective. Assert return values and observable side effects. Never assert that an internal helper was called with specific arguments — that test breaks on every refactor while catching nothing.
Violation pattern: asserting a mock of an internal function was called, where that function is not a system boundary. Fix: assert the return value or the state change the caller observes.
Mock only at system boundaries: network and HTTP calls, LLM APIs, databases, filesystem I/O on external files, clock and randomness, third-party SDKs. Never mock internal classes or helper functions to isolate a "unit" — the seams you create hide the integration bugs worth catching.
When you mock a boundary, assert what the caller does with the response, not that the mock received specific arguments.
If two or more tests share identical setup and differ only in input/output values, merge them into one data-driven test (@pytest.mark.parametrize, PHPUnit #[DataProvider], Jest test.each).
When separate tests ARE correct: different setup, different assertions, different mock configurations, or genuinely different scenarios that happen to exercise the same function.
Ask: "What bug does this catch that no other test catches?" Delete tests that only catch typos, verify default values of data classes, or test trivial pass-through logic.
Common unjustified tests: constructors setting attributes, a function rejecting input the type system already forbids, string formatting of log messages, a constant equaling its literal value.
Pattern: test_<scenario>_<expected_outcome>. The name should read like a requirement, not echo the function signature.
| Bad | Good |
|---|---|
test_parse_response_missing_field | test_malformed_response_falls_back_to_default |
test_get_language_no_class | test_element_without_class_returns_empty_language |
test_add_tags_single_string | test_single_tag_normalizes_to_list |
Tests that reproduce a real production bug are always justified. Reference the incident (date, issue ID, or short description) in the name or a comment, and never delete them. They are exempt from Rule 4 — their justification is the incident.
Don't test that the validation library validates, the ORM commits, the router returns 404, or the test framework's fixtures work. Test your logic that sits on top of the framework.
Violation pattern: a test that would still pass if you deleted all the project's custom code and kept only framework defaults.
Never mock a data model, DTO, entity, or state object. Construct a real instance. Mocking state hides field-name typos and validation errors — exactly the bugs worth catching. If constructing the real object is painful, that is design feedback, not a reason to mock; add a small builder or factory helper.
When database queries, schema behavior, or persistence logic is the subject of the test, run against a real test database with real migrations applied via fixtures. Mocking the session there tests nothing. Mocking the database is fine when persistence is only a side effect of the behavior under test.
When flagging violations, use this format:
**Rule N violation** in `tests/path/file.ext::<test_name>`
- What: <one sentence describing the violation>
- Fix: <one sentence describing what to do instead>Group violations by file. If a file has no violations, don't mention it.
Not all violations are equal. Use judgment:
© amElnagdy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/test-guard of amElnagdy/guard-skills.
Open the folder on GitHubat commit ffa2603
We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in amElnagdy/guard-skills, which our catalogue first saw on October 7, 2026.
Test Guard next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Test Guard this skillamElnagdy/guard-skills | 1.3k | 2 repos | ~2.1k | Automated safety check: Pass | MIT | |
| MoAI TDD Workflowmodu-ai/moai-adk | 1.2k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Test-Driven Development Enforcerzereight/gitlab-mcp | 2k | 1 repos | ~904 | Automated safety check: Pass | MIT | |
| Designing TestsCloudAI-X/claude-workflow-v2 | 1.4k | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Validatejuliepy/AI-Engineer-from-scrach | 436 | — | ~500 | Automated safety check: Pass | None | |
| Code Testingdotnet/skills | 5.6k | 1 repos | ~5.4k | Automated safety check: Pass | MIT |
modu-ai/moai-adk
Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.
zereight/gitlab-mcp
Enforces strict red-green-refactor, with a failing test first, the minimum code to pass it, then cleanup, and a quick reference for common test runners.
CloudAI-X/claude-workflow-v2
Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.
juliepy/AI-Engineer-from-scrach
Run the full quality gate (ruff + mypy + pytest + tsc + vitest) and report PASS/FAIL for each command.
dotnet/skills
ALWAYS USE for test work that requires changes: write, add, generate, repair, or strengthen tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework.
rohitg00/skillkit
Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable…
amElnagdy/guard-skills
Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.
amElnagdy/guard-skills
Checks generated or edited documentation against the source code, flagging invented symbols, outdated samples and unverifiable claims before publishing.
amElnagdy/guard-skills
Reviews generated or changed WooCommerce code for HPOS safety, CRUD use, checkout validation and money handling before it ships.
amElnagdy/guard-skills
Reviews WordPress plugin, theme and block code after an agent writes or edits it, catching missing escaping, nonces, capability checks and unprepared queries.
Categories
Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed. Test Guard acts as a quality gate after an agent writes, edits or refactors tests. It targets three habits it says agents fall into: unit tests packed with mocks that assert implementation details, near-identical tests that differ by a single value, and tests that merely re-check the framework instead of the project's own logic.
Test Guard fits situations like: reviewing tests an agent just generated before presenting or committing them; checking a pull request diff that adds or changes test files; trimming a bloated suite full of mock-heavy or duplicate tests; writing new tests with the rules applied from the start.
Run `npx skills add amElnagdy/guard-skills --skill test-guard -a claude-code`. Or copy the skill folder (skills/test-guard in amElnagdy/guard-skills) into .claude/skills/test-guard in your project. Claude Code loads it when a task matches its description.
Run `npx skills add amElnagdy/guard-skills --skill test-guard -a codex`. Or copy the skill folder (skills/test-guard in amElnagdy/guard-skills) into .agents/skills/test-guard in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add amElnagdy/guard-skills --skill test-guard -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-guard, .gemini/skills/test-guard, .github/skills/test-guard and .opencode/skills/test-guard in your project.
SKILL.md names no scripts, command-line tools or credentials: Test Guard is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Test Guard is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Test Guard: MoAI TDD Workflow (modu-ai/moai-adk, 1.2k stars), Test-Driven Development Enforcer (zereight/gitlab-mcp, 2k stars), Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars) and Validate (juliepy/AI-Engineer-from-scrach, 436 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
amElnagdy (a GitHub user) maintains it in amElnagdy/guard-skills, which has 1,260 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 4, 2026.
Source: amElnagdy/guard-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.