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:
- Main application entrypoint (SE:
WebServerbuilder; MP:Main.java) - Resource/Service class (SE: routing; MP:
@Pathresource) - Health check implementations
- Configuration setup
Dockerfile(multi-stage build)- 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
src/main/java/.../Main.java— Application entrypointsrc/main/java/.../adapter/inbound/rest/{ServiceName}Resource.java— HTTP endpointsrc/main/java/.../adapter/inbound/health/AppLivenessCheck.java— Liveness probesrc/main/java/.../adapter/inbound/health/AppReadinessCheck.java— Readiness probesrc/main/resources/application.yaml— Service configurationDockerfile— Multi-stage Docker build (JVM)src/test/java/.../adapter/inbound/rest/{ServiceName}ResourceTest.java— Integration test
Workflow
Step 1 — Read Project Context
knowledge/stack-patterns/helidon/index.md— Helidon patternsknowledge/layer-templates.md— Layer templatesknowledge/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/liveand/health/readyimplemented - [ ] 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 patternsknowledge/layer-templates.md— Layer templates
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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.