check-architecture

Detects layer violations, bean design flaws, and configuration anti-patterns in Spring Boot 3.x applications.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/zuldare/apuntesIA --skill check-architecture-zuldare
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: check-architecture
Source: https://github.com/zuldare/apuntesIA/tree/main/skills/check-architecture
Command: npx skills add https://github.com/zuldare/apuntesIA --skill check-architecture-zuldare

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Spring Boot code often compiles and passes tests while hiding architectural problems—layer violations, stateful singletons, deprecated security APIs, broken transactions—that only surface as production incidents under load. This Skill systematically audits a codebase for these structural issues before they reach production. ## Core Features & Use Cases - Layer Integrity Checks: Detects controllers accessing repositories directly, services returning HTTP types, entities leaking out of the service layer, and business rules embedded in repositories. - Bean & Configuration Audit: Finds stateful singletons, field injection, circular dependencies, deprecated Spring Security 5 APIs, missing @EnableMethodSecurity, and unsafe actuator exposure. - Transaction & Virtual Thread Review: Verifies class-level @Transactional defaults, catches @Transactional on private methods, and flags synchronized blocks that pin virtual threads on Java 21. - Use Case: When reviewing a PR that touches Spring Security configuration or adds beans to an existing service, run this audit to produce a severity-ranked report of violations with concrete fixes before merge. ## Quick Start Review this Spring Boot module for architecture violations and produce a severity-ranked report with fixes.

Frequently Asked Questions about check-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check a Spring Boot application for architecture violations?▼

Run an architecture audit that checks layer boundaries, bean design, configuration, and transactions in phases. The review flags issues like controllers injecting repositories directly, services returning ResponseEntity, and stateful singletons, then outputs a severity-ranked report with fixes.

How to detect circular dependencies in Spring Boot services?▼

Trace injection chains between services to find cycles such as UserService injecting OrderService which injects UserService back. Spring Boot 3.x fails fast on circular references by default, so also check whether spring.main.allow-circular-references was set to true to work around a structural problem.

Does Spring Boot 3.x still support the old Spring Security 5 configuration style?▼

Deprecated methods like authorizeRequests() and antMatchers() may still compile in Boot 3.x but are incorrect. Migrate to authorizeHttpRequests() with requestMatchers(), and add @EnableMethodSecurity if @PreAuthorize annotations are used, since they are silently ignored without it.

Why is @Transactional on a private method not working?▼

Spring applies transactions through proxies, which cannot intercept private methods, so the annotation is silently ignored. Move the annotation to a public method or restructure the class so transactional boundaries sit on public entry points.

What breaks when enabling virtual threads in Spring Boot 3.2+?▼

Synchronized methods and blocks pin virtual threads to carrier threads, destroying scalability under load. Replace synchronized with ConcurrentHashMap or ReentrantLock, and audit ThreadLocal usage since virtual threads do not inherit ThreadLocal context the same way.