agentleFS
hi-donwihi-donwi/Donwi-Skills/skills/quarkus-service/SKILL.md

quarkus-service

Skill0 starsChanged 13 days agoMITView on GitHub

Build or change Quarkus services and endpoints: Maven module structure, resource/service/repository layering, CDI and scopes, typed configuration, and REST clients.

The file

Files
SKILL.md

Quarkus Service

Overview

The parent skill for day-to-day backend work. The binding rules live in .agents/standards/java/project-layout.md and 00-decisions.md; this is the workflow.

When to use

  • Adding an endpoint to an existing module
  • Creating a new Quarkus module
  • Cleaning up code that mixes layers
  • Moving scattered configuration to typed config
  • Calling another service

Hand off when

NeedSkill
URL shape, status codes, error formatrest-api-contract
Entities, queries, migrations, transactionsquarkus-persistence
Roles, sessions, security validationquarkus-security
Writing testsquarkus-testing
Logs, metrics, tracesquarkus-observability
Large exports/reportsbulk-reporting-export
Domain business rulesthe organisation's domain skill in context/skills/

Process

The order is deliberate: contract first, tests second, implementation last.

1 — Settle the contract. Path, method, request, response, errors, roles. If any of that is unclear, do not start coding. Use .agents/templates/endpoint-spec.md.

2 — Write failing tests. An integration test for the HTTP shape, unit tests for the business rules. They must fail because the endpoint does not exist yet — not because of a typo.

3 — DTOs. records in dto/, bean validation on the fields.

4 — Repository, if a new query is needed. A specific method, not listAll() filtered in Java afterwards.

5 — Service. Business rules, the @Transactional boundary, domain exceptions.

6 — Resource. Thin: bind, delegate, return. Add the role and OpenAPI annotations.

7 — Verify. ./mvnw verify, regenerate the OpenAPI spec, check the logs leak nothing.

Verification

  • Resource has no queries or business rules
  • Response is a record, not an entity
  • Config is @ConfigMapping, not ConfigProvider.getConfig()
  • REST clients live in a *Client type
  • Tests cover the service rule and the HTTP contract separately

Red flags

  • @Transactional on a resource — wraps JSON serialisation, holds the DB connection.
  • Entities as responses — leaks internal columns, couples HTTP to the schema.
  • Optional as an entity field — not serialisable, not its purpose.
  • Blocking calls on a reactive endpoint — blocks the event loop; the whole instance stops serving. When in doubt, use imperative style (not Uni/Multi).
  • @ApplicationScoped with mutable fields — a race condition under load.
  • Guessing Quarkus APIs — the version moves fast. Verify against quarkus.io/guides for 3.33 instead of relying on recall.

References

  • references/shape-and-cdi.md - the correct class shape, CDI scopes, @ConfigMapping
  • references/clients-and-threads.md - REST clients between services, virtual threads, lifting demo code

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.