Agent skill

Springboot Patterns

by affaan-m in affaan-m/ECC

Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging.

MITAuto-check passedBackend & APIs

Install Springboot Patterns

skills CLI
$ npx skills add affaan-m/ECC --skill springboot-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC springboot-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/es/skills/springboot-patterns .claude/skills/springboot-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
springboot-patterns
GitHub stars
274k
Token cost
~2.5k tokens
SKILL.md length
330 words
Files
1
Skills in repo
657
Repo updated
First seen
Licence
MIT

At a glance

Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging.

  • Works in 4 steps: La aplicación está detrás de un proxy… → Se ha registrado ForwardedHeaderFilter… → Se ha configurado… → …
  • Tasks that involve Backend development
  • SKILL.md covers Cuándo Activar, Estructura de API REST, Patrón de Repositorio (Spring… and Capa de Servicio con…, plus 12 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Springboot Patterns is an agent skill from affaan-m/ECC. Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging. Usar para trabajo de backend en Java con Spring Boot.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development. It works with Spring Boot and Java. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Tasks that involve Backend development

Example prompts

  • “Use the springboot-patterns skill to patrone de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché…”
  • “/springboot-patterns”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. La aplicación está detrás de un proxy inverso de confianza (nginx, AWS ALB, etc.)
  2. Se ha registrado ForwardedHeaderFilter como un bean
  3. Se ha configurado server.forward-headers-strategy=NATIVE o FRAMEWORK en las propiedades de la aplicación
  4. El proxy está configurado para sobrescribir (no agregar) la cabecera X-Forwarded-For

What it can do on your machine

Read from SKILL.md and the folder at commit ef648e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Springboot Patterns loads about 2.5k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 330 words, ~2,500 tokens.

Download SKILL.mdSave it as .claude/skills/springboot-patterns/SKILL.md (or your agent's skills folder).
name
springboot-patterns
description
Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging. Usar para trabajo de backend en Java con Spring Boot.
origin
ECC

Patrones de Desarrollo Spring Boot

Patrones de arquitectura y API de Spring Boot para servicios escalables y listos para producción.

Cuándo Activar

  • Construir APIs REST con Spring MVC o WebFlux
  • Estructurar capas controller → service → repository
  • Configurar Spring Data JPA, caché o procesamiento asíncrono
  • Agregar validación, manejo de excepciones o paginación
  • Configurar perfiles para entornos dev/staging/producción
  • Implementar patrones orientados a eventos con Spring Events o Kafka

Estructura de API REST

java
@RestController
@RequestMapping("/api/markets")
@Validated
class MarketController {
  private final MarketService marketService;

  MarketController(MarketService marketService) {
    this.marketService = marketService;
  }

  @GetMapping
  ResponseEntity<Page<MarketResponse>> list(
      @RequestParam(defaultValue = "0") int page,
      @RequestParam(defaultValue = "20") int size) {
    Page<Market> markets = marketService.list(PageRequest.of(page, size));
    return ResponseEntity.ok(markets.map(MarketResponse::from));
  }

  @PostMapping
  ResponseEntity<MarketResponse> create(@Valid @RequestBody CreateMarketRequest request) {
    Market market = marketService.create(request);
    return ResponseEntity.status(HttpStatus.CREATED).body(MarketResponse.from(market));
  }
}

Patrón de Repositorio (Spring Data JPA)

java
public interface MarketRepository extends JpaRepository<MarketEntity, Long> {
  @Query("select m from MarketEntity m where m.status = :status order by m.volume desc")
  List<MarketEntity> findActive(@Param("status") MarketStatus status, Pageable pageable);
}

Capa de Servicio con Transacciones

java
@Service
public class MarketService {
  private final MarketRepository repo;

  public MarketService(MarketRepository repo) {
    this.repo = repo;
  }

  @Transactional
  public Market create(CreateMarketRequest request) {
    MarketEntity entity = MarketEntity.from(request);
    MarketEntity saved = repo.save(entity);
    return Market.from(saved);
  }
}

DTOs y Validación

java
public record CreateMarketRequest(
    @NotBlank @Size(max = 200) String name,
    @NotBlank @Size(max = 2000) String description,
    @NotNull @FutureOrPresent Instant endDate,
    @NotEmpty List<@NotBlank String> categories) {}

public record MarketResponse(Long id, String name, MarketStatus status) {
  static MarketResponse from(Market market) {
    return new MarketResponse(market.id(), market.name(), market.status());
  }
}

Manejo de Excepciones

java
@ControllerAdvice
class GlobalExceptionHandler {
  @ExceptionHandler(MethodArgumentNotValidException.class)
  ResponseEntity<ApiError> handleValidation(MethodArgumentNotValidException ex) {
    String message = ex.getBindingResult().getFieldErrors().stream()
        .map(e -> e.getField() + ": " + e.getDefaultMessage())
        .collect(Collectors.joining(", "));
    return ResponseEntity.badRequest().body(ApiError.validation(message));
  }

  @ExceptionHandler(AccessDeniedException.class)
  ResponseEntity<ApiError> handleAccessDenied() {
    return ResponseEntity.status(HttpStatus.FORBIDDEN).body(ApiError.of("Forbidden"));
  }

  @ExceptionHandler(Exception.class)
  ResponseEntity<ApiError> handleGeneric(Exception ex) {
    // Registrar errores inesperados con stack traces
    return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
        .body(ApiError.of("Internal server error"));
  }
}

Caché

Requiere @EnableCaching en una clase de configuración.

java
@Service
public class MarketCacheService {
  private final MarketRepository repo;

  public MarketCacheService(MarketRepository repo) {
    this.repo = repo;
  }

  @Cacheable(value = "market", key = "#id")
  public Market getById(Long id) {
    return repo.findById(id)
        .map(Market::from)
        .orElseThrow(() -> new EntityNotFoundException("Market not found"));
  }

  @CacheEvict(value = "market", key = "#id")
  public void evict(Long id) {}
}

Procesamiento Asíncrono

Requiere @EnableAsync en una clase de configuración.

java
@Service
public class NotificationService {
  @Async
  public CompletableFuture<Void> sendAsync(Notification notification) {
    // enviar email/SMS
    return CompletableFuture.completedFuture(null);
  }
}

Logging (SLF4J)

java
@Service
public class ReportService {
  private static final Logger log = LoggerFactory.getLogger(ReportService.class);

  public Report generate(Long marketId) {
    log.info("generate_report marketId={}", marketId);
    try {
      // lógica
    } catch (Exception ex) {
      log.error("generate_report_failed marketId={}", marketId, ex);
      throw ex;
    }
    return new Report();
  }
}

Middleware / Filtros

java
@Component
public class RequestLoggingFilter extends OncePerRequestFilter {
  private static final Logger log = LoggerFactory.getLogger(RequestLoggingFilter.class);

  @Override
  protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
      FilterChain filterChain) throws ServletException, IOException {
    long start = System.currentTimeMillis();
    try {
      filterChain.doFilter(request, response);
    } finally {
      long duration = System.currentTimeMillis() - start;
      log.info("req method={} uri={} status={} durationMs={}",
          request.getMethod(), request.getRequestURI(), response.getStatus(), duration);
    }
  }
}

Paginación y Ordenamiento

java
PageRequest page = PageRequest.of(pageNumber, pageSize, Sort.by("createdAt").descending());
Page<Market> results = marketService.list(page);

Llamadas Externas Resilientes a Errores

java
public <T> T withRetry(Supplier<T> supplier, int maxRetries) {
  int attempts = 0;
  while (true) {
    try {
      return supplier.get();
    } catch (Exception ex) {
      attempts++;
      if (attempts >= maxRetries) {
        throw ex;
      }
      try {
        Thread.sleep((long) Math.pow(2, attempts) * 100L);
      } catch (InterruptedException ie) {
        Thread.currentThread().interrupt();
        throw ex;
      }
    }
  }
}

Limitación de Velocidad (Filtro + Bucket4j)

Nota de Seguridad: La cabecera X-Forwarded-For no es confiable por defecto porque los clientes pueden falsificarla. Solo usar cabeceras reenviadas cuando:

  1. La aplicación está detrás de un proxy inverso de confianza (nginx, AWS ALB, etc.)
  2. Se ha registrado ForwardedHeaderFilter como un bean
  3. Se ha configurado server.forward-headers-strategy=NATIVE o FRAMEWORK en las propiedades de la aplicación
  4. El proxy está configurado para sobrescribir (no agregar) la cabecera X-Forwarded-For

Cuando ForwardedHeaderFilter está correctamente configurado, request.getRemoteAddr() retornará automáticamente la IP correcta del cliente desde las cabeceras reenviadas. Sin esta configuración, usar request.getRemoteAddr() directamente — retorna la IP de la conexión inmediata, que es el único valor confiable.

java
@Component
public class RateLimitFilter extends OncePerRequestFilter {
  private final Map<String, Bucket> buckets = new ConcurrentHashMap<>();

  /*
   * SEGURIDAD: Este filtro usa request.getRemoteAddr() para identificar clientes en la limitación
   * de velocidad.
   *
   * Si la aplicación está detrás de un proxy inverso (nginx, AWS ALB, etc.), se DEBE configurar
   * Spring para manejar correctamente las cabeceras reenviadas:
   *
   * 1. Establecer server.forward-headers-strategy=NATIVE (para plataformas cloud) o FRAMEWORK
   *    en application.properties/yaml
   * 2. Si se usa la estrategia FRAMEWORK, registrar ForwardedHeaderFilter:
   *
   *    @Bean
   *    ForwardedHeaderFilter forwardedHeaderFilter() {
   *        return new ForwardedHeaderFilter();
   *    }
   *
   * 3. Asegurar que el proxy sobrescriba (no agregue) la cabecera X-Forwarded-For para prevenir
   *    falsificación
   * 4. Configurar server.tomcat.remoteip.trusted-proxies o equivalente para el contenedor
   *
   * Sin esta configuración, request.getRemoteAddr() retorna la IP del proxy, no del cliente.
   * NO leer X-Forwarded-For directamente — es trivialmente falsificable sin manejo de proxy confiable.
   */
  @Override
  protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
      FilterChain filterChain) throws ServletException, IOException {
    String clientIp = request.getRemoteAddr();

    Bucket bucket = buckets.computeIfAbsent(clientIp,
        k -> Bucket.builder()
            .addLimit(Bandwidth.classic(100, Refill.greedy(100, Duration.ofMinutes(1))))
            .build());

    if (bucket.tryConsume(1)) {
      filterChain.doFilter(request, response);
    } else {
      response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());
    }
  }
}

