Borrowing it
Nothing to install: this file belongs to vlad-ryzhkov/ai-context-engineering-for-qa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vlad-ryzhkov/ai-context-engineering-for-qa/main/.claude/skills/api-tests-java/SKILL.mdgit clone --depth 1 https://github.com/vlad-ryzhkov/ai-context-engineering-for-qaWrote 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/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java)<a href="https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java/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/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java.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.00061 | $0.02950 |
| Opus 5.5 | $0.00024 | $0.01180 |
| Sonnet 5.5 | $0.00012 | $0.00590 |
| Haiku 4.5 | $0.00006 | $0.00295 |
Grade A, and why
api-tests-java 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 1mo 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 — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Recommended Flow
For best results: /spec-audit → /api-isolated-tests → /api-tests-java. Running directly on a specification also works — the skill will generate tests without a scenario matrix, but traceability @Link annotations will reference the spec instead of scenario IDs.
🔒 SYSTEM REQUIREMENTS
Before execution the agent MUST load: .claude/protocols/gardener.md
SDET: API Automation (Java 17+)
When to Use
- There is
audit/test-scenarios.mdwith a scenario matrix — cover them with Java 17+ automated tests - Need to write tests for a new endpoint from scratch in Java
- Review existing Java tests for standards compliance (
reviewarg)
Input Context (Process Isolation)
context: fork — you cannot see chat history before your invocation.
Allowed inputs: audit/test-scenarios.md, specification, CLAUDE.md, build.gradle.kts (or pom.xml), existing src/ (style reference only).
Forbidden: Assumptions from "previous agent context", inventing endpoint contracts.
Protocol
- Stack: Locked in CLAUDE.md → Tech Stack (Java opt-in). Java-specific additions: Awaitility (base, not
-kotlin), Jackson ObjectMapper asstatic final. - BANNED:
Thread.sleep,new HttpClient()per test method,Map<String, Object>instead of DTOs,.get()onCompletableFuturewithout timeout,RestAssured,OkHttp,Retrofit,assertThat(x).isEqualTo(y)without.as("description"), manual@AllureId,LocalDateTime.now()in strict assertions. Zero-comment policy://and/* */in generated code are FORBIDDEN. 2a. Async Calls:CompletableFuture.get(10, TimeUnit.SECONDS)— timeout mandatory on every.get()call. FORBIDDEN:.get()without timeout (blocks indefinitely on hung server). 2b. Test Lifecycle:@BeforeEach/@AfterEachfor setup/teardown. FORBIDDEN: shared mutable static state between tests. 2c. DRY API Clients: FORBIDDEN: duplicating client method bodies to return different response types. Generate a single method returningHttpResponse<String>and let the test deserialize as needed. 2d. Fail Fast in Test Clients: FORBIDDEN: wrapping API client HTTP calls or JSON deserialization intry/catchblocks that swallow exceptions and return empty stub objects. Exceptions MUST propagate so the test runner reports the infrastructure failure at the point of failure, not on a later assertion. (ref:api/silent-catch.md) 2e. Response Body Extraction Rule: UseobjectMapper.readValue(response.body(), TargetDto.class)for typed deserialization. FORBIDDEN: manual string parsing,response.body().toString()(that's the string itself — no metadata issue in Java, but it creates untyped coupling). 2f. Single Serialization Framework Rule: Use exactly one JSON framework — Jackson. All DTOs use@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)+@JsonIgnoreProperties(ignoreUnknown = true). FORBIDDEN: mixing Jackson with other serialization libraries. 2g. Time-Dependent Scenarios (TTL/Cache): FORBIDDEN: UsingThread.sleepto simulate time passing. For short async state changes, use Awaitility. For long temporal conditions (e.g., 5-minute cache expiration), if the specification does NOT provide a testability hook, MUST annotate with@Disabled("Time-dependent scenario: {Wait Time}. Requires testability hook (time-travel/cache-clear) or manual execution."). 2h. Timestamp Response Validation: Validate time-based fields with relative drift check:assertThat(Math.abs(actual - expected)).as("timestamp drift").isLessThan(driftToleranceSec). FORBIDDEN:LocalDateTime.now()in strict equality assertions. 2i. WireMock Integration for External Services: When a test configures WireMock stubs, the test MUST connect the mock to the application under test via system property in@BeforeEachand clear it in@AfterEach. Disconnected WireMock (started but not referenced by the app) is a SILENT TEST BUG. 2j. Configurable BASE_URL: Define as static final so CI/CD can override the target server without recompilation:private static final String BASE_URL = System.getProperty("BASE_URL", "http://localhost:8080");IfConnectExceptionappears and no live server is available → run/api-mocksto generate an in-process mock, then re-run. 2k. Eventual Consistency Writes: Ifrepo-scout-report§12 marks a write→read pair as "Eventual", FORBIDDEN to assert the read immediately after write. Use Awaitility polling with bounded timeout. (ref:api/eventual-consistency-writes.md) 2l. Batch Partial Failure: Ifrepo-scout-report§12 lists batch operations, include a mixed valid+invalid input case to verify error propagation strategy (atomic rollback vs partial 207 Multi-Status). Testing only all-valid and all-invalid is INSUFFICIENT. (ref:api/batch-partial-failure.md) - Security Headers Rule: Verify
Content-Type,X-Content-Type-Options,Strict-Transport-Securityon every positive 2xx to detect missing security headers early — use AssertJ onresponse.headers().map(). (ref:api/missing-security-headers.md) - Structure:
requests/: DTOs + Request/Response objects. ALL DTOs mapped to snake_case JSON — apply@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)on all DTOs — omitting it on response DTOs causes silent null fields. Also add@JsonIgnoreProperties(ignoreUnknown = true).helpers/:@Stepannotated flows (Allure — same as Kotlin).tests/:@Epic(from feature/package name),@Feature(from endpoint name),@Severity,@DisplayName.@AllureId— NOT generated. MANDATORY TAGS:@Tag("CRITICAL")+@Severity(SeverityLevel.CRITICAL)for Money flows, Security/Auth, or Data integrity endpoints;@Tag("REGRESSION")for all others.- External Integrations: If the endpoint under test calls 3rd-party services, configure a WireMock stub in
@BeforeEachso the test does not make real HTTP calls to external domains.
- Gates:
./gradlew compileTestJava.
What ships with it
1 file 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.
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.
- 1mo ago Changed · +127 lines · +33 tokens per session 848d69d30296
- 1mo ago First seen · 26 lines · 28 tokens per session scan A e7e5376695ff
api-tests-java is a skill published in the GitHub repository vlad-ryzhkov/ai-context-engineering-for-qa (6 stars, last pushed 1mo ago), licensed Unlicense. It adds 61 tokens to every session and 2,950 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-08-31.
Other skills, from other repositories
API Test Suite Generator
Automatically generate comprehensive API test suites from OpenAPI specifications covering CRUD operations, error handling, authentication, pagination, and edge cases.
api-mock-helper
Produces mock server definitions, sandbox environment specs, API stub configurations, and fixture data for any API. Use whenever the user asks about mocking an API, creating a sandbox, "fake server", WireMock stubs, Prism mocks, MSW (Mock Service Worker), "test fixtures", "stub the API", "mock this endpoint"…
postman-test-script-generator
Write Postman test scripts (JavaScript) for pre-request logic and post-response assertions, and embed them directly into a Postman collection. Use this skill whenever the user wants to add tests to Postman requests, asks about "pm.test", "pm.expect", "Postman assertions", "test scripts", "chaining requests", "dynamic…
spring-mcp-contracts
Develops and verifies JSON contracts of the Spring plugin's MCP tools using Java/Kotlin PSI, UAST, scoped Spring models and bounded response regression tests. Use when changing an endpoint lookup or contract tool, URL matching, the call-chain trace, a bean lookup or listing tool, a parameter source or requiredness, a…
bruno
Create version-controlled Bruno API collections, write Bru request files, and run API checks through the Bruno CLI in CI.
flowforge-testing
Generate, modify, validate, execute and triage Flow Forge API test cases. Use when the user wants to turn requirement documents, API documents, table structures or business rules into executable YAML/Excel test cases, revise existing cases after requirement/API changes, run cases with the Flow Forge executor and…