Designing Tests
CloudAI-X/opencode-workflow
Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.
Test pyramid strategy, coverage targets, test patterns, and quality metrics reference.
$ npx skills add modu-ai/moai-adk --skill moai-ref-testing-pyramid -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install modu-ai/moai-adk moai-ref-testing-pyramid --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/modu-ai/moai-adk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .claude/skills/moai-ref-testing-pyramid && 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 "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .claude/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramidType 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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install modu-ai/moai-adk moai-ref-testing-pyramid --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .agents/skills/moai-ref-testing-pyramid && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .agents/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install modu-ai/moai-adk moai-ref-testing-pyramid --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .cursor/skills/moai-ref-testing-pyramid && 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 "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .cursor/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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/modu-ai/moai-adk.git --path .claude/skills/moai-ref-testing-pyramid--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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install modu-ai/moai-adk moai-ref-testing-pyramid --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .gemini/skills/moai-ref-testing-pyramid && 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 "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .gemini/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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 modu-ai/moai-adk moai-ref-testing-pyramidInstalls 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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .github/skills/moai-ref-testing-pyramid && 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 "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .github/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install modu-ai/moai-adk moai-ref-testing-pyramid --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/moai-ref-testing-pyramid .opencode/skills/moai-ref-testing-pyramid && 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 "moai-ref-testing-pyramid" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-ref-testing-pyramid into .opencode/skills/moai-ref-testing-pyramid/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-ref-testing-pyramid", 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.
moai-ref-testing-pyramidTest pyramid strategy, coverage targets, test patterns, and quality metrics reference.
Moai Ref Testing Pyramid is an agent skill from modu-ai/moai-adk. Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Test strategy, Security review and Test-driven development. The repository describes itself as: Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 6c55321. 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.
Moai Ref Testing Pyramid loads about 1.8k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 635 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 modu-ai/moai-adk at commit 6c55321, republished under its Apache-2.0 licence (© modu-ai). 635 words, ~1,786 tokens.
.claude/skills/moai-ref-testing-pyramid/SKILL.md (or your agent's skills folder).manager-develop - applies patterns during test creation, coverage analysis, and RED-GREEN-REFACTOR cycles / E2E \ 10% — Critical user journeys only
/----------\
/ Integration \ 20% — API endpoints, DB queries, service boundaries
/----------------\
/ Unit Tests \ 70% — Functions, hooks, utilities, pure logic
/--------------------\| Level | Speed | Reliability | Maintenance | Coverage Target |
|---|---|---|---|---|
| Unit | Fast (<100ms) | High | Low | 70% of tests |
| Integration | Medium (1-5s) | Medium | Medium | 20% of tests |
| E2E | Slow (10-60s) | Lower | High | 10% of tests |
| Context | Target | Rationale |
|---|---|---|
| Critical business logic | 95%+ | Revenue/security impact |
| API endpoints | 90%+ | Contract compliance |
| Utility functions | 85%+ | Reuse reliability |
| UI components | 80%+ | Rendering correctness |
| Configuration/glue code | 60%+ | Low complexity |
| Generated code | 0% | Don't test generated code |
// Arrange: Set up test data and preconditions
input := CreateTestUser("test@example.com")
// Act: Execute the function under test
result, err := service.CreateUser(ctx, input)
// Assert: Verify the outcome
assert.NoError(t, err)
assert.Equal(t, "test@example.com", result.Email)| Pattern | When | Example |
|---|---|---|
| Table-Driven | Multiple input/output combinations | Go: tests := []struct{...} |
| Mock/Stub | External dependencies (DB, API) | Interface injection, mock frameworks |
| Snapshot | Complex output comparison | Jest snapshots, golden files |
| Property-Based | Mathematical properties | quickcheck, hypothesis |
| Boundary Value | Edge cases | 0, -1, MAX_INT, empty string, nil |
| Pattern | When | Example |
|---|---|---|
| Testcontainers | Real DB needed | Docker-based PostgreSQL for tests |
| HTTP Test Server | API endpoint testing | httptest.NewServer (Go), supertest (Node) |
| In-Memory DB | Fast DB tests | SQLite for development |
| Fixture Loading | Consistent test data | Factory functions, seed files |
| Metric | Target | Tool |
|---|---|---|
| Line Coverage | 85%+ | go test -cover, istanbul, coverage.py |
| Branch Coverage | 75%+ | go test -covermode=count |
| Mutation Score | 70%+ | go-mutesting, Stryker |
| Test Execution Time | <2 min (unit), <10 min (all) | CI timer |
| Flaky Test Rate | <1% | CI history analysis |
| Language | Test File | Location |
|---|---|---|
| Go | *_test.go | Same package |
| TypeScript | *.test.ts / *.spec.ts | __tests__/ or co-located |
| Python | test_*.py | tests/ directory |
| Java | *Test.java | src/test/ mirror |
| Rust | #[cfg(test)] mod tests | Same file or tests/ |
RED: Write a failing test that defines expected behavior
GREEN: Write minimal code to make the test pass
REFACTOR: Clean up while keeping tests greenRules:
<!-- moai:evolvable-start id="rationalizations" -->
| Rationalization | Reality |
|---|---|
| "E2E tests cover everything, unit tests are redundant" | E2E tests are slow and flaky. Unit tests provide fast, precise feedback. The pyramid exists because each level serves a different purpose. |
| "Integration tests are more realistic than unit tests" | Realism comes at the cost of speed and isolation. A balanced pyramid gives both fast feedback and realistic validation. |
| "100% code coverage means the code is well tested" | Coverage measures execution, not correctness. A test that executes code without meaningful assertions provides zero value. |
| "Mocking is bad, I prefer real dependencies" | Real dependencies make tests slow and non-deterministic. Mock at boundaries, test business logic in isolation. |
| "This test is flaky, but it catches real bugs sometimes" | Flaky tests erode trust in the entire suite. Fix the flakiness or quarantine the test with a tracking issue. |
DAMP over DRY: Test code should be descriptive and self-contained. A reader should understand the test without reading shared fixtures or helper methods.
<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="red-flags" -->
<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="verification" -->
<!-- moai:evolvable-end -->
© modu-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/moai-ref-testing-pyramid of modu-ai/moai-adk.
Open the folder on GitHubat commit 6c55321
Moai Ref Testing Pyramid 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 |
|---|---|---|---|---|---|---|
| Moai Ref Testing Pyramid this skillmodu-ai/moai-adk | 1.2k | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Designing TestsCloudAI-X/opencode-workflow | 275 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Perl Testingaffaan-m/ECC | 274k | 4 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Testingpenpot/penpot | 61k | — | ~487 | Automated safety check: Pass | MPL-2.0 | |
| Automated Test Planningtestdouble/han | 279 | — | ~6.7k | Automated safety check: Pass | MIT | |
| Test Automatoraiskillstore/marketplace | 430 | 8 repos | ~2.8k | Automated safety check: Pass | None |
CloudAI-X/opencode-workflow
Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.
affaan-m/ECC
Perl testing patterns using Test2::V0, Test::More, prove runner, mocking, coverage with Devel::Cover, and TDD methodology.
penpot/penpot
Enforce TDD workflow and testing best practices for Penpot. An agent skill from penpot/penpot.
testdouble/han
Produce a standalone test plan by analyzing code for test coverage gaps and edge cases.
aiskillstore/marketplace
Master AI-powered test automation with modern frameworks, self-healing tests, and comprehensive quality engineering.
testdouble/han
Produce a plain-language manual test plan from the context supplied to it — an executive summary, a high-level list of named tests, and a detail section per test with the steps a person follows by…
modu-ai/moai-adk
Builds hand-editable SVG diagrams from computed layout coordinates, lints the source and renders a 2x PNG, with rules for when mermaid is the better choice.
modu-ai/moai-adk
Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.
modu-ai/moai-adk
Manages SPEC documents for MoAI-ADK development, with GEARS or EARS requirement notation, acceptance criteria and a link into the Plan-Run-Sync 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.
modu-ai/moai-adk
Gives each SPEC its own Git worktree with a registry of active workspaces, base-branch sync and cleanup of merged ones, inside the MoAI-ADK workflow.
modu-ai/moai-adk
Watches a pull request's CI checks after creation, separates required from auxiliary failures, applies limited safe fixes and escalates anything semantic to you.
Categories
Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Moai Ref Testing Pyramid is an agent skill from modu-ai/moai-adk. Test pyramid strategy, coverage targets, test patterns, and quality metrics reference.
Moai Ref Testing Pyramid fits situations like: tasks that involve Test strategy; tasks that involve Security review; tasks that involve Test-driven development.
Run `npx skills add modu-ai/moai-adk --skill moai-ref-testing-pyramid -a claude-code`. Or copy the skill folder (.claude/skills/moai-ref-testing-pyramid in modu-ai/moai-adk) into .claude/skills/moai-ref-testing-pyramid in your project. Claude Code loads it when a task matches its description.
Run `npx skills add modu-ai/moai-adk --skill moai-ref-testing-pyramid -a codex`. Or copy the skill folder (.claude/skills/moai-ref-testing-pyramid in modu-ai/moai-adk) into .agents/skills/moai-ref-testing-pyramid 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 modu-ai/moai-adk --skill moai-ref-testing-pyramid -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/moai-ref-testing-pyramid, .gemini/skills/moai-ref-testing-pyramid, .github/skills/moai-ref-testing-pyramid and .opencode/skills/moai-ref-testing-pyramid in your project.
SKILL.md names no scripts, command-line tools or credentials: Moai Ref Testing Pyramid is instructions for the agent only. Our summary lists: Python 3; Docker.
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.
Moai Ref Testing Pyramid is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Moai Ref Testing Pyramid: Designing Tests (CloudAI-X/opencode-workflow, 275 stars), Perl Testing (affaan-m/ECC, 274k stars), Testing (penpot/penpot, 61k stars) and Automated Test Planning (testdouble/han, 279 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
modu-ai (a GitHub organization) maintains it in modu-ai/moai-adk, which has 1,230 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 7, 2026.
Source: modu-ai/moai-adk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.