What problem does it solve? AI-generated Spring Boot code often suffers from bloated Controllers, God-class Services, circular dependencies, hardcoded secrets, and misplaced transaction boundaries. This Skill gives AI agents a single, enforceable rulebook so every generated or refactored Spring component follows consistent layering and wiring conventions. ## Core Features & Use Cases - Layering & DI rules: Defines Controller → Service → Mapper responsibilities, constructor injection with final fields, semantic stereotype annotations, and explicit bans on field injection, ApplicationContext lookups, and @Lazy workarounds. - Transaction, exception & async governance: Specifies where @Transactional belongs, how to keep external calls (LLM, HTTP, approvals) out of transactions, unified @RestControllerAdvice error mapping with a fixed {"error": "..."} body, and thread-pool requirements for @Async. - Agent-specific guidance: Covers role-based Agent service decomposition, the mandatory Spring AI OpenAI-compatible ChatModel abstraction, CLI entry via ApplicationRunner with @ConditionalOnProperty, and terminal-charset handling for Chinese consoles. - Use Case: When an AI agent is asked to add a new REST endpoint to the CodeAgent project, it consults this Skill to place validation in the DTO, business logic in the Service, transactions at the use-case boundary, and errors in the global exception handler. ## Quick Start Ask the AI to create or refactor a Spring Boot Controller, Service, or configuration class and require it to follow the spring skill conventions.