moai-ref-testing-pyramid

moai-ref-testing-pyramid is a skill for Claude Code from modu-ai/moai-adk. It costs 61 tokens per session (1,714 once invoked), scanned A, original, Apache-2.0.

A testing guide for choosing unit, integration, and end-to-end tests, with coverage goals and reusable test patterns.

In plain words
What is it for?
Use it when creating tests, checking coverage, or following test-driven development (writing tests before code and improving the code until they pass).
Why use it?
It helps teams decide what to test and where, so they avoid relying too heavily on slow or fragile tests while missing important code.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it when creating tests, checking coverage, or following test-driven development (writing tests before code and improving the code until they pass).

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-adk/moai-ref-testing-pyramid
About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,200 stars · on GitHub · adk.mo.ai.kr

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 modu-ai/moai-adk --skill moai-ref-testing-pyramid
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

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 moai-ref-testing-pyramid

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-testing-pyramid/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-testing-pyramid)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-testing-pyramid"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-testing-pyramid/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 moai-ref-testing-pyramid

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-testing-pyramid"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-testing-pyramid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,714 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 151
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
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.00061 $0.01714
Opus 5 $0.00030 $0.00857
Sonnet 5 $0.00012 $0.00343
Haiku 4.5 $0.00006 $0.00171

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

Security

Grade A, and why

moai-ref-testing-pyramid 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 9d 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.

.claude/skills/moai-ref-testing-pyramid/SKILL.md · 188 lines

How it starts

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

Testing Pyramid Reference

Target Agents

  • manager-develop - Primary: applies patterns during test creation and coverage analysis
  • manager-develop - Secondary: applies during RED-GREEN-REFACTOR cycles

Test Pyramid Ratios

       /  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

Coverage Targets by Context

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

Test Pattern: AAA (Arrange-Act-Assert)

// Arrange: Set up test data and preconditions
input := CreateTestUser("[email protected]")

// Act: Execute the function under test
result, err := service.CreateUser(ctx, input)

// Assert: Verify the outcome
assert.NoError(t, err)
assert.Equal(t, "[email protected]", result.Email)

Unit Test Patterns

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

Read the full file on GitHub · 188 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. 9d ago First seen · 188 lines · 61 tokens per session scan A e0dc87896e06

Subscribe to this mod's changes

moai-ref-testing-pyramid is a skill published in the GitHub repository modu-ai/moai-adk (1,200 stars, last pushed yesterday), licensed Apache-2.0. It adds 61 tokens to every session and 1,714 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-08-30.