AGENT SKILL

helidon-scaffold

Scaffold a Helidon SE or MP service with routing, health checks, config, Dockerfile, and integration tests.

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
1

01 前言 Front Matter

name
helidon-scaffold
model
sonnet
visibility
public
description
Scaffold a Helidon SE or MP service with routing, health checks, config, Dockerfile, and integration tests.
allowed-tools
[ "Read", "Write", "Edit", "Bash", "Skill" ]
context-budget
light
requires-capabilities
[ "web.helidon.framework" ]

03 SKILL.md 正文

Skill: Helidon Scaffold Generator

Purpose

Scaffolds a complete Helidon service module following the hexagonal architecture pattern. Supports both Helidon SE (reactive, functional) and Helidon MP (MicroProfile, CDI + JAX-RS). Produces:

  1. Main application entrypoint (SE: WebServer builder; MP: Main.java)
  2. Resource/Service class (SE: routing; MP: @Path resource)
  3. Health check implementations
  4. Configuration setup
  5. Dockerfile (multi-stage build)
  6. Integration tests

Triggers

  • /helidon-scaffold <ServiceName> — scaffold Helidon MP service (default)
  • /helidon-scaffold <ServiceName> --se — scaffold Helidon SE reactive service
  • /helidon-scaffold <ServiceName> --mp — scaffold Helidon MP service explicitly

Parameters

Parameter Required Description
ServiceName Yes PascalCase service name (e.g., PaymentService, InventoryService)
--se No Use Helidon SE (reactive, functional routing)
--mp No Use Helidon MP (MicroProfile, CDI + JAX-RS) — default
--port No HTTP port (default: 8080)

Artifacts Generated

  1. src/main/java/.../Main.java — Application entrypoint
  2. src/main/java/.../adapter/inbound/rest/{ServiceName}Resource.java — HTTP endpoint
  3. src/main/java/.../adapter/inbound/health/AppLivenessCheck.java — Liveness probe
  4. src/main/java/.../adapter/inbound/health/AppReadinessCheck.java — Readiness probe
  5. src/main/resources/application.yaml — Service configuration
  6. Dockerfile — Multi-stage Docker build (JVM)
  7. src/test/java/.../adapter/inbound/rest/{ServiceName}ResourceTest.java — Integration test

Workflow

Step 1 — Read Project Context

  • knowledge/stack-patterns/helidon/index.md — Helidon patterns
  • knowledge/layer-templates.md — Layer templates
  • knowledge/architecture-hexagonal.md — Hexagonal conventions

Step 2 — Generate Entrypoint

Helidon MP:

public class Main {
    public static void main(String[] args) {
        io.helidon.microprofile.server.Main.main(args);
    }
}

Helidon SE:

public class Main {
    public static void main(String[] args) {
        var server = WebServer.builder()
            .config(Config.global().get("server"))
            .routing(routing -> routing
                .register("/api/v1", new {ServiceName}Service())
                .get("/health/live", (req, res) -> res.send("UP"))
            )
            .build()
            .start();
        Runtime.getRuntime().addShutdownHook(new Thread(server::stop));
    }
}

Step 3 — Generate Resource (MP)

Follow knowledge/stack-patterns/helidon/index.md §1 JAX-RS pattern.

Step 4 — Generate Health Checks

Follow knowledge/stack-patterns/helidon/index.md §4 MicroProfile Health pattern.

Step 5 — Generate Dockerfile

Multi-stage build:

FROM eclipse-temurin:21-jdk-alpine AS build
WORKDIR /app
COPY . .
RUN mvn -B package -DskipTests

FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]

Step 6 — Generate Tests

Integration test using HelidonTest annotation (MP) or WebServer programmatic start (SE).

Output Checklist

  • [ ] Non-root user in Dockerfile (USER appuser)
  • [ ] Health endpoints /health/live and /health/ready implemented
  • [ ] Config externalized via application.yaml (no hardcoded values)
  • [ ] Graceful shutdown handled (SE: shutdownHook; MP: automatic)
  • [ ] Tests do not use Thread.sleep() for async waiting

Knowledge Pack References

  • knowledge/stack-patterns/helidon/index.md — Helidon patterns
  • knowledge/layer-templates.md — Layer templates

04 同仓库更多 Skills

review-bench
review-bench/edercnj_ia-dev-environment

x-parallel-eval

Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan / x-story-plan, applies the parallelism-heuristics knowledge pack (hard / regen / soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

parallelism-heuristics

Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard / regen / soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-watch-pr-ci

Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-validate-docs

Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared/auto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-system-architecture

Incrementally updates docs/architecture/system.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component/integration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-architecture

Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.

★ 0