{"id":11391,"date":"2026-02-11T13:14:35","date_gmt":"2026-02-11T04:14:35","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11391"},"modified":"2026-02-11T13:41:26","modified_gmt":"2026-02-11T04:41:26","slug":"claude-code-%ec%8a%a4%ed%82%ac-%ec%83%9d%ec%84%b1-%eb%b0%8f-%ec%82%ac%ec%9a%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11391","title":{"rendered":"Claude Code &#8211; \uc2a4\ud0ac \uc0dd\uc131 \ubc0f \uc0ac\uc6a9\ubc95"},"content":{"rendered":"<h1>Claude Code &#8211; \uc2a4\ud0ac \uc0dd\uc131 \ubc0f \uc0ac\uc6a9\ubc95<\/h1>\n<h2>\uc2a4\ud0ac\uc774\ub780?<\/h2>\n<p>Claude \uc5d0\uc11c \ub9cc\ub4e4\uc5b4 \uacf5\uac1c\ud55c \uae30\ubc95\uc785\ub2c8\ub2e4.<br \/>\n\ub2e4\ub978 AI \uc5d0\uc11c\ub3c4 \uc0ac\uc6a9\uac00\ub2a5\ud558\ubbc0\ub85c <code>Claude Skill<\/code> \uc774 \uc544\ub2c8\ub77c <code>Agent Skill<\/code> \ub85c \uba85\uba85\ud569\ub2c8\ub2e4.<br \/>\nAgent Skills\ub294 Claude\uc758 \uae30\ub2a5\uc744 \ud655\uc7a5\ud558\ub294 \ubaa8\ub4c8\uc785\ub2c8\ub2e4.<br \/>\n\ud328\ud134\uc774\ub098 \uac00\uc774\ub4dc\ub77c\uc778\uc744 \uc815\ub9ac\ud574 \ub193\uace0, \uadf8\uac83\uc5d0 \ub9de\uac8c AI \uac00 \ucf54\ub529\ud558\uac8c \ud558\ub294 \uae30\ubc95\uc785\ub2c8\ub2e4.<\/p>\n<h2>\uc0d8\ud50c<\/h2>\n<pre><code class=\"language-markdown\">---\nname: my-skill-name\ndescription: A clear description of what this skill does and when to use it\n---\n\n# My Skill Name\n\n[Add your instructions here that Claude will follow when this skill is active]\n\n## Examples\n- Example usage 1\n- Example usage 2\n\n## Guidelines\n- Guideline 1\n- Guideline 2<\/code><\/pre>\n<h2>\uc2e4\uc81c\ucf54\ub4dc (\uc624\ud508\uc18c\uc2a4)<\/h2>\n<p>\ubb38\uc11c\uac00 \uae68\uc9c0\ubbc0\ub85c \ub530\uc634\ud45c\ub97c \ubb3c\uacb0\ubb34\ub2ac\ubb38\uc790\ub85c \ubcc0\uacbd\ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-markdown\">---\nname: springboot-patterns\ndescription: Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.\n---\n\n# Spring Boot Development Patterns\n\nSpring Boot architecture and API patterns for scalable, production-grade services.\n\n## REST API Structure\n\n~~~java\n@RestController\n@RequestMapping(&quot;\/api\/markets&quot;)\n@Validated\nclass MarketController {\n  private final MarketService marketService;\n\n  MarketController(MarketService marketService) {\n    this.marketService = marketService;\n  }\n\n  @GetMapping\n  ResponseEntity&lt;Page&lt;MarketResponse&gt;&gt; list(\n      @RequestParam(defaultValue = &quot;0&quot;) int page,\n      @RequestParam(defaultValue = &quot;20&quot;) int size) {\n    Page&lt;Market&gt; markets = marketService.list(PageRequest.of(page, size));\n    return ResponseEntity.ok(markets.map(MarketResponse::from));\n  }\n\n  @PostMapping\n  ResponseEntity&lt;MarketResponse&gt; create(@Valid @RequestBody CreateMarketRequest request) {\n    Market market = marketService.create(request);\n    return ResponseEntity.status(HttpStatus.CREATED).body(MarketResponse.from(market));\n  }\n}\n~~~\n\n## Repository Pattern (Spring Data JPA)\n\n~~~java\npublic interface MarketRepository extends JpaRepository&lt;MarketEntity, Long&gt; {\n  @Query(&quot;select m from MarketEntity m where m.status = :status order by m.volume desc&quot;)\n  List&lt;MarketEntity&gt; findActive(@Param(&quot;status&quot;) MarketStatus status, Pageable pageable);\n}\n~~~\n\n## Service Layer with Transactions\n\n~~~java\n@Service\npublic class MarketService {\n  private final MarketRepository repo;\n\n  public MarketService(MarketRepository repo) {\n    this.repo = repo;\n  }\n\n  @Transactional\n  public Market create(CreateMarketRequest request) {\n    MarketEntity entity = MarketEntity.from(request);\n    MarketEntity saved = repo.save(entity);\n    return Market.from(saved);\n  }\n}\n~~~\n\n## DTOs and Validation\n\n~~~java\npublic record CreateMarketRequest(\n    @NotBlank @Size(max = 200) String name,\n    @NotBlank @Size(max = 2000) String description,\n    @NotNull @FutureOrPresent Instant endDate,\n    @NotEmpty List&lt;@NotBlank String&gt; categories) {}\n\npublic record MarketResponse(Long id, String name, MarketStatus status) {\n  static MarketResponse from(Market market) {\n    return new MarketResponse(market.id(), market.name(), market.status());\n  }\n}\n~~~\n\n## Exception Handling\n\n~~~java\n@ControllerAdvice\nclass GlobalExceptionHandler {\n  @ExceptionHandler(MethodArgumentNotValidException.class)\n  ResponseEntity&lt;ApiError&gt; handleValidation(MethodArgumentNotValidException ex) {\n    String message = ex.getBindingResult().getFieldErrors().stream()\n        .map(e -&gt; e.getField() + &quot;: &quot; + e.getDefaultMessage())\n        .collect(Collectors.joining(&quot;, &quot;));\n    return ResponseEntity.badRequest().body(ApiError.validation(message));\n  }\n\n  @ExceptionHandler(AccessDeniedException.class)\n  ResponseEntity&lt;ApiError&gt; handleAccessDenied() {\n    return ResponseEntity.status(HttpStatus.FORBIDDEN).body(ApiError.of(&quot;Forbidden&quot;));\n  }\n\n  @ExceptionHandler(Exception.class)\n  ResponseEntity&lt;ApiError&gt; handleGeneric(Exception ex) {\n    \/\/ Log unexpected errors with stack traces\n    return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)\n        .body(ApiError.of(&quot;Internal server error&quot;));\n  }\n}\n~~~\n\n## Caching\n\nRequires `@EnableCaching` on a configuration class.\n\n~~~java\n@Service\npublic class MarketCacheService {\n  private final MarketRepository repo;\n\n  public MarketCacheService(MarketRepository repo) {\n    this.repo = repo;\n  }\n\n  @Cacheable(value = &quot;market&quot;, key = &quot;#id&quot;)\n  public Market getById(Long id) {\n    return repo.findById(id)\n        .map(Market::from)\n        .orElseThrow(() -&gt; new EntityNotFoundException(&quot;Market not found&quot;));\n  }\n\n  @CacheEvict(value = &quot;market&quot;, key = &quot;#id&quot;)\n  public void evict(Long id) {}\n}\n~~~\n\n## Async Processing\n\nRequires `@EnableAsync` on a configuration class.\n\n~~~java\n@Service\npublic class NotificationService {\n  @Async\n  public CompletableFuture&lt;Void&gt; sendAsync(Notification notification) {\n    \/\/ send email\/SMS\n    return CompletableFuture.completedFuture(null);\n  }\n}\n~~~\n\n## Logging (SLF4J)\n\n~~~java\n@Service\npublic class ReportService {\n  private static final Logger log = LoggerFactory.getLogger(ReportService.class);\n\n  public Report generate(Long marketId) {\n    log.info(&quot;generate_report marketId={}&quot;, marketId);\n    try {\n      \/\/ logic\n    } catch (Exception ex) {\n      log.error(&quot;generate_report_failed marketId={}&quot;, marketId, ex);\n      throw ex;\n    }\n    return new Report();\n  }\n}\n~~~\n\n## Middleware \/ Filters\n\n~~~java\n@Component\npublic class RequestLoggingFilter extends OncePerRequestFilter {\n  private static final Logger log = LoggerFactory.getLogger(RequestLoggingFilter.class);\n\n  @Override\n  protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,\n      FilterChain filterChain) throws ServletException, IOException {\n    long start = System.currentTimeMillis();\n    try {\n      filterChain.doFilter(request, response);\n    } finally {\n      long duration = System.currentTimeMillis() - start;\n      log.info(&quot;req method={} uri={} status={} durationMs={}&quot;,\n          request.getMethod(), request.getRequestURI(), response.getStatus(), duration);\n    }\n  }\n}\n~~~\n\n## Pagination and Sorting\n\n~~~java\nPageRequest page = PageRequest.of(pageNumber, pageSize, Sort.by(&quot;createdAt&quot;).descending());\nPage&lt;Market&gt; results = marketService.list(page);\n~~~\n\n## Error-Resilient External Calls\n\n~~~java\npublic &lt;T&gt; T withRetry(Supplier&lt;T&gt; supplier, int maxRetries) {\n  int attempts = 0;\n  while (true) {\n    try {\n      return supplier.get();\n    } catch (Exception ex) {\n      attempts++;\n      if (attempts &gt;= maxRetries) {\n        throw ex;\n      }\n      try {\n        Thread.sleep((long) Math.pow(2, attempts) * 100L);\n      } catch (InterruptedException ie) {\n        Thread.currentThread().interrupt();\n        throw ex;\n      }\n    }\n  }\n}\n~~~\n\n## Rate Limiting (Filter + Bucket4j)\n\n**Security Note**: The `X-Forwarded-For` header is untrusted by default because clients can spoof it.\nOnly use forwarded headers when:\n1. Your app is behind a trusted reverse proxy (nginx, AWS ALB, etc.)\n2. You have registered `ForwardedHeaderFilter` as a bean\n3. You have configured `server.forward-headers-strategy=NATIVE` or `FRAMEWORK` in application properties\n4. Your proxy is configured to overwrite (not append to) the `X-Forwarded-For` header\n\nWhen `ForwardedHeaderFilter` is properly configured, `request.getRemoteAddr()` will automatically\nreturn the correct client IP from the forwarded headers. Without this configuration, use\n`request.getRemoteAddr()` directly\u2014it returns the immediate connection IP, which is the only\ntrustworthy value.\n\n~~~java\n@Component\npublic class RateLimitFilter extends OncePerRequestFilter {\n  private final Map&lt;String, Bucket&gt; buckets = new ConcurrentHashMap&lt;&gt;();\n\n  \/*\n   * SECURITY: This filter uses request.getRemoteAddr() to identify clients for rate limiting.\n   *\n   * If your application is behind a reverse proxy (nginx, AWS ALB, etc.), you MUST configure\n   * Spring to handle forwarded headers properly for accurate client IP detection:\n   *\n   * 1. Set server.forward-headers-strategy=NATIVE (for cloud platforms) or FRAMEWORK in\n   *    application.properties\/yaml\n   * 2. If using FRAMEWORK strategy, register ForwardedHeaderFilter:\n   *\n   *    @Bean\n   *    ForwardedHeaderFilter forwardedHeaderFilter() {\n   *        return new ForwardedHeaderFilter();\n   *    }\n   *\n   * 3. Ensure your proxy overwrites (not appends) the X-Forwarded-For header to prevent spoofing\n   * 4. Configure server.tomcat.remoteip.trusted-proxies or equivalent for your container\n   *\n   * Without this configuration, request.getRemoteAddr() returns the proxy IP, not the client IP.\n   * Do NOT read X-Forwarded-For directly\u2014it is trivially spoofable without trusted proxy handling.\n   *\/\n  @Override\n  protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,\n      FilterChain filterChain) throws ServletException, IOException {\n    \/\/ Use getRemoteAddr() which returns the correct client IP when ForwardedHeaderFilter\n    \/\/ is configured, or the direct connection IP otherwise. Never trust X-Forwarded-For\n    \/\/ headers directly without proper proxy configuration.\n    String clientIp = request.getRemoteAddr();\n\n    Bucket bucket = buckets.computeIfAbsent(clientIp,\n        k -&gt; Bucket.builder()\n            .addLimit(Bandwidth.classic(100, Refill.greedy(100, Duration.ofMinutes(1))))\n            .build());\n\n    if (bucket.tryConsume(1)) {\n      filterChain.doFilter(request, response);\n    } else {\n      response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());\n    }\n  }\n}\n~~~\n\n## Background Jobs\n\nUse Spring\u2019s `@Scheduled` or integrate with queues (e.g., Kafka, SQS, RabbitMQ). Keep handlers idempotent and observable.\n\n## Observability\n\n- Structured logging (JSON) via Logback encoder\n- Metrics: Micrometer + Prometheus\/OTel\n- Tracing: Micrometer Tracing with OpenTelemetry or Brave backend\n\n## Production Defaults\n\n- Prefer constructor injection, avoid field injection\n- Enable `spring.mvc.problemdetails.enabled=true` for RFC 7807 errors (Spring Boot 3+)\n- Configure HikariCP pool sizes for workload, set timeouts\n- Use `@Transactional(readOnly = true)` for queries\n- Enforce null-safety via `@NonNull` and `Optional` where appropriate\n\n**Remember**: Keep controllers thin, services focused, repositories simple, and errors handled centrally. Optimize for maintainability and testability.\n<\/code><\/pre>\n<h2>\uc124\uce58\ubc29\ubc95<\/h2>\n<p>\uc804\uc5ed Skills \uc704\uce58: ~\/.claude\/skills\/{skill-name}\/SKILL.md<br \/>\n\ud504\ub85c\uc81d\ud2b8 Skills \uc704\uce58: .claude\/skills\/{skill-name}\/SKILL.md<\/p>\n<h2>\uc0ac\uc6a9\ubc95<\/h2>\n<p>\uae30\ubcf8\uc801\uc73c\ub85c\ub294 \ud074\ub85c\ub4dc\uac00 \uc54c\uc544\uc11c \ud544\uc694\ud55c \uc2a4\ud0ac\uc744 \ucc3e\uc544\uc11c \ucc38\uc870\ud569\ub2c8\ub2e4.<\/p>\n<p>\ud558\uc9c0\ub9cc, \uc544\ub798\uc640 \uac19\uc774 \ud2b9\uc815 \uc2a4\ud0ac\uc744 \uc0ac\uc6a9\ud558\ub3c4\ub85d \uac15\uc81c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">\/{skill-name} \ud504\ub86c\ud504\ud2b8 \uc785\ub825<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Claude Code &#8211; \uc2a4\ud0ac \uc0dd\uc131 \ubc0f \uc0ac\uc6a9\ubc95 \uc2a4\ud0ac\uc774\ub780? Claude \uc5d0\uc11c \ub9cc\ub4e4\uc5b4 \uacf5\uac1c\ud55c \uae30\ubc95\uc785\ub2c8\ub2e4. \ub2e4\ub978 AI \uc5d0\uc11c\ub3c4 \uc0ac\uc6a9\uac00\ub2a5\ud558\ubbc0\ub85c Claude Skill \uc774 \uc544\ub2c8\ub77c Agent Skill \ub85c \uba85\uba85\ud569\ub2c8\ub2e4. Agent Skills\ub294 Claude\uc758 \uae30\ub2a5\uc744 \ud655\uc7a5\ud558\ub294 \ubaa8\ub4c8\uc785\ub2c8\ub2e4. \ud328\ud134\uc774\ub098 \uac00\uc774\ub4dc\ub77c\uc778\uc744 \uc815\ub9ac\ud574 \ub193\uace0, \uadf8\uac83\uc5d0 \ub9de\uac8c AI \uac00 \ucf54\ub529\ud558\uac8c \ud558\ub294 \uae30\ubc95\uc785\ub2c8\ub2e4. \uc0d8\ud50c &#8212; name: my-skill-name description: A clear description of what this skill does\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11391\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-11391","post","type-post","status-publish","format-standard","hentry","category-language"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11391"}],"version-history":[{"count":2,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11391\/revisions"}],"predecessor-version":[{"id":11393,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11391\/revisions\/11393"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}