ai-context-engineering-for-qa: Skill for Claude Code

.claude/skills/api-tests-java/SKILL.md

api-tests-java is a skill for Claude Code from vlad-ryzhkov/ai-context-engineering-for-qa. It costs 61 tokens per session (2,950 once invoked), scanned A, original, Unlicense.

A Java 17 or newer tool that creates automated tests for web APIs from their specifications. Web APIs are interfaces that applications use to exchange requests and data.

In plain words
What is it for?
Use it to generate JUnit 5 tests with AssertJ checks, Jackson data conversion, and Awaitility-based waiting for asynchronous operations.
Why use it?
It removes the need to write API test code from scratch while enforcing the stated Java libraries and testing conventions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is vlad-ryzhkov/ai-context-engineering-for-qa's own configuration. It tells Claude Code how to work on ai-context-engineering-for-qa 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 ai-context-engineering-for-qa configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/vlad-ryzhkov/ai-context-engineering-for-qa/main/.claude/skills/api-tests-java/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vlad-ryzhkov/ai-context-engineering-for-qa

Made for: Claude Code.

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 api-tests-java

README.md
[![agentmods](https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java/github.svg)](https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-tests-java)
Your own site
<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.

agentmods 80×15 button for api-tests-java

Your own site · 80×15
<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>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,950 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.00061 $0.02950
Opus 5.5 $0.00024 $0.01180
Sonnet 5.5 $0.00012 $0.00590
Haiku 4.5 $0.00006 $0.00295

Measured 2mo ago against content hash 848d69d30296, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

.claude/skills/api-tests-java/SKILL.md · 153 lines

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.

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.md with 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 (review arg)

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

  1. Stack: Locked in CLAUDE.md → Tech Stack (Java opt-in). Java-specific additions: Awaitility (base, not -kotlin), Jackson ObjectMapper as static final.
  2. BANNED: Thread.sleep, new HttpClient() per test method, Map<String, Object> instead of DTOs, .get() on CompletableFuture without 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/@AfterEach for 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 returning HttpResponse<String> and let the test deserialize as needed. 2d. Fail Fast in Test Clients: FORBIDDEN: wrapping API client HTTP calls or JSON deserialization in try/catch blocks 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: Use objectMapper.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: Using Thread.sleep to 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 @BeforeEach and 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"); If ConnectException appears and no live server is available → run /api-mocks to generate an in-process mock, then re-run. 2k. Eventual Consistency Writes: If repo-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: If repo-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)
  3. Security Headers Rule: Verify Content-Type, X-Content-Type-Options, Strict-Transport-Security on every positive 2xx to detect missing security headers early — use AssertJ on response.headers().map(). (ref: api/missing-security-headers.md)
  4. 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/: @Step annotated 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 @BeforeEach so the test does not make real HTTP calls to external domains.
  5. Gates: ./gradlew compileTestJava.

Read the full file on GitHub · 153 lines

Files

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.

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. 2mo ago Changed · +127 lines · +33 tokens per session 848d69d30296
  2. 3mo ago First seen · 26 lines · 28 tokens per session scan A e7e5376695ff

Subscribe to this mod's changes

api-tests-java is a skill published in the GitHub repository vlad-ryzhkov/ai-context-engineering-for-qa (6 stars, last pushed 2mo 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.

Related

api-tests-java compared with skills from other repositories

api-tests-java next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-tests-javavlad-ryzhkov/ai-context-engineering-for-qaSkill62mo agoUnlicenseA61Claude Code
detecting-broken-object-property-level-authorizationxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A36Claude Code, Codex
api-designopen-gsd/gsd-piSkill1.4ktodayMITA91Claude Code, Codex
create-mcp-serveropen-gsd/gsd-piSkill1.4ktodayMITA90Claude Code, Codex
api-documentationLambdaTest/agent-skillsSkill402yesterdayMITA147Claude Code, Codex
openapi-spec-generatorLambdaTest/agent-skillsSkill402yesterdayMITA165Claude Code, Codex
api-sdk-generatorLambdaTest/agent-skillsSkill402yesterdayMITA147Claude Code, Codex