swe-programming-java
Java, Spring Framework, and Spring Boot coding standards from authoritative docs/explanation/ documentation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Java, Spring Framework, and Spring Boot coding standards from authoritative docs/explanation/ documentation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
AI agent development standards including frontmatter structure, naming conventions, tool access patterns, model selection, and reference documentation structure
Comprehensive project planning standards for plans/ directory including folder structure (ideas/, backlog/, in-progress/, done/), stage-aware naming convention (done uses YYYY-MM-DD__identifier/; backlog and in-progress use identifier/ with no date prefix), five-document file organization (README.md, brd.md, prd.md, tech-docs.md, delivery.md for multi-file default; single README.md for trivially-small single-file exception), BRD/PRD content-placement rules, Gherkin acceptance criteria, and the mandatory structured multiple-choice grilling gates (pre-write and post-write) for resolving design decisions with the user. Essential for creating structured, executable project plans.
Trunk Based Development workflow - all development on main branch with small frequent commits, minimal branching, and continuous integration. Covers when branches are justified (exceptional cases only), commit patterns, feature flag usage for incomplete work, environment branch rules (deployment only), and AI agent default behavior (the repo-wide default delivery mode is `worktree-to-pr` -- a short-lived plan branch in a disposable worktree pushed to a draft PR; direct push to main remains available as an explicit selection). Essential for understanding repository git workflow and keeping branches short-lived
Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, description, tags, status, agents, parameters), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.
Common software development workflow patterns shared across all language developer agents
Three-stage content quality workflow pattern (Maker creates, Checker validates, Fixer remediates) with detailed execution workflows. Use when working with content quality workflows, validation processes, audit reports, or implementing maker/checker/fixer agent roles.
| name | swe-programming-java |
| description | Java, Spring Framework, and Spring Boot coding standards from authoritative docs/explanation/ documentation |
Progressive disclosure of Java stack coding standards for agents writing Java code.
Coverage: Java language → Spring Framework → Spring Boot (full technology stack)
Usage: Auto-loaded for agents when writing any Java/Spring code. Provides quick reference to idioms, best practices, and antipatterns across the full stack.
Authoritative Source: docs/explanation/software-engineering/programming-languages/java/README.md
Classes and Interfaces: PascalCase
UserAccount, PaymentProcessorComparable, Serializable (adjective form preferred)AbstractProcessor, BaseEntityMethods and Variables: camelCase
calculateTotal(), findUserById()userName, totalAmountUPPER_SNAKE_CASE (MAX_RETRIES, DEFAULT_TIMEOUT)Packages: lowercase with dots
com.demo.domain.accountcom.demo.infrastructure.persistenceRecords: Use for immutable data carriers
public record UserAccount(String id, String name, LocalDateTime createdAt) {}
Sealed Classes: Use for closed type hierarchies
public sealed interface Payment permits CreditCard, BankTransfer {}
Pattern Matching: Use for type-safe casts
if (obj instanceof String s) {
return s.toUpperCase();
}
Text Blocks: Use for multi-line strings
String json = """
{
"name": "value"
}
""";
Checked Exceptions: For recoverable errors
@throws javadocUnchecked Exceptions: For programming errors
RuntimeExceptionTry-with-resources: Always use for AutoCloseable
try (var reader = Files.newBufferedReader(path)) {
// Use reader
}
JUnit 5: Primary testing framework
@Test for test methods@BeforeEach, @AfterEach for setup/teardown@ParameterizedTest for data-driven testsAssertJ: Fluent assertions
assertThat(result)
.isNotNull()
.hasSize(3)
.containsExactly("a", "b", "c");
Mockito: Mocking framework
@Mock
private UserRepository repository;
Input Validation: Always validate external input
@NotNull, @Size)Sensitive Data: Never log secrets
SensitiveDataFilter for loggingSQL Injection: Use prepared statements
var stmt = connection.prepareStatement("SELECT * FROM users WHERE id = ?");
stmt.setString(1, userId);
Authoritative Source: docs/explanation/software-engineering/platform-web/tools/jvm-spring/README.md
Foundation: Builds on Java language standards above.
ApplicationContext for production code@Configuration, @Bean)@PostConstruct and @PreDestroy for lifecycle callbacks@Aspect for cross-cutting concerns@Transactional)JdbcTemplate for SQL operations@Transactional for declarative transactions@RestController for REST APIs@RequestMapping for endpoint routing@Valid for request validation@ControllerAdvice for global exception handlingCore Patterns:
Configuration & Architecture:
Data & Web:
Quality & Operations:
Domain & Design:
Authoritative Source: docs/explanation/software-engineering/platform-web/tools/jvm-spring-boot/README.md
Foundation: Builds on Spring Framework standards above.
application.yml properties@ConfigurationProperties for type-safe configuration@RestController for REST endpoints@Valid for request validation@ControllerAdvice@Query@Transactional at service layer@DataJpaTest for repository testing@PreAuthorize@AuthenticationPrincipal for user context@SpringBootTest for integration tests@WebMvcTest, @DataJpaTest, @JsonTest@MockBeanCore Patterns:
Configuration & Architecture:
Data & Web:
Quality & Operations:
Domain & Design: