基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/albertoirurueta/hermes --skill setup-java-gitignore命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
End-to-end bootstrap for a brand-new Java/Maven library repository — collects the project's identity (groupId, artifactId, base package, developer name/email/organizationUrl, license) and pipeline parameters (integration branch, Java version, publishing server id, sign/extras profile ids, Maven settings file) once, then orchestrates `setup-java-library` (pom.xml + source folders), `antora-setup` (documentation site), `setup-java-gitignore` (root `.gitignore`), `setup-java-github-workflows` (CI/CD workflows), `setup-changelog` (root CHANGELOG.md), and `setup-readme` (root README.md) in that order so nothing is asked twice. Invoke as `/setup-java-library-repository`. Each parameter has the same default as the skill it feeds (`develop`, `17`, `central`, `build-extras`, `sign`, `mvnsettings.xml`) and can be overridden. Use when starting a new Java library repository from nothing and you want the full pom/docs/gitignore/CI/changelog/README scaffold in one pass, instead of running the skills separately and re-answe
Convert the current SNAPSHOT version into a final release. Must be run from the `develop` branch (gitflow) — warns and stops otherwise. Asks the user for the release version (current SNAPSHOT stripped, a patch bump, or a major bump) and the next upcoming SNAPSHOT version, creates a `release_x.y.z` branch off `develop`, updates the version in `pom.xml`, README.md, `docs/antora.yml`, and any Antora page showing dependency snippets, creates/updates `docs/modules/ROOT/pages/whats-new.adoc` and the root `CHANGELOG.md` with a summary of changes since the previous release, opens a pull request for the release branch with a `release` label attached, and uses the `pr-description` skill to fill in its description. Invoke as `/release`. Use whenever the user wants to cut a new release of this library.
Bootstrap a root `CHANGELOG.md` for a repository that doesn't have one yet, by exploring its actual release history (git tags and, if hosted on GitHub, GitHub Releases) and backfilling one entry per past release in Keep a Changelog format. Invoke as `/setup-changelog`. Skips entirely — does nothing and reports why — if `CHANGELOG.md` already exists at the repository root; this is a one-time bootstrap, not an idempotent fill-gaps tool. Use whenever a repository has release history but no changelog file yet and the user wants one backfilled from that real history instead of started blank.
| name | setup-java-gitignore |
| description | Create or update the root `.gitignore` file for a Java project — compiled classes, logs, packaged |
Create or refresh the root .gitignore for a Java project, using this repository's own .gitignore as the
concrete reference template. Never overwrite an existing .gitignore without showing the user exactly what would
change and getting explicit approval first — a .gitignore can carry hand-added, project-specific entries that
must not be silently dropped.
.gitignore already exists at the repository root.gitignore already exists and this skill will propose changes for them to review
rather than overwrite it silently. Continue to Step 2.Every Java project gets this baseline, adapted from this repository's own .gitignore (the parts of it that are
not specific to Hermes):
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
This section is unconditional — include it verbatim regardless of build tool or IDE.
Don't guess; only add a section below when the thing it targets is actually present in the target repository.
Build tool output directory:
pom.xml at the root → Maven project: add
/target/
build.gradle or build.gradle.kts at the root → Gradle project: add
/build/
.gradle/
IntelliJ IDEA (.idea/): if a .idea/ directory exists, or there's no strong signal either way (IntelliJ is
the default assumption for a Java project), use this repository's own convention: track most of .idea/ (shared
code-style and inspection settings are useful to commit) but ignore the machine-specific or noisy files:
/.idea/codeStyles/codeStyleConfig.xml
/.idea/.gitignore
/.idea/compiler.xml
/.idea/copilot.data.migration.agent.xml
/.idea/copilot.data.migration.edit.xml
/.idea/encodings.xml
/.idea/jarRepositories.xml
/.idea/misc.xml
/.idea/vcs.xml
If the user says they'd rather ignore all of .idea/ outright (some teams prefer that instead of this
repository's partial-tracking convention), use /.idea/ as a single line instead — ask via AskUserQuestion if
it's not already clear from an existing .gitignore's current handling of .idea/.
VS Code: if .vscode/ exists, add .vscode/ (Java projects on VS Code rarely benefit from committing
workspace settings the way IntelliJ's code style does).
Eclipse: if .classpath, .project, or .settings/ exist, add .classpath, .project, and .settings/.
Generated build-info properties file: grep pom.xml (or build.gradle*) for a Groovy/Maven (or equivalent
Gradle) build step that writes a build-info.properties-style file, mirroring how this repository's own
groovy-maven-plugin execution writes
src/main/resources/com/irurueta/hermes/build-info.properties — the pattern to look for is a build script step
that computes version/commit/branch metadata and writes it under . If found,
extract the actual output path from that script (don't hardcode Hermes's package) and add
the matching line, e.g.:
Concatenate Step 2's base template with whichever Step 3 sections actually matched, each under its own comment
header for readability (e.g. # Maven, # IntelliJ IDEA, # Antora docs). If Step 1 found an existing
.gitignore, merge rather than duplicate: keep any of its lines that aren't already covered by the composed
template (hand-added project-specific ignores must survive), and don't repeat a line that's already present
verbatim.
.gitignore already existed, get approval before writingSkip this step entirely if Step 1 found no existing file — proceed straight to Step 6's write.
.gitignore content as a diff against the current file (writing the draft to a
temp path and running git diff --no-index <current> <draft> gives a clean unified diff).AskUserQuestion whether to: (a) accept and write the proposed content, (b) skip and leave the existing
.gitignore untouched. There is no partial-apply option here — if the user wants only some of the proposed lines,
let them say so in free text and revise the draft before writing..gitignore and reportWrite the composed content (Step 4, incorporating any edits from Step 5's review) to .gitignore at the repository
root. Then summarize: whether the file was newly created or updated, which conditional sections from Step 3 were
included versus skipped and why (e.g. "no Eclipse section — no .classpath/.project found", "no build-info
entry — no such generated-file step in pom.xml"), and — if .gitignore already existed — whether the user
accepted or skipped the proposed changes.
src/main/resources/<package-path>/com/irurueta/hermessrc/main/resources/<detected/package/path>/build-info.properties
If no such generated-file step exists, skip this entry entirely.
Antora documentation build output: if docs/antora-playbook.yml exists (see the antora-setup skill), add:
/docs/build/
If the docs toolchain also has its own docs/package.json (Node-based Antora build), also add
/docs/node_modules/. Skip both if there's no Antora docs setup.
Don't invent additional entries beyond what's actually detected — if the project doesn't have a docs folder,
Eclipse files, or a build-info step, the composed .gitignore should simply not mention them.