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.
npx skills add bengous/claude-code-plugins --skill layer-testinggit clone --depth 1 https://github.com/bengous/claude-code-pluginsWrote 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.
[](https://agentmods.dev/skills/bengous/claude-code-plugins/layer-testing)<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/layer-testing"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/layer-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.
<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/layer-testing"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/layer-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.01632 |
| Opus 5.5 | $0.00017 | $0.00653 |
| Sonnet 5.5 | $0.00008 | $0.00326 |
| Haiku 4.5 | $0.00004 | $0.00163 |
Grade A, and why
layer-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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Layer Testing Skill
Orchestrate comprehensive layer testing with coverage analysis and isolated worktrees.
Isolated worktrees keep testing work separate from your working branch, preventing accidental commits to main development branches and enabling parallel testing of multiple layers.
- Get Parameters
From command invocation:
Testing Request:
- Module: auth
- Layer: infrastructure
- Playbook: docs/playbook.md (optional)
- Coverage Target: 85% (optional; otherwise the strategy's target for the layer)
From natural invocation: Ask user for module, layer, playbook path (optional), coverage target (optional).
- Get Testing Strategy
If playbook provided:
Read(${PLAYBOOK_PATH})
If no playbook but .claude/testing-strategy.md exists (written by /setup-testing-strategy): use it as the playbook.
Otherwise: Ask user to choose:
<strategy_options>
- Hexagonal Architecture - Domain/Application first, skip infra schemas
- Clean Architecture - Use cases/Entities first, skip frameworks
- Layered - Services/Logic first, skip DTOs/configs
- Custom - I'll answer questions about what to test </strategy_options>
If user picks 1-3: Use template from skills/layer-testing/templates/. Full coverage of the core layers is the ideal; the template sets each layer's target, and the request's coverage target, when given, overrides it.
If user picks 4: Ask:
- Coverage target? (100%/80%/70%)
- What to test? (business logic only / all code)
- What to skip? (types, schemas, mocks, configs)
- Build strategy from answers
Store strategy for agent use.
- Run Coverage First
Check for existing tests: Glob src/modules/${MODULE}/${LAYER}/**/*.test.* and src/modules/${MODULE}/${LAYER}/**/__tests__/**.
If NO tests: Skip to step 4
If tests exist:
Detect the framework: a vitest.config.ts, or vitest in package.json, is Vitest; a jest.config.js, or jest in package.json, is Jest. Run coverage with the matching command:
pnpm test src/modules/${MODULE}/${LAYER} --coverage --reporter=json-summary
pnpm test -- src/modules/${MODULE}/${LAYER} --coverage --coverageReporters=json-summary
The first is Vitest's, the second Jest's.
Parse coverage/coverage-summary.json:
jq '.total.lines.pct' coverage/coverage-summary.json
If 100% coverage:
✅ Already at 100% coverage!
Options:
1. Exit (nothing to do)
2. Verify test quality
3. Enhance tests
Choose (1-3):
If user picks 1, exit successfully.
If < 100%: Continue to Step 4
- Analyze Files
Find all files: Glob src/modules/${MODULE}/${LAYER}/**/*.ts, leaving out *.test.* and anything under __tests__/.
Categorize using strategy:
- Testable (matches "what to test" patterns)
- Skip (matches "what to skip" patterns)
Cross-reference with coverage (if available):
- Fully covered (100%)
- Partially covered (<100%, extract uncovered lines)
- Not tested (0% or not in coverage)
- Present Analysis & Ask User
Show results:
📊 ${MODULE}/${LAYER}
Coverage: ${TOTAL_COV}% (target: ${TARGET}%)
Gap: ${GAP}%
✅ Fully Covered:
- File1.ts (100%)
⚠️ Partially Covered:
- File2.ts (45%, lines 10-20, 30-40 uncovered)
❌ Not Tested:
- File3.ts (0%)
⊘ Skip:
- schema.ts (per strategy)
Which files to test?
1. All gaps
2. Untested only
3. Partial only
4. Custom selection
Wait for user response.
What ships with it
7 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.
- references/quality-gates.md 8.4 KB
- references/result-type-patterns.md 14 KB
- templates/examples/clean-strategy.md 7.3 KB
- templates/examples/hexagonal-strategy.md 18 KB
- templates/examples/layered-strategy.md 11 KB
- templates/playbook-binary-coverage.md 9.7 KB
- templates/testing-strategy-template.md 6.0 KB
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.
- 10d ago Changed · -6 lines 470a18fd4d35
- 1mo ago Changed a0c98fa010c7
- 2mo ago Changed · +5 lines 86a2a441d05e
- 2mo ago Changed b1b5d9a8a487
- 3mo ago First seen · 247 lines · 42 tokens per session scan A 0a8fc0a45f0c
layer-testing is a skill published in the GitHub repository bengous/claude-code-plugins (6 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 1,632 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-09-03.
layer-testing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| layer-testingbengous/claude-code-plugins | Skill | 6 | today | MIT | A | 42 | Claude Code |
| html-ppt-hermes-cyber-terminalnexu-io/open-design | Skill | 111k | yesterday | Apache-2.0 | A | 53 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.3k | yesterday | Apache-2.0 | A | 92 | Claude Code |
| developmentfengshao1227/ccg-workflow | Skill | 6.0k | 15d ago | MIT | A | 41 | Claude Code |
| debugging-executionsn8n-io/n8n | Skill | 213k | today | none | A | 86 | Claude Code, Codex |
| workflow-buildern8n-io/n8n | Skill | 213k | today | none | A | 152 | Claude Code, Codex |
| tencent-docsUnicomAI/wanwu | Skill | 2.4k | 9d ago | Apache-2.0 | A | 209 | Claude Code, Codex |