java-conventions
Java coding conventions — naming, records, Optional, streams, logging, and dependency injection
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Java coding conventions — naming, records, Optional, streams, logging, and dependency injection
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Health check procedures D1–D14 for the Audit agent — structural validation, attention budget, version checks, workspace integrity, and static audit
Configure and manage Model Context Protocol servers for external tool access
Review a UI for accessibility — WCAG 2.1 AA compliance, semantic HTML, ARIA usage, keyboard navigation, focus management, colour contrast, and screen reader compatibility
Design or review a REST or GraphQL API — resource modeling, versioning strategy, error contract, OpenAPI/schema-first workflow, and security baseline
Generate a CHANGELOG.md entry from staged changes, a commit range, or a PR diff — following Keep a Changelog format with conventional commit classification
Set up and audit environment variable management — create .env.example, add startup validation, separate secrets from config, and document every variable
| name | java-conventions |
| description | Java coding conventions — naming, records, Optional, streams, logging, and dependency injection |
| compatibility | >=1.4 |
Skill metadata: version "1.0"; license MIT; tags [java, conventions, records, streams, spring-boot]; recommended tools [codebase, editFiles].
Applies to: **/*.java
PascalCase for classes and interfaces, camelCase for methods and variables, SCREAMING_SNAKE_CASE for constants.record types for immutable value objects instead of mutable POJOs with getters/setters.Optional<T> as a return type for methods that may not produce a result. Never use Optional as a field or parameter type.var for local variables when the type is obvious from the right-hand side.Stream API for collection transformations — avoid manual loops for filter/map/reduce operations.try-with-resources for all AutoCloseable objects (I/O, database connections, HTTP clients).log.info("User {} logged in", userId). Never concatenate log messages.final on classes, methods, and parameters where mutability is not needed.