Jobs en Segundo Plano

Usar @Scheduled de Spring o integrar con colas (Kafka, SQS, RabbitMQ). Mantener los handlers idempotentes y observables.

Observabilidad

  • Logging estructurado (JSON) mediante Logback encoder
  • Métricas: Micrometer + Prometheus/OTel
  • Trazado: Micrometer Tracing con backend OpenTelemetry o Brave

Configuraciones para Producción

  • Preferir inyección por constructor, evitar inyección por campo
  • Habilitar spring.mvc.problemdetails.enabled=true para errores RFC 7807 (Spring Boot 3+)
  • Configurar tamaños del pool HikariCP para la carga de trabajo, establecer timeouts
  • Usar @Transactional(readOnly = true) para consultas
  • Reforzar null-safety mediante @NonNull y Optional donde corresponda

Recuerda: Mantener los controllers delgados, los servicios enfocados, los repositorios simples y los errores manejados centralmente. Optimizar para mantenibilidad y testabilidad.

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/es/skills/springboot-patterns of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

Compare with similar skills

Springboot Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Springboot Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Springboot Patterns this skillaffaan-m/ECC274k—~2.5kAutomated safety check: PassMIT
Spring Bootpiomin/claude-ai-spring-boot1.3k—~2kAutomated safety check: PassApache-2.0
Dr Jskilljdubois/dr-jskill342—~4.6kAutomated safety check: NotesApache-2.0
WxJava Integration Guidebinarywang/WxJava33k—~123Automated safety check: PassApache-2.0
Flycms Devsunkaifei/FlyCms656—~827Automated safety check: PassMIT
Intelliconnect Service Styleruanrongman/IntelliConnect147—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Spring Boot

    piomin/claude-ai-spring-boot

    Spring Boot 3.x development - REST APIs, JPA, Security, Testing, and Cloud-native patterns.

    1.3k GitHub stars~2k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed
  • Dr Jskill

    jdubois/dr-jskill

    Creates Java + Spring Boot projects: Web applications, full-stack apps with Vue.js or Angular or React or vanilla JS, PostgreSQL, REST APIs, and Docker.

    342 GitHub stars~4.6k tokensUpdated 8 days ago
    Backend & APIsAuto-check: notes
  • WxJava Integration Guide

    binarywang/WxJava

    Plans a WxJava setup for Java, Spring Boot or Solon projects that call WeChat services, from module and BOM choice to config and a minimal working call.

    33k GitHub stars~123 tokensUpdated 11 days ago
    Backend & APIsAuto-check passed
  • Flycms Dev

    sunkaifei/FlyCms

    FlyCms 项目(backend/ Spring Boot 4.1.1 + frontend/ vue-vben-admin v5)的架构地图与开发规范总纲。凡在本仓库做任何开发——写后端接口、新增/修改模块、管理页面、数据库变更、修 bug、重构——都要先加载本 skill 再动手,即使用户只说"改一下""加个功能";前端登录/菜单/权限专项另见…

    656 GitHub stars~827 tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Intelliconnect Service Style

    ruanrongman/IntelliConnect

    Create or update IntelliConnect Spring Boot service/serviceimpl code in this repository style.

    147 GitHub stars~2.4k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Java Coding Standards

    Snailclimb/AIGuide

    Java/Spring Boot 编码规范:用于编写、审查、重构和讲解 Java 代码。适用于 Java 风格、Spring Boot 架构、Controller/Service/Manager/DAO 分层、API 边界、Entity/VO/Form/DTO/BO 设计、MyBatis/MyBatis-Plus 持久化、事务、异常、日志、安全、性能、测试和 Java 代码评审等场景。默认结合…

    667 GitHub stars~1k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed

