[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW0REM437FADBS4TBAZWTW":3,"skill-same:01M7EW0REM437FADBS4TBAZWTW":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EW0REM437FADBS4TBAZWTW","spring-pro",null,"Spring Boot guidance — DI, data access, security, testing, and production-ready Java services.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-spring-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: spring-pro\ndescription: Spring Boot guidance — DI, data access, security, testing, and production-ready Java services.\ncategory: development\n---\n\n## Overview\n\nSpring Boot is the dominant Java framework for backend services: dependency injection, auto-configuration, and a vast ecosystem (Data, Security, Cloud, Batch) let teams build enterprise-grade services with relatively little boilerplate. Its opinions are strong but escape hatches exist everywhere. This skill covers building Spring Boot services correctly — bean design, data access with Spring Data, security configuration, and the operational details (profiles, actuators, graceful shutdown) that production demands.\n\n## When to use\n\n- Building a Java\u002FKotlin backend service or microservice.\n- Structuring Spring Boot apps (layers, beans, configuration).\n- Securing APIs with Spring Security (JWT, OAuth2).\n- Tuning data access (JPA\u002FHibernate pitfalls, transactions).\n- Preparing Spring Boot for production (profiles, observability, containers).\n- Migrating Spring Boot across major versions.\n- Choosing between Spring MVC and WebFlux.\n\n## Core concepts\n\n- **IoC and dependency injection.** The container wires `@Component`\u002F`@Service`\u002F`@Repository` beans; prefer constructor injection (final fields, testable, no reflection magic). Understand bean scopes — singleton is the default; request\u002Fsession scopes exist for web contexts.\n- **Auto-configuration.** Starters (`spring-boot-starter-web`, `-data-jpa`) configure sensible defaults. Override via `application.yml` and `@ConditionalOn*` beans; use `@ConfigurationProperties` with validation for typed config instead of scattered `@Value`.\n- **Spring Data JPA.** Repositories give CRUD + derived queries (`findByEmail`) for free. Know the Hibernate underneath: lazy loading, the N+1 problem (`@EntityGraph` \u002F fetch joins fix it), and why `OpenSessionInView` is usually better disabled.\n- **Transactions.** `@Transactional` boundaries belong at the service layer. Remember: self-invocation bypasses proxies (no transaction applied), checked exceptions don't trigger rollback by default, and long transactions hold connections.\n- **Spring Security.** Filter-chain based; modern config uses `SecurityFilterChain` beans, not `WebSecurityConfigurerAdapter` (removed). For APIs: stateless JWT or OAuth2 resource server; never roll your own password hashing (use the provided encoders).\n- **Profiles and config.** `application-{profile}.yml` per environment; secrets from env vars or a secret store, never in the repo. Fail fast on missing required properties.\n- **Actuator.** Production-ready endpoints (`\u002Factuator\u002Fhealth`, `\u002Fmetrics`, `\u002Finfo`) — expose selectively, secure them, and wire health checks to your orchestrator.\n- **MVC vs WebFlux.** MVC (Servlet, blocking) is the default and right for most apps; WebFlux (reactive, non-blocking) suits high-concurrency I\u002FO with reactive data stores. Don't adopt WebFlux for \"performance\" without a reactive stack end-to-end — mixed blocking\u002Freactive is the worst of both.\n- **Validation.** Bean Validation (`@NotNull`, `@Size`) on DTOs with `@Valid` at the controller boundary; custom validators for domain rules; consistent error responses via `@ControllerAdvice`.\n- **Scheduling and async.** `@Scheduled` for cron-like tasks (with a distributed lock like ShedLock in multi-instance deploys); `@Async` for fire-and-forget — with a properly sized thread pool, not the default unbounded one.\n\n## Practical workflow\n\n1. **Bootstrap.** Use Spring Initializr (or the CLI) with the starters you need; prefer Gradle or Maven wrapper committed to the repo; target an LTS Java version.\n2. **Layer the app.** `controller` (HTTP only) → `service` (`@Transactional` business logic) → `repository` (data access); DTOs at the boundary, entities never leaked to clients.\n   ```java\n   @Service\n   @RequiredArgsConstructor\n   public class OrderService {\n       private final OrderRepository orders;\n       @Transactional\n       public OrderDto placeOrder(PlaceOrderCommand cmd) { ... }\n   }\n   ```\n3. **Configure data access.** Connection pool (HikariCP is default — size it: pool ≈ (2 × cores) + spindles for typical workloads), Flyway\u002FLiquibase for migrations (never `ddl-auto: update` in prod), indexes for query patterns.\n4. **Secure the API.** `SecurityFilterChain` with stateless sessions, JWT validation, method security (`@PreAuthorize`) for authorization, CORS locked to known origins.\n   ```java\n   @Bean\n   SecurityFilterChain api(HttpSecurity http) throws Exception {\n       return http.csrf(csrf -> csrf.disable())\n           .sessionManagement(s -> s.sessionCreationPolicy(STATELESS))\n           .authorizeHttpRequests(a -> a.requestMatchers(\"\u002Factuator\u002Fhealth\").permitAll()\n               .anyRequest().authenticated())\n           .oauth2ResourceServer(o -> o.jwt(Customizer.withDefaults()))\n           .build();\n   }\n   ```\n5. **Test in slices.** `@WebMvcTest` for controllers, `@DataJpaTest` for repositories, Testcontainers for integration tests against real Postgres\u002FRedis\u002FKafka — not mocks of infrastructure.\n6. **Handle errors consistently.** `@ControllerAdvice` mapping domain exceptions to RFC 9457 problem-details responses; log with correlation IDs; never leak stack traces.\n7. **Observe.** Micrometer metrics to Prometheus\u002FDatadog, structured logging (logstash encoder), distributed tracing via OpenTelemetry; dashboards on golden signals per service.\n8. **Ship.** Build a layered container image (Spring Boot's buildpacks or a multi-stage Dockerfile), enable graceful shutdown (`server.shutdown=graceful`), expose actuator health, and set JVM memory flags to respect container limits (`-XX:MaxRAMPercentage`).\n\n   ```java\n   @RestControllerAdvice\n   public class ApiExceptionHandler {\n       @ExceptionHandler(OrderNotFoundException.class)\n       ProblemDetail handleNotFound(OrderNotFoundException ex) {\n           ProblemDetail pd = ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, ex.getMessage());\n           pd.setTitle(\"Order not found\");\n           return pd;\n       }\n   }\n   ```\n\n## Common pitfalls\n\n- **N+1 queries via lazy loading** — especially serialized to JSON; use entity graphs or DTO projections.\n- **`@Transactional` self-invocation** — calling another `@Transactional` method on `this` skips the proxy; extract to another bean.\n- **Field injection** — hides dependencies, breaks immutability, complicates tests; use constructor injection.\n- **`ddl-auto: update` in production** — can drop or corrupt data; use Flyway\u002FLiquibase migrations.\n- **Exposing all actuator endpoints** — `\u002Fenv` and `\u002Fheapdump` leak secrets; expose only health\u002Finfo\u002Fmetrics and secure them.\n- **Ignoring graceful shutdown** — in-flight requests get killed on deploy; enable it and give the orchestrator a proper termination grace period.\n- **Oversized Hikari pools** — more connections ≠ more throughput; oversized pools cause DB contention and latency spikes.\n- **OpenSessionInView left on** — lazy loading during view rendering causing surprise queries; disable and fetch explicitly.\n- **`@Async` with default executor** — unbounded thread creation under load; define a bounded `TaskExecutor`.\n- **Catching exceptions inside `@Transactional`** — swallowing the exception that should trigger rollback; rethrow or mark rollback-only.\n- **Blocking calls in WebFlux handlers** — one blocking call stalls the whole event loop; offload with `publishOn(Schedulers.boundedElastic())` or stay on MVC.\n- **Fat `@Configuration` classes** — hundreds of bean definitions in one file; split configuration by domain like any other code.\n","## Overview\n\nSpring Boot is the dominant Java framework for backend services: dependency injection, auto-configuration, and a vast ecosystem (Data, Security, Cloud, Batch) let teams build enterprise-grade services with relatively little boilerplate. Its opinions are strong but escape hatches exist everywhere. This skill covers building Spring Boot services correctly — bean design, data access with Spring Data, security configuration, and the operational details (profiles, actuators, graceful shutdown) that production demands.\n\n## When to use\n\n- Building a Java\u002FKotlin backend service or microservice.\n- Structuring Spring Boot apps (layers, beans, configuration).\n- Securing APIs with Spring Security (JWT, OAuth2).\n- Tuning data access (JPA\u002FHibernate pitfalls, transactions).\n- Preparing Spring Boot for production (profiles, observability, containers).\n- Migrating Spring Boot across major versions.\n- Choosing between Spring MVC and WebFlux.\n\n## Core concepts\n\n- **IoC and dependency injection.** The container wires `@Component`\u002F`@Service`\u002F`@Repository` beans; prefer constructor injection (final fields, testable, no reflection magic). Understand bean scopes — singleton is the default; request\u002Fsession scopes exist for web contexts.\n- **Auto-configuration.** Starters (`spring-boot-starter-web`, `-data-jpa`) configure sensible defaults. Override via `application.yml` and `@ConditionalOn*` beans; use `@ConfigurationProperties` with validation for typed config instead of scattered `@Value`.\n- **Spring Data JPA.** Repositories give CRUD + derived queries (`findByEmail`) for free. Know the Hibernate underneath: lazy loading, the N+1 problem (`@EntityGraph` \u002F fetch joins fix it), and why `OpenSessionInView` is usually better disabled.\n- **Transactions.** `@Transactional` boundaries belong at the service layer. Remember: self-invocation bypasses proxies (no transaction applied), checked exceptions don't trigger rollback by default, and long transactions hold connections.\n- **Spring Security.** Filter-chain based; modern config uses `SecurityFilterChain` beans, not `WebSecurityConfigurerAdapter` (removed). For APIs: stateless JWT or OAuth2 resource server; never roll your own password hashing (use the provided encoders).\n- **Profiles and config.** `application-{profile}.yml` per environment; secrets from env vars or a secret store, never in the repo. Fail fast on missing required properties.\n- **Actuator.** Production-ready endpoints (`\u002Factuator\u002Fhealth`, `\u002Fmetrics`, `\u002Finfo`) — expose selectively, secure them, and wire health checks to your orchestrator.\n- **MVC vs WebFlux.** MVC (Servlet, blocking) is the default and right for most apps; WebFlux (reactive, non-blocking) suits high-concurrency I\u002FO with reactive data stores. Don't adopt WebFlux for \"performance\" without a reactive stack end-to-end — mixed blocking\u002Freactive is the worst of both.\n- **Validation.** Bean Validation (`@NotNull`, `@Size`) on DTOs with `@Valid` at the controller boundary; custom validators for domain rules; consistent error responses via `@ControllerAdvice`.\n- **Scheduling and async.** `@Scheduled` for cron-like tasks (with a distributed lock like ShedLock in multi-instance deploys); `@Async` for fire-and-forget — with a properly sized thread pool, not the default unbounded one.\n\n## Practical workflow\n\n1. **Bootstrap.** Use Spring Initializr (or the CLI) with the starters you need; prefer Gradle or Maven wrapper committed to the repo; target an LTS Java version.\n2. **Layer the app.** `controller` (HTTP only) → `service` (`@Transactional` business logic) → `repository` (data access); DTOs at the boundary, entities never leaked to clients.\n   ```java\n   @Service\n   @RequiredArgsConstructor\n   public class OrderService {\n       private final OrderRepository orders;\n       @Transactional\n       public OrderDto placeOrder(PlaceOrderCommand cmd) { ... }\n   }\n   ```\n3. **Configure data access.** Connection pool (HikariCP is default — size it: pool ≈ (2 × cores) + spindles for typical workloads), Flyway\u002FLiquibase for migrations (never `ddl-auto: update` in prod), indexes for query patterns.\n4. **Secure the API.** `SecurityFilterChain` with stateless sessions, JWT validation, method security (`@PreAuthorize`) for authorization, CORS locked to known origins.\n   ```java\n   @Bean\n   SecurityFilterChain api(HttpSecurity http) throws Exception {\n       return http.csrf(csrf -> csrf.disable())\n           .sessionManagement(s -> s.sessionCreationPolicy(STATELESS))\n           .authorizeHttpRequests(a -> a.requestMatchers(\"\u002Factuator\u002Fhealth\").permitAll()\n               .anyRequest().authenticated())\n           .oauth2ResourceServer(o -> o.jwt(Customizer.withDefaults()))\n           .build();\n   }\n   ```\n5. **Test in slices.** `@WebMvcTest` for controllers, `@DataJpaTest` for repositories, Testcontainers for integration tests against real Postgres\u002FRedis\u002FKafka — not mocks of infrastructure.\n6. **Handle errors consistently.** `@ControllerAdvice` mapping domain exceptions to RFC 9457 problem-details responses; log with correlation IDs; never leak stack traces.\n7. **Observe.** Micrometer metrics to Prometheus\u002FDatadog, structured logging (logstash encoder), distributed tracing via OpenTelemetry; dashboards on golden signals per service.\n8. **Ship.** Build a layered container image (Spring Boot's buildpacks or a multi-stage Dockerfile), enable graceful shutdown (`server.shutdown=graceful`), expose actuator health, and set JVM memory flags to respect container limits (`-XX:MaxRAMPercentage`).\n\n   ```java\n   @RestControllerAdvice\n   public class ApiExceptionHandler {\n       @ExceptionHandler(OrderNotFoundException.class)\n       ProblemDetail handleNotFound(OrderNotFoundException ex) {\n           ProblemDetail pd = ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, ex.getMessage());\n           pd.setTitle(\"Order not found\");\n           return pd;\n       }\n   }\n   ```\n\n## Common pitfalls\n\n- **N+1 queries via lazy loading** — especially serialized to JSON; use entity graphs or DTO projections.\n- **`@Transactional` self-invocation** — calling another `@Transactional` method on `this` skips the proxy; extract to another bean.\n- **Field injection** — hides dependencies, breaks immutability, complicates tests; use constructor injection.\n- **`ddl-auto: update` in production** — can drop or corrupt data; use Flyway\u002FLiquibase migrations.\n- **Exposing all actuator endpoints** — `\u002Fenv` and `\u002Fheapdump` leak secrets; expose only health\u002Finfo\u002Fmetrics and secure them.\n- **Ignoring graceful shutdown** — in-flight requests get killed on deploy; enable it and give the orchestrator a proper termination grace period.\n- **Oversized Hikari pools** — more connections ≠ more throughput; oversized pools cause DB contention and latency spikes.\n- **OpenSessionInView left on** — lazy loading during view rendering causing surprise queries; disable and fetch explicitly.\n- **`@Async` with default executor** — unbounded thread creation under load; define a bounded `TaskExecutor`.\n- **Catching exceptions inside `@Transactional`** — swallowing the exception that should trigger rollback; rethrow or mark rollback-only.\n- **Blocking calls in WebFlux handlers** — one blocking call stalls the whole event loop; offload with `publishOn(Schedulers.boundedElastic())` or stay on MVC.\n- **Fat `@Configuration` classes** — hundreds of bean definitions in one file; split configuration by domain like any other code.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-spring-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill spring-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill spring-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill spring-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-spring-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]