Skip to content

Commit dd1f581

Browse files
authored
Added system-prompts and skills for spring boot (#502)
1 parent 1d93560 commit dd1f581

39 files changed

Lines changed: 13634 additions & 2 deletions

File tree

.cursor/rules/301-frameworks-spring-boot-core.md

Lines changed: 1230 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/rules/302-frameworks-spring-boot-rest.md

Lines changed: 788 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/rules/303-frameworks-spring-data-jdbc.md

Lines changed: 751 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/rules/311-frameworks-spring-boot-slice-testing.md

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/rules/312-frameworks-spring-boot-integration-testing.md

Lines changed: 671 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/rules/313-frameworks-spring-boot-local-testing.md

Lines changed: 500 additions & 0 deletions
Large diffs are not rendered by default.

skills-generator/src/main/resources/skill-inventory.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,11 @@
2222
{"id": "170", "xml": true},
2323
{"id": "171", "xml": true},
2424
{"id": "172", "xml": true},
25-
{"id": "173", "xml": true}
25+
{"id": "173", "xml": true},
26+
{"id": "301", "xml": true},
27+
{"id": "302", "xml": true},
28+
{"id": "303", "xml": true},
29+
{"id": "311", "xml": true},
30+
{"id": "312", "xml": true},
31+
{"id": "313", "xml": true}
2632
]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<skill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../schemas/skill.xsd"
4+
id="301-frameworks-spring-boot-core">
5+
<metadata>
6+
<author>Juan Antonio Breña Moral</author>
7+
<version>0.13.0-SNAPSHOT</version>
8+
<license>Apache-2.0</license>
9+
</metadata>
10+
11+
<title>Spring Boot Core Guidelines</title>
12+
<description>Use when you need to review, improve, or build Spring Boot applications — including proper usage of @SpringBootApplication, component annotations (@Controller, @Service, @Repository), bean definition and scoping, configuration classes and @ConfigurationProperties, component scanning, conditional configuration and profiles, constructor injection, bean minimization, and scheduled tasks.</description>
13+
<goal><![CDATA[
14+
Apply Spring Boot Core guidelines for annotations, bean management, configuration, and dependency injection.
15+
16+
**What is covered in this Skill?**
17+
18+
- @SpringBootApplication and main application class
19+
- Component annotations: @RestController, @Service, @Repository
20+
- Bean definition, scoping, lifecycle
21+
- Configuration classes and @ConfigurationProperties
22+
- Component scanning and package organization
23+
- Conditional configuration and profiles
24+
- Constructor dependency injection
25+
- Bean minimization and composition
26+
- Scheduled tasks and background processing
27+
28+
**Scope:** Apply recommendations based on the reference rules and good/bad code examples.
29+
]]></goal>
30+
31+
<constraints>
32+
<constraints-description>Before applying any Spring Boot changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.</constraints-description>
33+
<constraint-list>
34+
<constraint>**MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change</constraint>
35+
<constraint>**SAFETY**: If compilation fails, stop immediately — compilation failure is a blocking condition</constraint>
36+
<constraint>**VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements</constraint>
37+
<constraint>**BEFORE APPLYING**: Read the reference for detailed rules, good/bad patterns, and constraints</constraint>
38+
</constraint-list>
39+
</constraints>
40+
41+
<reference path="references/301-frameworks-spring-boot-core.md" />
42+
</skill>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<skill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../schemas/skill.xsd"
4+
id="302-frameworks-spring-boot-rest">
5+
<metadata>
6+
<author>Juan Antonio Breña Moral</author>
7+
<version>0.13.0-SNAPSHOT</version>
8+
<license>Apache-2.0</license>
9+
</metadata>
10+
11+
<title>Java REST API Design Principles</title>
12+
<description>Use when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, error handling, security, API documentation, controller advice, and problem details for errors.</description>
13+
<goal><![CDATA[
14+
Apply REST API design principles for Spring Boot applications.
15+
16+
**What is covered in this Skill?**
17+
18+
- HTTP methods (GET, POST, PUT, PATCH, DELETE)
19+
- Resource URI design
20+
- HTTP status codes
21+
- Request/response DTOs
22+
- API versioning
23+
- Error handling
24+
- API security
25+
- Documentation (OpenAPI)
26+
- Controller advice and problem details
27+
28+
**Scope:** Apply recommendations based on the reference rules and good/bad code examples.
29+
]]></goal>
30+
31+
<constraints>
32+
<constraints-description>Before applying any REST API changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.</constraints-description>
33+
<constraint-list>
34+
<constraint>**MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change</constraint>
35+
<constraint>**SAFETY**: If compilation fails, stop immediately</constraint>
36+
<constraint>**VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements</constraint>
37+
<constraint>**BEFORE APPLYING**: Read the reference for detailed rules and good/bad patterns</constraint>
38+
</constraint-list>
39+
</constraints>
40+
41+
<reference path="references/302-frameworks-spring-boot-rest.md" />
42+
</skill>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<skill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../schemas/skill.xsd"
4+
id="303-frameworks-spring-data-jdbc">
5+
<metadata>
6+
<author>Juan Antonio Breña Moral</author>
7+
<version>0.13.0-SNAPSHOT</version>
8+
<license>Apache-2.0</license>
9+
</metadata>
10+
11+
<title>Spring Data JDBC with Records</title>
12+
<description>Use when you need to use Spring Data JDBC with Java records — including entity design with records, repository pattern, immutable updates, aggregate relationships, custom queries, transaction management, and avoiding N+1 problems.</description>
13+
<goal><![CDATA[
14+
Apply Spring Data JDBC guidelines with Java records.
15+
16+
**What is covered in this Skill?**
17+
18+
- Records for entity classes
19+
- Repository pattern
20+
- Immutable updates
21+
- Aggregate relationships
22+
- Custom queries
23+
- Transaction management
24+
- Single query loading (N+1 avoidance)
25+
26+
**Scope:** Apply recommendations based on the reference rules and good/bad code examples.
27+
]]></goal>
28+
29+
<constraints>
30+
<constraints-description>Before applying any Spring Data JDBC changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.</constraints-description>
31+
<constraint-list>
32+
<constraint>**MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change</constraint>
33+
<constraint>**SAFETY**: If compilation fails, stop immediately</constraint>
34+
<constraint>**VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements</constraint>
35+
<constraint>**BEFORE APPLYING**: Read the reference for detailed rules and good/bad patterns</constraint>
36+
</constraint-list>
37+
</constraints>
38+
39+
<reference path="references/303-frameworks-spring-data-jdbc.md" />
40+
</skill>

0 commit comments

Comments
 (0)