Skip to content

Commit 7879f8b

Browse files
authored
[#181] add sync-data-relational skills (#182)
- add a version skill for work convenience
1 parent c01191c commit 7879f8b

File tree

1 file changed

+157
-0
lines changed
  • .claude/skills/sync-data-relational

1 file changed

+157
-0
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
---
2+
name: sync-data-relational
3+
description: Analyze spring-data-relational version changes and identify required updates for the current project. Use when upgrading spring-data-relational versions or syncing with upstream changes.
4+
allowed-tools: [WebFetch, Grep, Read, Glob, Bash, TodoWrite]
5+
---
6+
7+
# Sync Spring Data Relational Changes
8+
9+
This skill helps synchronize spring-data-relational version updates to the spring-jdbc-plus project.
10+
11+
## When to Use
12+
13+
- When a new spring-data-relational version is released
14+
- When asked to "sync data-relational changes"
15+
- When asked to "update to spring-data-relational X.X.X"
16+
- When analyzing what needs to be updated for a version upgrade
17+
18+
## What This Skill Does
19+
20+
1. **Fetches Version Diff**: Retrieves changes between two spring-data-relational versions from GitHub
21+
2. **Analyzes Changes**: Categorizes changes into:
22+
- API changes (new methods, deprecated methods, signature changes)
23+
- Dependency upgrades
24+
- Bug fixes
25+
- Documentation updates
26+
3. **Identifies Impact**: Searches the current codebase for affected code
27+
4. **Provides Action Items**: Lists specific files and changes needed
28+
29+
## Instructions
30+
31+
### Step 1: Determine Versions
32+
33+
1. Check `gradle.properties` to find current `springDataBomVersion`
34+
2. Determine the spring-data-relational version from the BOM version
35+
- Spring Data BOM 2025.0.5 → spring-data-relational 3.5.5
36+
- Spring Data BOM 2025.0.6 → spring-data-relational 3.5.6
37+
3. Ask user for target version if not specified
38+
39+
### Step 2: Fetch Changes from GitHub
40+
41+
Use WebFetch to get the comparison from:
42+
`https://github.com/spring-projects/spring-data-relational/compare/{old-version}...{new-version}`
43+
44+
Example: `https://github.com/spring-projects/spring-data-relational/compare/3.5.5...3.5.6`
45+
46+
### Step 3: Analyze Changes
47+
48+
Categorize the changes:
49+
50+
**Critical Changes** (High Priority):
51+
- API deprecations
52+
- Breaking changes
53+
- Signature changes in methods we override/use
54+
55+
**Important Changes** (Medium Priority):
56+
- New features we might want to adopt
57+
- Bug fixes that affect our code
58+
- Dependency upgrades
59+
60+
**Informational** (Low Priority):
61+
- Documentation updates
62+
- Internal refactoring
63+
- Minor bug fixes
64+
65+
### Step 4: Search Current Codebase
66+
67+
For each critical/important change, search the codebase:
68+
69+
1. Use Grep to find usages of:
70+
- Deprecated classes/methods
71+
- Changed API signatures
72+
- Affected dependencies
73+
74+
2. Focus on these directories:
75+
- `spring-data-jdbc-plus-support/`
76+
- `spring-data-jdbc-plus-sql/`
77+
- `spring-data-jdbc-plus-repository/`
78+
- `spring-boot-autoconfigure-data-jdbc-plus/`
79+
80+
### Step 5: Generate Report
81+
82+
Create a structured report with:
83+
84+
```markdown
85+
## Spring Data Relational {old} → {new} Upgrade Analysis
86+
87+
### Summary
88+
- Total commits: X
89+
- Files changed: Y
90+
- Critical changes: Z
91+
92+
### Critical Changes Requiring Action
93+
94+
#### 1. [Change Category - e.g., API Deprecation]
95+
**Upstream Change**: Description of what changed in spring-data-relational
96+
**Impact**: Files in our codebase that are affected
97+
**Action Required**: What needs to be done
98+
99+
[List specific files with line numbers if found]
100+
101+
### Important Changes to Review
102+
103+
[Same format as above]
104+
105+
### Dependency Updates
106+
107+
[List dependency version changes]
108+
109+
### Low Priority / Informational
110+
111+
[Brief list of other changes]
112+
113+
### Next Steps
114+
115+
1. [ ] Review critical changes
116+
2. [ ] Update affected code
117+
3. [ ] Update gradle.properties if needed
118+
4. [ ] Run tests
119+
5. [ ] Update documentation
120+
```
121+
122+
### Step 6: Provide Actionable Next Steps
123+
124+
- Create TODO items for each required change
125+
- Suggest specific code modifications
126+
- Highlight test cases that should be added/updated
127+
128+
## Examples
129+
130+
**User**: "Sync data-relational changes from 3.5.5 to 3.5.6"
131+
**Skill**:
132+
1. Fetches https://github.com/spring-projects/spring-data-relational/compare/3.5.5...3.5.6
133+
2. Identifies: API deprecations, dependency upgrades
134+
3. Searches codebase for affected code
135+
4. Generates report with action items
136+
137+
**User**: "What needs to be updated for spring-data-relational 3.5.6?"
138+
**Skill**:
139+
1. Checks current version in gradle.properties
140+
2. Compares with 3.5.6
141+
3. Provides analysis and action items
142+
143+
## Important Notes
144+
145+
- Always use TodoWrite to track the analysis tasks
146+
- Focus on changes that affect the core modules (support, sql, repository)
147+
- Consider backward compatibility when suggesting changes
148+
- Highlight security-related changes with high priority
149+
- Note any changes to transitive dependencies that might affect our users
150+
151+
## Related Files
152+
153+
- `gradle.properties` - Contains springDataBomVersion
154+
- `buildSrc/src/main/groovy/spring.jdbc.plus.spring-bom-conventions.gradle` - BOM configuration
155+
- `spring-data-jdbc-plus-support/` - Core support module
156+
- `spring-data-jdbc-plus-sql/` - SQL module
157+
- `spring-data-jdbc-plus-repository/` - Repository module

0 commit comments

Comments
 (0)