Spring boot analyzer
Skill jwickard/flows-marketplace/skills/spring-boot-analyzer
Use this skill to analyze a Java Spring Boot codebase for anti-patterns, architecture problems, and design smells, recording severity-ranked findings in the shared `arch-review.db` SQLite database. Trigger it whenever the user asks to review, audit, assess, or "analyze" a Spring Boot (or general Java/Spring) application's code quality, architecture, or design — phrases like "review this Spring Boot service for issues", "what's wrong with this codebase", "audit our architecture", "check for anti-patterns/code smells", "give me a code quality report", "check SOLID compliance", "find OCP/open-closed violations", "GoF pattern misuse", or "second opinion on this module before we merge". Also use it whenever the user wants Java/Spring findings ranked by severity (Critical/High/Medium/Low), not just a free-form list.From its SKILL.md
npx -y skills add jwickard/flows-marketplace --skill spring-boot-analyzerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.1 KB, as published. Nobody here has run it
Spring Boot Anti-Pattern & Design Analysis
Produce a durable record, not just a conversational summary. The value of this
skill is that findings land in the shared arch-review.db SQLite database
(via the mcp-sqlite MCP server) — queryable across repos and runs, and
directly consumable by spring-boot-resolver — so always end by recording
the review and its findings in the database, even if you also explain
highlights in the chat.
Requirements — stop early if these aren't met
- The
mcp-sqliteMCP tools. This skill records reviews and findings by calling themcp-sqliteMCP server's tools (sqlite_get_catalog,sqlite_execute, and canned-query tools such asfindings_by_repo). Confirm you can callsqlite_get_catalogbefore starting the analysis. If it's not available, stop and tell the user to configure it per~/Documents/mcp-sqlite/SCHEMA.md— don't fall back to writing a markdown report file instead. - A git remote. The
repovalue used for every row this skill writes is derived fromgit remote get-url origin, normalized toowner/repoform (strip the protocol/host prefix and any trailing.git). If there's nooriginremote, stop and ask the user whatrepovalue to use instead of guessing.
Workflow
1. Scope the analysis
Confirm what's being analyzed before diving in — a single module, a specific
package, or the whole repo. Find the build file(s) (pom.xml /
build.gradle[.kts]) to confirm this is actually a Spring Boot project and to
see what module structure exists (multi-module Maven/Gradle builds should be
noted, since layering issues often hide at module boundaries).
If the user didn't say where to look, default to the whole repository but
record exactly what was in scope in the reviews.scope value written in
step 6.
2. Check for existing static analysis tooling
Look at the build file for PMD, Checkstyle, SpotBugs, or ArchUnit configuration. If one or more are already wired into the build:
- Run it (e.g.
mvn pmd:check,./gradlew checkstyleMain,mvn spotbugs:check) and fold real findings in alongside your own review — a finding backed by an actual tool run is stronger evidence than manual reading alone. - Don't add new analyzer plugins or config to the project just to run this
analysis. If nothing is configured, that's fine — proceed with the
checklist-driven manual review below and note in the review's
limitationsfield (step 6) that no static analyzer was available.
See references/tools.md for exact commands per build tool and for grep-based fallback patterns you can use when no analyzer is configured.
3. Read the code against the checklists
Work through the codebase systematically — controllers, services, repositories/DAOs, config classes, domain/entity classes — rather than skimming randomly. Five reference files hold the detailed checklists; read whichever apply to what you find:
- references/architecture.md — layering violations, God classes, anemic domain models, tight coupling, fat controllers, missing separation of concerns.
- references/spring-misuse.md — Spring/JPA
specific misuse: field injection,
@Transactionalmistakes, N+1 queries, bean scope bugs, blocking calls in reactive code. - references/security.md — hardcoded secrets, injection risks, missing authZ, permissive CORS/CSRF, exposed actuator endpoints, vulnerable dependency versions.
- references/code-smells.md — exception swallowing, oversized methods/classes, duplication, mutable static state, weak test coverage signals.
- references/solid-design.md — SOLID principle violations and GoF pattern misuse, at both class level (type-switches instead of Strategy, DIP/ISP/LSP breaks) and service level (OCP applied to microservice boundaries — orchestrators that must be modified for every new integration, missing extension points, candidates for Strangler Fig).
Each reference file lists concrete things to grep or read for, why each one
matters, and which severity it typically warrants — use that as a default,
but adjust up or down based on actual context (a hardcoded secret in a
@Profile("test") fixture is not Critical the way one in production config
is).
4. Consolidate, don't enumerate every instance
If the same anti-pattern shows up in 30 files (e.g. field injection is used everywhere), record it once as a single finding listing representative locations and the total count, with a recommendation that addresses the pattern systemically. A finding that lists the same issue 30 times is less useful than one that says "found in 30 classes, e.g. X, Y, Z — recommend a lint rule to prevent recurrence." Reserve individual findings for issues that are genuinely distinct or uniquely severe.
5. Assign severity
Use this rubric consistently across all findings:
| Severity | Meaning | Examples |
|---|---|---|
| Critical | Actively exposes the app to a security breach, data loss/corruption, or production outage | Hardcoded production credentials, SQL built via string concatenation, missing authorization on a sensitive endpoint, unbounded resource leak that crashes under load |
| High | Not currently being exploited, but a serious correctness or architecture problem | Missing transactional boundaries around multi-step writes, N+1 queries on a hot path, business logic embedded directly in controllers bypassing the service layer, circular dependencies between core modules, service-level OCP violation (a shared orchestrator that must be modified/redeployed for every new integration) |
| Medium | Maintainability/design smell that raises risk over time without threatening correctness today | Field injection, God classes/services, inconsistent exception handling, missing tests on core business logic, config/magic-number sprawl, class-level OCP violation (type-switch that grows per new case), SRP/DIP violations |
| Low | Style or minor consistency issue | Naming inconsistencies, minor duplication, non-idiomatic but functionally fine Spring usage |
When a finding could plausibly sit at two levels, let blast radius decide: something touching auth, money, or data integrity rounds up; something purely cosmetic rounds down.
6. Record the review
Derive repo as described in Requirements (e.g. owner/repo). Then:
-
Insert the review row via
sqlite_execute, escaping any single quotes in text values by doubling them ('→''):INSERT INTO reviews (repo, review_date, reviewer, scope, tools_run, summary, limitations) VALUES ( 'owner/repo', '2026-08-23', 'spring-boot-analyzer', 'Whole repo, excluding generated/ and test fixtures', 'mvn pmd:check, mvn spotbugs:check', '2-4 sentences on overall architectural health and the single biggest risk.', 'Static review only — code was not executed/profiled.' );Then find the new review's id (needed for every finding insert below):
SELECT id FROM reviews WHERE repo = 'owner/repo' AND reviewer = 'spring-boot-analyzer' ORDER BY id DESC LIMIT 1; -
For each finding, check for an existing open duplicate first. Query with the finding's exact title:
SELECT id FROM findings WHERE repo = 'owner/repo' AND title = 'Field injection used throughout the service layer' AND status IN ('open', 'in_progress');If this returns a row, skip this finding entirely — do not insert a new
findingsrow or touch the existing one (noupdated_atbump, no newfinding_locations). It's already tracked from a prior run. Move on to the next finding. -
Otherwise, insert the finding. Assign the next code for its severity within this review (start at 1 per severity per review — e.g. the first Critical finding in this review is
C-1, the second isC-2, regardless of what codes exist in other reviews):INSERT INTO findings (review_id, code, repo, service, severity, category, title, issue, why_it_matters, recommendation, status) VALUES ( 42, 'C-1', 'owner/repo', 'user-service', 'Critical', 'Security', 'Hardcoded prod DB credentials in application.yml', 'application-prod.yml contains a literal DB password committed to source control.', 'Anyone with repo read access can obtain production database credentials.', 'Move the credential to a secrets manager and inject it via environment variable at deploy time.', 'open' );(Replace
42with the actualreview_idfrom step 1, and'C-1'with the correct next code for that severity in this review.)The
categorycolumn has a hard CHECK constraint — it only acceptsArchitecture,Spring Misuse,Security, orCode Smell. File anything fromsolid-design.md(SOLID violations, OCP at class or service level, GoF pattern misuse) underArchitecture, and make the SOLID/GoF angle explicit in thetitle(e.g. "OCP violation: ...") so it's distinguishable when scanning results. -
Insert one
finding_locationsrow per location (or per representative location, for a consolidated finding). Look up thefinding_idby the unique(review_id, code)pair rather than assuming row-id order:SELECT id FROM findings WHERE review_id = 42 AND code = 'C-1';INSERT INTO finding_locations (finding_id, file_path, line_number) VALUES (137, 'src/main/resources/application-prod.yml', 42);(Replace
137with thefinding_idjust looked up. For a consolidated finding with multiple representative locations, repeat this insert once per location.)
Keep findings specific and cite real file paths and line numbers you actually
observed — never fabricate a location. If you're not certain a suspected
issue is real (e.g. you can't confirm a query actually runs in a loop without
tracing call sites), say so in that finding's issue text rather than
stating it as fact.
After recording everything, call the review_executive_summary tool (or
sqlite_execute the equivalent query) with this review's id and give the
user a short chat summary (counts by severity and the 2-3 most important
findings) — do not write or reference any report file.