three-tier-testing

three-tier-testing is a skill for Claude Code, Codex from ouob-tw/LoopAgentTeams. It costs 52 tokens per session (2,154 once invoked), scanned A, original, MIT.

A testing structure that separates tests into unit tests, integration tests, and end-to-end tests. Unit tests check isolated code, integration tests check services working together, and end-to-end tests check complete user journeys.

In plain words
What is it for?
Use it to organise test directories, choose the right test layer, configure test commands, and decide which important paths and failure cases need coverage.
Why use it?
It makes test scope and dependencies clear, so a basic test run stays fast while tests needing databases, Docker, browsers, or real services are run deliberately.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to organise test directories, choose the right test layer, configure test commands, and decide which important paths and failure cases need coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ouob-tw/loopagentteams/three-tier-testing
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 ouob-tw/LoopAgentTeams --skill three-tier-testing
Clone the repo
git clone --depth 1 https://github.com/ouob-tw/LoopAgentTeams

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 three-tier-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/ouob-tw/loopagentteams/three-tier-testing/github.svg)](https://agentmods.dev/skills/ouob-tw/loopagentteams/three-tier-testing)
Your own site
<a href="https://agentmods.dev/skills/ouob-tw/loopagentteams/three-tier-testing"><img src="https://agentmods.dev/badge/skills/ouob-tw/loopagentteams/three-tier-testing/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 three-tier-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/ouob-tw/loopagentteams/three-tier-testing"><img src="https://agentmods.dev/badge/skills/ouob-tw/loopagentteams/three-tier-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,154 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.00052 $0.02154
Opus 5.5 $0.00021 $0.00862
Sonnet 5.5 $0.00010 $0.00431
Haiku 4.5 $0.00005 $0.00215

Measured 22d ago against content hash c18f9f636501, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

three-tier-testing 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 22d 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.

skills/local/three-tier-testing/SKILL.md · 119 lines

How it starts

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

三層測試架構

依照外部依賴程度,將測試分為三層。每層獨立運行,一條指令執行。

層級 目錄 外部依賴 目的
單元測試 tests/unit/ 無 邏輯正確性 — 純程式碼,所有依賴皆 mock
整合測試 tests/integration/ 假的(測試用 DB 等) 服務串接 — 真實 DB、mock 外部服務
E2E 測試 tests/e2e/ 真的 完整使用者流程 — 無 mock,真實外部服務

前後端分離時,後端測試放 <backend>/tests/ 下,前端測試放 <frontend>/tests/(單元測試可能在 <frontend>/src/**/*.test.*)。單體專案直接用根目錄 tests/。

裸跑原則

裸跑測試指令(不帶目錄或標籤參數)只跑單元測試。整合與 E2E 需明確指定。具體實現方式(testpaths、build tag、設定檔分離等)依語言而定,見語言設定章節。

整合測試環境:Host(預設) vs Docker

本機已跑單一 DB?          → Host(預設)
開發流程已有 Docker Compose? → Docker
多資料庫 / 訊息佇列?       → Docker

Docker 構建與清理

適用於以容器交付的專案;Host 模式維持原有測試方式。

  • 開發測試重用專案開發 image,掛載目前工作區的程式碼;與 production 共用 runtime 版本、依賴鎖定與 Dockerfile 階段,依賴變更時重建。
  • 正式 E2E/QA 使用 production Dockerfile 的正式 target 構建,不掛載原始碼;修改後重建受影響 image 並重新驗證。改到 Dockerfile、啟動、打包或檔案權限時,提前驗證正式 image。
  • 正常構建重用 build cache,不預設使用 --no-cache。
  • 每個任務使用獨立 Compose project 名稱或資源標籤,記錄自己建立的資源。
  • 執行者先保存測試結果與必要 logs,再清理已無後續用途的任務專用 container、network、測試 volume 與 image;後續仍需使用的資源交接給接手者。
  • 保留共用 image、共用資料與 build cache,不執行全域 prune。Build cache 的容量與期限由主機 GC 政策管理。

測試範圍判斷

優先測試:

  • 需求指定的功能,以及使用者操作後應出現的結果
  • 業務關鍵路徑(付款、認證、資料寫入)
  • 錯誤處理與邊界條件
  • 安全邊界(權限檢查、輸入驗證)
  • 資料完整性(migration、約束、串接)

通常不需單獨測試無自訂行為的 getter/setter、純資料結構與框架產生的樣板;若影響需求、資料或執行行為,仍需驗證其結果。一次性腳本、設定檔與 migration 依影響選擇驗證方式,不以檔案種類直接排除。

依需求、使用者影響、資料正確性與失敗風險選擇測試;是否會觸發值班告警不是跳過的判準。選擇能證明該行為的層級,不要求每項都用 E2E。

測試可信度

  • 測試受影響的使用流程時,若以 mock/override 替換權限、認證、配額、模型決策等正式行為,在測試或 fixture 說明替換內容與驗證限制,並連結適當層級下實際執行相關控制/路徑的補充證據。缺少證據的那項保證標為 UNPROVEN,不以其他測試通過代替;不要求每個單元測試連接真實外部服務。
  • 例如,強制權限放行的工具測試不能證明正式權限流程可用;預先寫好的模型工具呼叫不能證明真實模型會選用哪個工具。補充驗證須涵蓋被替換且與本次需求相關的行為。
  • 修復缺陷的回歸測試須在修復前版本因目標缺陷失敗,並在修復後通過;保留版本、指令與結果。Import、fixture 或環境錯誤不算重現。無法取得基準或重現時,將「測試能攔下原缺陷」標為 UNPROVEN 並記原因,修復後結果另列,不抹除其他有效證據。
  • 結果區分 PASS、FAIL、UNPROVEN(證據不足)與 NOT_EXECUTED(未執行),記錄原因;未測與無法證明不能彙總成通過。

測試歸屬判斷

單元測試(tests/unit/)

  • 函式邏輯搭配 mock 依賴
  • 資料轉換、驗證、解析
  • 類別行為搭配假協作物件
  • 無 DB fixture、無外部服務

整合測試(tests/integration/)

Read the full file on GitHub · 119 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 22d ago Changed · +16 lines c18f9f636501
  2. 1mo ago First seen · 103 lines · 52 tokens per session scan A 7c1801ddd922

Subscribe to this mod's changes

three-tier-testing is a skill published in the GitHub repository ouob-tw/LoopAgentTeams (20 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 2,154 once invoked, about $0.0002 per session on Opus 5.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-31.