304-frameworks-spring-boot-security — скилл для Claude Code
Настраивает защиту приложений на Spring Boot, отладку SecurityFilterChain и авторизацию API. Помогает внедрить JWT, проверку ролей и заголовки безопасности.
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a claude-codeЧто делает 304-frameworks-spring-boot-security
Скилл содержит правила настройки Spring Security для веб-приложений и API. Он управляет конфигурацией SecurityFilterChain, базовым form login и подключением ресурсного сервера на базе OAuth2 или JWT. Ассистент настраивает политики CORS и CSRF, исключает фиксацию сессий, проверяет права через @PreAuthorize и шифрует пароли.
Процесс строго привязан к состоянию сборки. Перед внесением правок проект обязан компилироваться через ./mvnw compile или mvn compile. Если компиляция падает, скилл прерывает работу до устранения ошибок. Завершив настройку защиты, агент проводит итоговую проверку командой ./mvnw clean verify.
Какие задачи решает
- настроить SecurityFilterChain и правила доступа к эндпоинтам
- подключить аутентификацию через JWT и OAuth2 ресурс-сервер
- разграничить вызовы сервисных методов аннотацией @PreAuthorize
- сконфигурировать защитные HTTP-заголовки, CORS и параметры CSRF
- предотвратить утечку чувствительных сведений в логах и ответах
Примеры запросов агенту
- Проверь конфигурацию SecurityFilterChain в проекте Spring Boot и добавь безопасные HTTP-заголовки
- Настрой авторизацию эндпоинтов API через JWT ресурс-сервер и закрой методы аннотациями @PreAuthorize
- Укрепи параметры CSRF и CORS для REST-контроллеров и исключи пароли из логов
Как установить 304-frameworks-spring-boot-security
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a claude-code2Вручную: положить файлы
~/.claude/skills/304-frameworks-spring-boot-security/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/304-frameworks-spring-boot-security/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a codex2Вручную: положить файлы
.agents/skills/304-frameworks-spring-boot-security/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a cursor2Вручную: положить файлы
.cursor/skills/304-frameworks-spring-boot-security/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 304-frameworks-spring-boot-security2Вручную: положить файлы
.github/skills/304-frameworks-spring-boot-security/SKILL.md1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a gemini-cli2Командой платформы
gemini skills install https://github.com/jabrena/plinth --path skills/304-frameworks-spring-boot-securityВручную: положить файлы
.devin/skills/304-frameworks-spring-boot-security/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о 304-frameworks-spring-boot-security
Как установить 304-frameworks-spring-boot-security в Claude Code?
Выполните команду npx skills add jabrena/plinth --skill 304-frameworks-spring-boot-security -a claude-code.
Что делает скилл 304-frameworks-spring-boot-security?
Он задаёт шаблоны проектирования и проверки безопасности Spring Boot: настройку цепочки фильтров, роли, шифрование паролей и обработку ошибок.
Какое условие обязательно перед внесением изменений?
Проект должен успешно собираться через mvn compile или ./mvnw compile. При сбое компиляции агент останавливает выполнение.
Исходный текст
SKILL.md · Apache-2.0
--- name: 304-frameworks-spring-boot-security description: Use when you need to design, review, or improve security in Spring Boot applications — including SecurityFilterChain, OAuth2/JWT resource server patterns, form login basics, method security (@PreAuthorize), CSRF and CORS for APIs, session fixation, security headers, exception handling, password encoding, and sensitive-data-safe logging. This should trigger for requests such as Add Spring Boot security support; Review Spring Boot security configuration; Improve API authorization in Spring Boot; Add JWT resource server security in Spring Boot; Harden Spring Boot security headers and CSRF settings. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.19.0 --- # Spring Boot Security Guidelines Apply Spring Boot security best practices with secure-by-default API boundaries. **What is covered in this Skill?** - Spring Security configuration and SecurityFilterChain setup - Authentication and authorization policies for endpoints - Method-level security (@PreAuthorize / @Secured) - Principle of least privilege for roles and scopes - Secure error handling and denial responses - Sensitive data handling in logs and responses **Scope:** Apply recommendations based on the reference rules and good/bad examples. ## Constraints Before applying security changes, ensure the project compiles. After improvements, run full verification. - **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change - **SAFETY**: If compilation fails, stop immediately - **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements - **BEFORE APPLYING**: Read the reference for detailed rules and examples ## When to use this skill - Add Spring Boot security support - Review Spring Boot security configuration - Improve API authorization in Spring Boot - Add JWT resource server security in Spring Boot - Harden Spring Boot security headers and CSRF settings - Implement method security with @PreAuthorize in Spring Boot ## Workflow 1. **Read reference and assess project context** Read `references/304-frameworks-spring-boot-security.md` and inspect the current project setup before proposing changes. 2. **Gather scope and decide target improvements** Identify requested outcomes, constraints, and the minimum safe set of changes to apply. 3. **Apply framework-aligned changes** Implement or refactor security-related configuration/code following the reference patterns and project conventions. 4. **Run verification and report results** Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions. ## Reference For detailed guidance, examples, and constraints, see [references/304-frameworks-spring-boot-security.md](references/304-frameworks-spring-boot-security.md).
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth