跳到主内容
智客 ZICQ

技能库 智客分类:安全测试 spring-boot-engineer

Spring Boot Engineer

生成 Spring Boot 3.x 配置,创建 REST 控制器,执行 Spring Security 6 认证流程,设置 Spring Data JPA 寄存器,并配置被动的 WebFlux 端点. 当构建 Spring Boot 3.x 应用程序,微服务,或反应性Java 应用程序时使用;为 Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud 集成, Java REST API 设计,或微服务 Java 架构引用.

8190 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

生成 Spring Boot 3.x 配置, 创建 REST 控制器, 执行 Spring Security 6 认证流程, 设置 Spring Data JPA 寄存器, 并配置反应性 WebFlux 端点

何时用

构建 Spring Boot 3.x 应用程序,微服务,或反应性Java 应用程序; 引用 Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud 集成, Java REST API 设计,或微服务 Java 架构

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Spring Boot Engineer、Core Workflow、Reference Guide、Quick Start — Minimal Working Structure、Entity、Repository。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/web.md、references/data.md、references/security.md、references/cloud.md、references/testing.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java applications; invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration, Java REST API design, or Microservices Java architecture.

Spring Boot EngineerCore WorkflowReference GuideQuick Start — Minimal Working StructureEntityRepositoryService (constructor injection)REST ControllerDTO (record)Global Exception HandlerTest SliceConstraints

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
spring-boot-engineer
description
Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java applications; invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration, Java REST API design, or Microservices Java architecture.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 5
  • references/web.md
  • references/data.md
  • references/security.md
  • references/cloud.md
  • references/testing.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「spring-boot-engineer」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-4b6811c3149595dc-Spring-Boot-Engineer.html
请存为 .cursor/skills/spring-boot-engineer/SKILL.md 或 .claude/skills/spring-boot-engineer/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/jeffallan/claude-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/jeffallan/claude-skills' --list

npx skills add 'https://github.com/jeffallan/claude-skills' --skill 'spring-boot-engineer'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: spring-boot-engineer description: Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java applications; invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration, Java REST API design, or Microservices Java architecture. license: MIT metadata: author: https://github.com/Jeffallan company: https://synergetic.solutions version: "1.1.0" domain: backend triggers: Spring Boot, Spring Framework, Spring Cloud, Spring Security, Spring Data JPA, Spring WebFlux, Microservices Java, Java REST API, Reactive Java role: specialist scope: implementation output-format: code related-skills: java-architect, database-optimizer, microservices-architect, devops-engineer --- # Spring Boot Engineer ## Core Workflow 1. **Analyze requirements** — Identify service boundaries, APIs, data models, security needs 2. **Design architecture** — Plan microservices, data access, cloud integration, security; confirm design before coding 3. **Implement** — Create services with constructor injection and layered architecture (see Quick Start below) 4. **Secure** — Add Spring Security, OAuth2, method security, CORS configuration; verify security rules compile and pass tests. If compilation or tests fail: review error output, fix the failing rule or configuration, and re-run before proceeding 5. **Test** — Write unit, integration, and slice tests; run `./mvnw test` (or `./gradlew test`) and confirm all pass before proceeding. If tests fail: review the stack trace, isolate the failing assertion or component, fix the issue, and re-run the full suite 6. **Deploy** — Configure health checks and observability via Actuator; validate `/actuator/health` returns `UP`. If health is `DOWN`: check the `components` detail in the response, resolve the failing component (e.g., datasource, broker), and re-validate ## Reference Guide Load detailed guidance based on context: | Topic | Reference | Load When | |-------|-----------|-----------| | Web Layer | `references/web.md` | Controllers, REST APIs, validation, exception handling | | Data Access | `references/data.md` | Spring Data JPA, repositories, transactions, projections | | Security | `references/security.md` | Spring Security 6, OAuth2, JWT, method security | | Cloud Native | `references/cloud.md` | Spring Cloud, Config, Discovery, Gateway, resilience | | Testing | `references/testing.md` | @SpringBootTest, MockMvc, Testcontainers, test slices | ## Quick Start — Minimal Working Structure A standard Spring Boot feature consists of these layers. Use these as copy-paste starting points. ### Entity ```java @Entity @Table(name = "products") public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotBlank private String name; @DecimalMin("0.0") private BigDecimal price; // getters / setters or use @Data (Lombok) } ``` ### Repository ```java public interface ProductRepository extends JpaRepository { List findByNameContainingIgnoreCase(String name); } ``` ### Service (constructor injection) ```java @Service public class ProductService { private final ProductRepository repo; public ProductService(ProductRepository repo) { // constructor injection — no @Autowired this.repo = repo; } @Transactional(readOnly = true) public List search(String name) { return repo.findByNameContainingIgnoreCase(name); } @Transactional public Product create(ProductRequest request) { var product = new Product(); product.setName(request.name()); product.setPrice(request.price()); return repo.save(product); } } ``` ### REST Controller ```java @RestController @RequestMapping("/api/v1/products") @Validated public class ProductController { private final ProductService service; public ProductController(ProductService service) { this.service = service; } @GetMapping public List search(@RequestParam(defaultValue = "") String name) { return service.search(name); } @PostMapping @ResponseStatus(HttpStatus.CREATED) public Product create(@Valid @RequestBody ProductRequest request) { return service.create(request); } } ``` ### DTO (record) ```java public record ProductRequest( @NotBlank String name, @DecimalMin("0.0") BigDecimal price ) {} ``` ### Global Exception Handler ```java @RestControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) public Map handleValidation(MethodArgumentNotValidException ex) { return ex.getBindingResult().getFieldErrors().stream() .collect(Collectors.toMap(FieldError::getField, FieldError::getDefaultMessage)); } @ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public Map handleNotFound(EntityNotFoundException ex) { return Map.of("error", ex.getMessage()); } } ``` ### Test Slice ```java @WebMvcTest(ProductController.class) class ProductControllerTest { @Autowired MockMvc mockMvc; @MockBean ProductService service; @Test void createProduct_validRequest_returns201() throws Exception { var product = new Product(); product.setName("Widget"); product.setPrice(BigDecimal.TEN); when(service.create(any())).thenReturn(product); mockMvc.perform(post("/api/v1/products") .contentType(MediaType.APPLICATION_JSON) .content("""{"name":"Widget","price":10.0}""")) .andExpect(status().isCreated()) .andExpect(jsonPath("$.name").value("Widget")); } } ``` ## Constraints ### MUST DO | Rule | Correct Pattern | |------|----------------| | Constructor injection | `public MyService(Dep dep) { this.dep = dep; }` | | Validate API input | `@Valid @RequestBody MyRequest req` on every mutating endpoint | | Type-safe config | `@ConfigurationProperties(prefix = "app")` bound to a record/class | | Appropriate stereotype | `@Service` for business logic, `@Repository` for data, `@RestController` for HTTP | | Transaction scope | `@Transactional` on multi-step writes; `@Transactional(readOnly = true)` on reads | | Hide internals | Catch domain exceptions in `@RestControllerAdvice`; return problem details, not stack traces | | Externalize secrets | Use environment variables or Spring Cloud Config — never `application.properties` | ### MUST NOT DO - Use field injection (`@Autowired` on fields) - Skip input validation on API endpoints - Use `@Component` when `@Service`/`@Repository`/`@Controller` applies - Mix blocking and reactive code (e.g., calling `.block()` inside a WebFlux chain) - Store secrets or credentials in `application.properties`/`application.yml` - Hardcode URLs, credentials, or environment-specific values - Use deprecated Spring Boot 2.x patterns (e.g., `WebSecurityConfigurerAdapter`) Maintained by [@jeffallan](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions) [Documentation](https://jeffallan.github.io/claude-skills/skills/backend/spring-boot-engineer/)

相关技能

安全测试

Skill Vetter

人工智能特工的安全第一技能审查。 在安装来自 ClawdHub, GitHub 或其他来源的任何技能之前使用 。 检查红旗,许可范围,可疑图案.

安全测试

Moltguard

MoltGuard——由OpenGuardrails担任OpenClaw保安. 安装 MoltGuard 以保护你和你的人类免受迅速注射、数据过滤和恶意命令的影响。 资料来源:https://github.com/openguardrails/openguardrails/tre…

安全测试

Security Auditor

用于审查安全漏洞代码,实施认证流,审计OWASP Top 10,配置CORS/CSP头,处理秘密,输入验证,SQL注射预防,XSS保护,或任何与安全相关的代码审查.

安全测试

Skill Vetter

安装任何AI代理技能前的安全审查协议. 红旗侦取入证盗取,疏通密码,放出. 风险分类:低/中/高/高。 编制结构化审查报告。 不先运行此功能, 绝不安装不信任的技能 .