loom-test-strategy

loom-test-strategy is a skill for Claude Code, Codex from cosmix/loom. It costs 29 tokens per session (2,812 once invoked), scanned A, original, MIT.

A guide for deciding how much to test, where tests should run, and what to test first. It explains the test pyramid, coverage, risk-based priorities, and flaky tests, which fail unpredictably.

In plain words
What is it for?
Use it to design a test strategy, set coverage goals, prioritize risky behavior, categorize tests, and investigate flaky test failures.
Why use it?
It helps balance fast, focused tests against slower full-system checks and prevents test suites that are costly, unreliable, or hard to diagnose.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/cosmix/loom/loom-test-strategy
Any agent
npx skills add cosmix/loom --skill loom-test-strategy
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

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 loom-test-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-test-strategy.svg)](https://agentmods.dev/skills/cosmix/loom/loom-test-strategy)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-test-strategy"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-test-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,812 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00029 $0.02812
Opus 5 $0.00015 $0.01406
Sonnet 5 $0.00006 $0.00562
Haiku 4.5 $0.00003 $0.00281

Measured 2d ago against content hash 265ff04391c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

loom-test-strategy 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 2d 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/loom-test-strategy/SKILL.md · 233 lines

How it starts

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

Test Strategy

Overview

How much to test, at what altitude, and in what order — balancing signal against cost. This file owns the pyramid, coverage goals, risk prioritization, and flaky-test diagnosis. For writing tests and test-double choice see loom-testing; for browser E2E see loom-e2e-testing.

The Pyramid and the Altitude Tradeoff

Push tests down to the cheapest altitude that still exercises the risk. Each layer up costs more to write, run, and debug, and fails for more unrelated reasons.

Layer Typical emphasis Scope Speed Signal on failure
Unit most behavior that can run without I/O one function/branch, no I/O ms precise — points at the defect
Integration boundaries and contracts real boundary (DB, HTTP, queue) 10ms-1s wiring/contract broke
E2E a small set of critical journeys full user journey in a browser seconds something broke, somewhere

Ice-cream cone anti-pattern: inverted pyramid — many slow E2E tests, few unit tests. Symptoms: hours-long CI, chronic flakiness, "just re-run it" culture, hours to localize a failure. Cause: E2E is easy to start (record-and-play) but the suite becomes unmaintainable. Fix: for every E2E failure, ask "what unit/integration test should have caught this?" and push it down.

Testing Trophy (Kent C. Dodds) is a legitimate variant for UI/front-end-heavy apps: fewer isolated units, a fat integration middle (component + real collaborators via Testing Library), thin E2E. Choose by where your risk and refactor-churn live — do not cargo-cult 70/20/10.

Coverage — a floor, never a target

Coverage measures what is untested; it says nothing about assertion quality. Mandating 100% breeds assertion-free tests that run lines to hit the number.

Component Line Branch Note
Business logic / domain 90%+ 85%+ the point of the suite
API handlers 80%+ 75%+ every endpoint + error shape
Utilities / pure fns 95%+ 90%+ cheap and high-value
UI components 70%+ 60%+ behavior over markup
Infrastructure 60%+ 50%+ prefer integration/smoke

Read the full file on GitHub · 233 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. 2d ago First seen · 233 lines · 29 tokens per session scan A 265ff04391c5

Subscribe to this mod's changes

loom-test-strategy is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 2,812 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

continuous-testing

Continuous test-driven development loop — after every code change, builds the project, starts the server, and runs Unit Tests, Integration Tests, and System Tests. Applies on top of microprofile-server skill. Use during development when you want full verification after each change. Triggers on "continuous testing"…

AdamBien/airails · 84 tokens

testing-setup

Analyze and create a testing strategy for native Android apps - install testing libraries, set up test infrastructure, create harnesses for unit tests, UI tests, screenshot tests, and end-to-end tests.

android/skills · 43 tokens

moai-ref-testing-pyramid

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.

modu-ai/moai-adk · 61 tokens

testing-strategies

Comprehensive testing strategy covering unit, integration, e2e, property-based, and mutation testing with practical patterns.

cosmicstack-labs/mercury-agent-skills · 27 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

frontend-testing

Comprehensive frontend testing strategy covering unit, integration, E2E, visual regression, and accessibility testing.

cosmicstack-labs/mercury-agent-skills · 23 tokens