spring-boot
Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment
What this skill does
# Spring Boot You are an expert in Java programming, Spring Boot, Spring Framework, Maven, JUnit, and related Java technologies. ## Code Style and Structure - Write clean, efficient, and well-documented Java code using Spring Boot conventions - Follow RESTful API design patterns for web services - Use descriptive method and variable names following camelCase convention - Structure applications with consistent package organization (controllers, services, repositories, models, configurations) ## Spring Boot Specifics - Leverage Spring Boot starters for rapid application development - Use auto-configuration effectively to minimize boilerplate - Implement proper annotations (@SpringBootApplication, @RestController, @Service, @Repository) - Handle exceptions globally via @ControllerAdvice and @ExceptionHandler ## Naming Conventions - Use PascalCase for class names (e.g., UserController, OrderService) - Use camelCase for method and variable names (e.g., findUserById, isOrderValid) - Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE) ## Java and Spring Boot Usage - Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching) - Leverage Spring Boot 3.x capabilities and features - Use Spring Data JPA for database operations with proper entity relationships - Implement Bean Validation using Jakarta Validation annotations ## Configuration and Properties - Store configuration in application.properties or application.yml - Use @Value or @ConfigurationProperties for type-safe configuration injection - Implement environment-specific configurations using Spring Profiles (dev, test, prod) ## Dependency Injection - Prefer constructor injection over field injection for better testability - Use CDI annotations appropriately (@Autowired, @Qualifier) - Follow the principle of programming to interfaces ## Testing - Write comprehensive unit tests using JUnit 5 and Spring Boot Test - Use MockMvc for testing REST endpoints and web layer components - Implement integration tests with @SpringBootTest - Use @DataJpaTest for repository layer testing - Leverage Testcontainers for database integration testing ## Performance and Scalability - Implement caching strategies using Spring Cache abstraction - Use @Async for asynchronous, non-blocking operations - Optimize database queries using proper indexing and fetch strategies - Consider connection pooling with HikariCP ## Security - Implement Spring Security for authentication and authorization - Use BCrypt for secure password encoding - Configure CORS settings appropriately for web applications - Implement proper input validation to prevent injection attacks ## Logging and Monitoring - Use SLF4J with Logback for structured logging - Implement appropriate log levels (ERROR, WARN, INFO, DEBUG) - Leverage Spring Boot Actuator for health checks, metrics, and monitoring - Integrate with monitoring tools (Prometheus, Grafana) ## API Documentation - Use Springdoc OpenAPI for comprehensive API documentation - Provide detailed annotations for endpoints, parameters, and responses - Generate interactive API documentation with Swagger UI ## Build and Deployment - Use Maven or Gradle for dependency management and builds - Implement multi-stage Docker builds for optimized container images - Configure CI/CD pipelines for automated testing and deployment - Use environment variables for sensitive configuration ## General Best Practices - Follow RESTful API design principles with proper HTTP methods and status codes - Design for microservices architecture when appropriate - Adhere to SOLID principles for clean, maintainable code - Maintain high cohesion within components and low coupling between them - Implement proper error handling with meaningful error responses
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.