Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

java-microservicesJava microservices 搜索

Agent Skill

用于辅助 Java 项目开发、面向对象设计、Spring 生态、Maven 或 Gradle 依赖和后端工程实践。它适合让 Agent 分析类结构、设计接口、整理服务分层、生成测试或检查常见代码坏味道。使用时需要结合项目已有架构、包结构和依赖版本,不应只按通用教程改代码;涉及数据库、事务、并发或框架配置时,应先确认运行环境和回归测试范围。

总安装

7,188

周安装

288

GitHub Stars

33

下载量

2,327
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:java-microservices(Java microservices 搜索)
来源仓库:https://github.com/pluginagentmarketplace/custom-plugin-java
仓库路径:skills/java-microservices
安装命令:
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-microservices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-microservices

简介

研究微服务架构下的 Java 应用拆分与通信模式。

  • 涵盖服务发现、熔断机制和分布式事务处理。
  • 提供 Spring Cloud 等主流方案的选型参考。
  • 设计服务边界前应明确业务域划分依据。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • java-microservices 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Java Microservices Skill

Build production microservices with Spring Cloud and distributed system patterns.

Overview

This skill covers microservices architecture with Spring Cloud including service discovery, API gateway, circuit breakers, event-driven communication, and distributed tracing.

When to Use This Skill

Use when you need to:

  • Design microservices architecture
  • Implement service-to-service communication
  • Configure resilience patterns
  • Set up event-driven messaging
  • Add distributed tracing

Topics Covered

Spring Cloud Components

  • Config Server (centralized config)
  • Service Discovery (Eureka, Consul)
  • API Gateway (Spring Cloud Gateway)
  • Load Balancing (Spring Cloud LoadBalancer)

Resilience Patterns

  • Circuit Breaker (Resilience4j)
  • Retry with backoff
  • Bulkhead isolation
  • Rate limiting

Event-Driven Architecture

  • Apache Kafka integration
  • Spring Cloud Stream
  • Saga pattern
  • Event sourcing basics

Observability

  • Distributed tracing (Micrometer)
  • Metrics (Prometheus)
  • Log correlation

Quick Reference

// Saga with Choreography
@Component
public class OrderSagaListener {

    @KafkaListener(topics = "order.created")
    public void handleOrderCreated(OrderCreatedEvent event) {
        inventoryService.reserve(event.getItems());
    }

    @KafkaListener(topics = "payment.failed")
    public void handlePaymentFailed(PaymentFailedEvent event) {
        // Compensating transaction
        inventoryService.release(event.getOrderId());
        orderService.cancel(event.getOrderId());
    }
}

// Circuit Breaker Configuration
@Configuration
public class ResilienceConfig {

    @Bean
    public Customizer<Resilience4JCircuitBreakerFactory> cbCustomizer() {
        return factory -> factory.configureDefault(id ->
            new Resilience4JConfigBuilder(id)
                .circuitBreakerConfig(CircuitBreakerConfig.custom()
                    .failureRateThreshold(50)
                    .waitDurationInOpenState(Duration.ofSeconds(30))
                    .slidingWindowSize(10)
                    .build())
                .build());
    }
}

// API Gateway Routes
@Configuration
public class GatewayConfig {

    @Bean
    public RouteLocator routes(RouteLocatorBuilder builder) {
        return builder.routes()
            .route("orders", r -> r
                .path("/api/orders/**")
                .filters(f -> f
                    .stripPrefix(1)
                    .circuitBreaker(c -> c.setName("order-cb"))
                    .retry(retry -> retry.setRetries(3)))
                .uri("lb://order-service"))
            .build();
    }
}

Observability Configuration

management:
  tracing:
    sampling:
      probability: 1.0
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus

logging:
  pattern:
    level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]"

Common Patterns

Saga Pattern

Order → Inventory → Payment → (Success | Compensate)

Circuit Breaker States

CLOSED → (failures exceed threshold) → OPEN
OPEN → (wait duration) → HALF_OPEN
HALF_OPEN → (success) → CLOSED
HALF_OPEN → (failure) → OPEN

Troubleshooting

Common Issues

ProblemCauseSolution
Cascade failureNo circuit breakerAdd Resilience4j
Message lostNo ackEnable manual ack
Inconsistent dataNo compensationImplement saga
Service not foundDiscovery delayTune heartbeat

Debug Checklist

□ Trace request (traceId)
□ Check circuit breaker state
□ Verify Kafka consumer lag
□ Review gateway routes
□ Monitor retry counts

Usage

Skill("java-microservices")

Related Skills

  • java-spring-boot - Spring Cloud
  • java-docker - Containerization

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.99%
按下载量换算675

OpenCode

22.16%
按下载量换算516

Antigravity

15.03%
按下载量换算350

Gemini CLI

12.9%
按下载量换算300

Codex

8.03%
按下载量换算187

windsurf

2.86%
按下载量换算67

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills