spring-boot · mindrally — скилл для Claude Code: правила разработки на Spring Boot
Скилл задаёт агенту стиль кода на Spring Boot: REST-контроллеры, тесты, безопасность, сборка и деплой. Пригодится, когда проект на Java и хочется единообразия.
npx skills add Mindrally/skills --skill spring-boot -a claude-codeЧто делает spring-boot
Скилл превращает ассистента в знатока Java, Spring Framework, Maven и JUnit. Он прописывает структуру пакетов — контроллеры, сервисы, репозитории, модели, конфигурации — и требует осмысленных имён: PascalCase для классов, camelCase для методов, ALL_CAPS для констант.
Внутри набор правил по ключевым темам. Конфигурация хранится в application.properties или application.yml, инъекция зависимостей — через конструктор, а не через поля. Тесты пишутся на JUnit 5, веб-слой проверяется через MockMvc, репозитории — через @DataJpaTest, для баз данных подключают Testcontainers. Отдельные блоки посвящены Spring Security с BCrypt, логированию через SLF4J и Logback, метрикам через Actuator и документации API в Springdoc OpenAPI.
Скилл предполагает Java 17 или новее и Spring Boot 3.x — на более старых версиях часть советов про records и sealed classes просто не сработает. Сборка описана для Maven или Gradle, чувствительные настройки выносятся в переменные окружения.
Какие задачи решает
- разложить код по слоям контроллеров, сервисов и репозиториев
- написать интеграционный тест с Testcontainers вместо моков
- закрыть REST-эндпоинты через Spring Security и BCrypt
- настроить профили dev, test и prod без правки кода
- собрать метрики и health-чеки через Actuator
Примеры запросов агенту
- Разбей этот сервис на контроллер, сервис и репозиторий по правилам скилла spring-boot
- Напиши тесты для
OrderControllerчерез MockMvc и@SpringBootTest - Проверь конфигурацию Spring Security и подскажи, где заменить field injection на конструктор
Как установить spring-boot
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill spring-boot -a claude-code2Вручную: положить файлы
~/.claude/skills/spring-boot/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/spring-boot/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill spring-boot -a codex2Вручную: положить файлы
.agents/skills/spring-boot/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill spring-boot -a cursor2Вручную: положить файлы
.cursor/skills/spring-boot/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills spring-boot2Вручную: положить файлы
.github/skills/spring-boot/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill spring-boot -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path spring-bootВручную: положить файлы
.devin/skills/spring-boot/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill spring-boot -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора168
Другие версии spring-boot
Похожие
Рядом в теме «Бэкенд и API»
Всё по теме «Бэкенд и API» →Вопросы о spring-boot
Как установить spring-boot в Claude?
Выполните npx skills add Mindrally/skills --skill spring-boot -a claude-code. Файл скилла появится по пути ~/.claude/skills/spring-boot/SKILL.md.
Что делает скилл spring-boot?
Задаёт агенту правила разработки на Spring Boot: структура пакетов, именование, инъекция через конструктор, тесты, безопасность, логирование и сборка. Ассистент опирается на них, когда пишет или правит код.
Какая версия Java и Spring Boot нужна?
Скилл рассчитан на Java 17 или новее и Spring Boot 3.x. На старых версиях советы про records, sealed classes и pattern matching неприменимы.
Исходный текст
SKILL.md · Apache-2.0
--- name: spring-boot description: Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # 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
© Mindrally · Apache-2.0 · Mindrally/skills