agent-sandbox: Skill for Claude Code

.agents/skills/test-pyramid/SKILL.md

test-pyramid is a skill for Claude Code, Codex from kubernetes-sigs/agent-sandbox. It costs 104 tokens per session (1,560 once invoked), scanned A, original, Apache-2.0.

A method for reviewing a repository's unit and end-to-end tests against the test pyramid: many fast, focused tests and fewer tests that require a real cluster. It produces a report rather than changing the tests.

In plain words
What is it for?
Use it to inventory test functions, compare unit and end-to-end coverage, find gaps or duplication, and propose a better balance.
Why use it?
It helps identify duplicated coverage and tests that could be moved from slower end-to-end runs into faster unit tests. It also highlights cases that genuinely need a real environment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is kubernetes-sigs/agent-sandbox's own configuration. It tells Claude Code and Codex how to work on agent-sandbox itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-sandbox configures →

About the project

Agent Sandbox is a Kubernetes extension for managing isolated, stateful workloads that run as single long-lived containers with stable identities and persistent storage. It is intended for AI agent runtimes, reinforcement-learning workloads, and other applications that do not fit ordinary stateless deployments. Its catalogue skills and instructions support operating these sandbox workloads.

kubernetes-sigs/agent-sandbox · 3,776 stars · on GitHub · agent-sandbox.sigs.k8s.io

Reuse

Borrowing it

Nothing to install: this file belongs to kubernetes-sigs/agent-sandbox. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kubernetes-sigs/agent-sandbox/main/.agents/skills/test-pyramid/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kubernetes-sigs/agent-sandbox

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 test-pyramid

README.md
[![agentmods](https://agentmods.dev/badge/skills/kubernetes-sigs/agent-sandbox/test-pyramid/github.svg)](https://agentmods.dev/skills/kubernetes-sigs/agent-sandbox/test-pyramid)
Your own site
<a href="https://agentmods.dev/skills/kubernetes-sigs/agent-sandbox/test-pyramid"><img src="https://agentmods.dev/badge/skills/kubernetes-sigs/agent-sandbox/test-pyramid/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 test-pyramid

Your own site · 80×15
<a href="https://agentmods.dev/skills/kubernetes-sigs/agent-sandbox/test-pyramid"><img src="https://agentmods.dev/badge/skills/kubernetes-sigs/agent-sandbox/test-pyramid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,560 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00104 $0.01560
Opus 5 $0.00052 $0.00780
Sonnet 5 $0.00021 $0.00312
Haiku 4.5 $0.00010 $0.00156

Measured 9d ago against content hash 4187604a0247, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-pyramid 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 9d 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.

.agents/skills/test-pyramid/SKILL.md · 53 lines

How it starts

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

Test Pyramid Analysis

Goal: anything that can be tested as a unit test should be a unit test; only what genuinely needs a real cluster should be E2E. The end state is a pyramid — many fast unit tests, few E2E tests. This skill produces an evidence-backed rebalancing report; it does NOT move tests itself unless the user asks afterward.

Phase 1 — Inventory

Enumerate both layers and count actual test functions (not just files), so the report can show the pyramid shape numerically:

  • Unit tests: git ls-files '*_test.go' | grep -v '^test/e2e/' plus git ls-files 'test/e2e/framework/*_test.go' and Python unit tests across all client packages (discover with git ls-files 'clients/**' | grep '/test[s]*/unit/' — covers clients/python/, clients/integrations/deepagents/, and clients/integrations/mcp-server/). Count func Test... per package (grep -c '^func Test') and def test_ for Python.
  • E2E / system tests: test/e2e/*_test.go (excluding test/e2e/framework/), plus test/e2e/extensions/ (density, python-runtime, rollout, and other cluster-physics E2E), test/e2e/clients/python/ (SDK E2E), dev/tools/test-migration.py (upgrade/rollback), and test/stress/ (load). Count func Test... (and def test_ for Python / migration tests), and for table-driven E2E, the sub-scenarios.
  • Note per-layer runtime cost if discoverable (CI job durations from dev/ci/, TestGrid tab names) — the payoff argument for each migration is time and flake surface removed from presubmit.

Phase 2 — Characterize every E2E test

Read each E2E test body (fan out parallel subagents over batches of 3-5 files for speed; each returns structured notes). For every test, record:

  1. What it arranges (objects applied, cluster preconditions).
  2. What it asserts — split assertions into:
    • Cluster-physics assertions: pod actually scheduled/running, kubelet behavior, image pulls, real networking/routing (sandbox-router paths), LoadBalancer/Gateway, RBAC enforcement, webhook admission via real API server, CRD conversion via real storage, controller<->controller timing, upgrade/rollback state survival.
    • Logic assertions: field values on objects after a reconcile, label/annotation stamping, status conditions, owner references, name hashing, defaulting, spec conversion, error classification, requeue decisions — anything a reconciler computes deterministically from inputs.
  3. The seam: which function/reconciler produces each logic assertion's value (e.g. isAdoptable, computeAndSetStatus, merge_flaky_by_test). If you cannot name the seam, you cannot claim a unit test can cover it.

Read the full file on GitHub · 53 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. 9d ago First seen · 53 lines · 104 tokens per session scan A 4187604a0247

Subscribe to this mod's changes

test-pyramid is a skill published in the GitHub repository kubernetes-sigs/agent-sandbox (3,776 stars, last pushed today), licensed Apache-2.0. It adds 104 tokens to every session and 1,560 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

06-test

Write and iterate tests until they pass, or validate a user journey end to end in the browser. Use when the user wants to add coverage, find what's untested, or walk a flow. Not for auditing test health or debugging a failure.

ai-driven-dev/framework · 52 tokens

knowledge-engineering-quality-and-delivery-unit-integration-and-shared-test-harnesses

A testing guide for the CLI and web interfaces, covering unit, integration, end-to-end, and real-process test setup with shared fixtures and cleanup.

echoVic/blade-code · 184 tokens

archestra-dev-testing

Use when deciding whether a change needs a test and at which level — unit, backend route-level integration, MSW-backed frontend integration, or e2e — or when reviewing tests for the "fluff test" anti-pattern. Start here before archestra-dev-backend-tests or archestra-dev-e2e.

archestra-ai/archestra · 68 tokens

vllm-test-generator

A test-writing guide for vLLM, an open-source system for running large language models. It helps create unit, integration, and end-to-end tests that match the project’s existing style.

shen-shanshan/vllm-dev-skills · 135 tokens

test-writing

Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.

KarmaloopAI/Jiva · 35 tokens

extension-test

Set up and run unit, integration, and E2E tests for Chrome extensions. Covers Jest mocks for chrome. APIs and Puppeteer E2E with real Chrome.

quangpl/browser-extension-skills · 37 tokens