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 agentmods add skills/bengous/claude-code-plugins/layer-testingnpx 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.svg" alt="Measured on agentmods" 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 | $0.00042 | $0.01427 |
| Opus 5 | $0.00021 | $0.00714 |
| Sonnet 5 | $0.00008 | $0.00285 |
| Haiku 4.5 | $0.00004 | $0.00143 |
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 yesterday.
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 — 247 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: 100% (optional)
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: Ask user to choose:
<strategy_options>
- Hexagonal Architecture - Domain/Application 100%, skip infra schemas
- Clean Architecture - Use cases/Entities 100%, skip frameworks
- Layered - Services/Logic 100%, 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/
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:
find src/modules/${MODULE}/${LAYER} -name "*.test.*" -o -path "*/__tests__/*"
If NO tests: Skip to step 4
If tests exist:
Detect framework and run coverage (run these checks in parallel):
if [[ -f "vitest.config.ts" ]] || grep -q "vitest" package.json; then
pnpm test src/modules/${MODULE}/${LAYER} --coverage --reporter=json-summary
elif [[ -f "jest.config.js" ]] || grep -q "jest" package.json; then
pnpm test -- src/modules/${MODULE}/${LAYER} --coverage --coverageReporters=json-summary
fi
Parse coverage/coverage-summary.json:
TOTAL_COV=$(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:
find src/modules/${MODULE}/${LAYER} -name "*.ts" ! -name "*.test.*" ! -path "*/__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.
- Create Worktree
BRANCH="test/${MODULE}-${LAYER}-coverage"
git worktree add ../worktree-${BRANCH} -b ${BRANCH}
- Spawn Testing Agent
Agent({
subagent_type: 'general-purpose',
description: 'Test ${MODULE}/${LAYER}',
prompt: `
Test the ${LAYER} layer of ${MODULE} module.
Strategy: Read ${PLAYBOOK_PATH}
Files: ${SELECTED_FILES}
Target: ${COVERAGE_TARGET}%
Working directory: ${WORKTREE_PATH}
Follow strategy principles.
Write comprehensive tests.
Never modify production code.
Create single commit when done.
Report:
- Coverage achieved
- Tests created
- Any issues
`
})
What ships with it
8 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
- references/workflow-phases.md 15 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.
- yesterday 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 (4 stars, last pushed 3d ago), licensed MIT. It adds 42 tokens to every session and 1,427 once invoked, about $0.0002 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.
Other skills, from other repositories
html-ppt-hermes-cyber-terminal
OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.
development
开发语言能力索引。Python、Go、Rust、TypeScript、Java、C++、Shell。当用户提到编程、开发、代码、语言时路由到此。.
post-build-flow
Handles workflow verification and setup after build-workflow succeeds, or when the message contains workflow-verification-follow-up or workflow-setup-required. Load after direct builds, when verificationReadiness requires action, or on orchestrator verify/setup follow-up turns.
n8n:human-like-code-review
Reviews a GitHub pull request like a thoughtful human reviewer and writes the feedback to a markdown file. Prioritizes context, architecture fit, solution complexity, bugs, security edge cases, and missing tests. Use when given a PR URL to review, or when the user says /human-like-code-review.
n8n:create-pr
Creates GitHub pull requests with properly formatted titles that pass the check-pr-title CI validation. Use when creating PRs, submitting changes for review, or when the user says /pr or asks to create a pull request.
n8n:reproduce-bug
Reproduce a bug from a Linear ticket with a failing test. Expects the full ticket context (title, description, comments) to be provided as input.