layer-testing

layer-testing is a skill for Claude Code from bengous/claude-code-plugins. It costs 42 tokens per session (1,632 once invoked), scanned A, original, MIT.

A testing workflow for checking one architectural layer at a time, such as the business logic or infrastructure code. It uses a project playbook or asks which testing approach to follow.

In plain words
What is it for?
Use it to test a chosen module layer, apply coverage targets, and generate tests based on your architecture and testing strategy.
Why use it?
It helps focus tests on the right parts of a layered codebase and shows where coverage is missing. Separate worktrees keep testing changes isolated from the main branch.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the claude-orchestration plugin — 1 skill, 6 commands, 3 agents shipped together

Good fit Use it to test a chosen module layer, apply coverage targets, and generate tests based on your architecture and testing strategy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bengous/claude-code-plugins/layer-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 bengous/claude-code-plugins --skill layer-testing
Clone the repo
git clone --depth 1 https://github.com/bengous/claude-code-plugins

Made for: Claude Code.

Or install claude-orchestration, the plugin that ships this one along with the rest of its 1 skill, 6 commands, 3 agents.

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 layer-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/bengous/claude-code-plugins/layer-testing/github.svg)](https://agentmods.dev/skills/bengous/claude-code-plugins/layer-testing)
Your own site
<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.

agentmods 80×15 button for layer-testing

Your own site · 80×15
<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>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,632 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.00042 $0.01632
Opus 5.5 $0.00017 $0.00653
Sonnet 5.5 $0.00008 $0.00326
Haiku 4.5 $0.00004 $0.00163

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

Security

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.

orchestration/skills/layer-testing/SKILL.md · 246 lines

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.

  1. 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).

  1. 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>

  1. Hexagonal Architecture - Domain/Application first, skip infra schemas
  2. Clean Architecture - Use cases/Entities first, skip frameworks
  3. Layered - Services/Logic first, skip DTOs/configs
  4. 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.

  1. 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

  1. 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)
  1. 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.

Read the full file on GitHub · 246 lines

Files

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.

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. 10d ago Changed · -6 lines 470a18fd4d35
  2. 1mo ago Changed a0c98fa010c7
  3. 2mo ago Changed · +5 lines 86a2a441d05e
  4. 2mo ago Changed b1b5d9a8a487
  5. 3mo ago First seen · 247 lines · 42 tokens per session scan A 0a8fc0a45f0c

Subscribe to this mod's changes

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.

Related

layer-testing compared with skills from other repositories

layer-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
layer-testingbengous/claude-code-pluginsSkill6todayMITA42Claude Code
html-ppt-hermes-cyber-terminalnexu-io/open-designSkill111kyesterdayApache-2.0A53Claude Code, Codex
tao-run-inference-serviceNVIDIA/skillsSkill4.3kyesterdayApache-2.0A92Claude Code
developmentfengshao1227/ccg-workflowSkill6.0k15d agoMITA41Claude Code
debugging-executionsn8n-io/n8nSkill213ktodaynoneA86Claude Code, Codex
workflow-buildern8n-io/n8nSkill213ktodaynoneA152Claude Code, Codex
tencent-docsUnicomAI/wanwuSkill2.4k9d agoApache-2.0A209Claude Code, Codex