eliteforge-java-service-generator
SKILL.md
EliteForge Java Service Generator (Maven Archetype)
Goal
Create a new EliteForge Java service by running scripts/generate.py, and perform project build/initialization through project-internal make commands.
Preconditions
- Require
python3,make, JDK, and network access (for archetype download).
Build Command Policy (MUST follow)
- In generated project root, use project-internal
maketargets for build/init/verify tasks. - Do not run system Maven commands in generated project (for example:
mvn clean install,mvn test). - If Maven command is explicitly required in generated project, use project wrapper only:
./mvnw .... - Never replace
./mvnwwith systemmvnin command examples or execution steps.
Required Inputs (never infer)
companyNameproductNameserviceName- Validate all three with:
^[a-z0-9]+(-[a-z0-9]+)*$ - If any value is missing or invalid, ask only for missing/invalid fields.
Workflow (every run)
- Collect and validate required inputs.
- Build command and run script:
python3 scripts/generate.py --company <companyName> --product <productName> --service <serviceName> [--desc "<projectDescription>"] [--tech "<tech stack text>"] [--enable enableX --enable enableY ...]
- Map tech stack to
enableXXXwhen user provides stack text:- Use
references/mapping-rules.md. - Pass explicit user switches through
--enable. - Use
references/enable-flags.mdas canonical flag list. - If uncertain, ask instead of guessing.
- Use
- Verify result:
- Output folder exists:
app-<companyName>-<productName>-<serviceName>/ pom.xmlexists in that folder.
- Output folder exists:
- Run post-generation consistency checks in project root (
<artifactId>/):- Java package should match expected package prefix (check
src/main/javaandsrc/test/java). - Maven model name should match expected value (check
pom.xml<name>). pom.xmlartifactIdshould equal expectedartifactId.- For any mismatch, report expected vs actual and stop.
- Java package should match expected package prefix (check
- Initialize project in root directory (
<artifactId>/) by runningmake installand require success (exit code0):- Example:
cd app-<companyName>-<productName>-<serviceName> && make install
- Example:
- For build/test/verification after generation, continue using project
maketargets (for examplemake test,make build) instead of direct Maven commands; if a Maven command is unavoidable, run./mvnw ...only. - On failure, return exact error and full executed command (including the failed
makecommand).
Coordinate Rules (script behavior)
groupId = cn.<companyName(with '-' -> '.')>.<productName(with '-' -> '.')>artifactId = app-<companyName>-<productName>-<serviceName>
Expected Values For Post-check
expectedGroupId = groupIdexpectedArtifactId = artifactIdexpectedJavaPackagePrefix = <expectedGroupId>.<serviceName(with '-' -> '.')>expectedMavenModelName = expectedArtifactId(unless user explicitly requires another naming rule)
Quick Examples
- Minimal:
python3 scripts/generate.py --company cisdigital --product cap --service cache-center --desc "CAP 缓存中心"
- Post-generation init (required):
cd app-cisdigital-cap-cache-center && make install
- Tech + explicit override:
python3 scripts/generate.py --company cisdigital --product cap --service cache-center --tech "mysql redisson lombok mapstruct" --enable enableJacksonDatatypeJsr310
Weekly Installs
13
Repository
cloudsen/elitef…e-skillsFirst Seen
13 days ago
Security Audits
Installed on
gemini-cli13
github-copilot13
codex13
amp13
cline13
kimi-cli13