More from affaan-m/ECC

All 657 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    274k GitHub starsUsed in 5 repos~1.9k tokens
    Auto-check passed
  • Videodb

    affaan-m/ECC

    Ingest, index, search, edit, and monitor video and audio with the VideoDB Python SDK — upload from files, URLs, or RTSP feeds, build spoken and scene indexes with timestamped search and playable…

    274k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    274k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    274k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    274k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    274k GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Springboot Patterns

What does Springboot Patterns do?

Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging. Springboot Patterns is an agent skill from affaan-m/ECC. Patrones de arquitectura Spring Boot, diseño de API REST, servicios en capas, acceso a datos, caché, procesamiento asíncrono y logging.

When should I use Springboot Patterns?

Springboot Patterns fits situations like: tasks that involve Backend development.

How do I install Springboot Patterns in Claude Code?

Run `npx skills add affaan-m/ECC --skill springboot-patterns -a claude-code`. Or copy the skill folder (docs/es/skills/springboot-patterns in affaan-m/ECC) into .claude/skills/springboot-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Springboot Patterns in Codex?

Run `npx skills add affaan-m/ECC --skill springboot-patterns -a codex`. Or copy the skill folder (docs/es/skills/springboot-patterns in affaan-m/ECC) into .agents/skills/springboot-patterns in your project. Codex loads it when a task matches its description.

Can I use Springboot Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill springboot-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/springboot-patterns, .gemini/skills/springboot-patterns, .github/skills/springboot-patterns and .opencode/skills/springboot-patterns in your project.

What does Springboot Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Springboot Patterns is instructions for the agent only.

Does Springboot Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Springboot Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Springboot Patterns use?

Springboot Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Springboot Patterns use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Springboot Patterns?

Skills that share tags, products or a category with Springboot Patterns: Spring Boot (piomin/claude-ai-spring-boot, 1.3k stars), Dr Jskill (jdubois/dr-jskill, 342 stars), WxJava Integration Guide (binarywang/WxJava, 33k stars) and Flycms Dev (sunkaifei/FlyCms, 656 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Springboot Patterns?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 274,360 GitHub stars. The repository holds 657 skills in this directory. The repository was last updated on October 5, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.