Token导航 LogoToken导航

Agent Skill · 研究检索

spring-cloud-config(弹簧云配置)

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

spring-cloud-config 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 52,216。

总安装 563周安装 23GitHub Stars 12下载 182核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:spring-cloud-config(弹簧云配置)
来源仓库:https://github.com/claude-dev-suite/claude-dev-suite
仓库路径:skills/spring-cloud-config
安装命令:
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill spring-cloud-config
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill spring-cloud-config

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于集中化管理微服务配置的 Spring Cloud Config 技能集。适用于不同环境(dev/test/prod)的配置差异化部署场景。支持 Git 仓库存储配置与动态刷新无需重启应用生效。配置加密需妥善保管密钥避免泄露敏感信息。

spring-cloud-config 属于研究检索类 Skill,可作为该场景下的辅助能力补充。客户端刷新应谨慎使用以免触发不必要的重新加载。

来源仓库内路径:skills/spring-cloud-config

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill spri…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

spring-cloud-config 怎么安装?

在终端执行 npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill spring-cloud-c…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

spring-cloud-config 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

spring-cloud-config 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

spring-cloud-config 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

spring-cloud-config 用的人多吗?

公开数据是累计安装 563 次,近一周安装 23 次,下载 182 次,GitHub 12 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

spring-cloud-config 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
spring-cloud-config

弹簧云配置 · 本页

56312调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Spring Cloud Config - Quick Reference

Deep Knowledge: Use mcp__documentation__fetch_docs with technology: spring-cloud-config for comprehensive documentation.

Config Server Setup

Dependencies

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-config-server</artifactId>
</dependency>

Main Application

@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConfigServerApplication.class, args);
    }
}

application.yml (Server)

server:
  port: 8888

spring:
  application:
    name: config-server

  cloud:
    config:
      server:
        git:
          uri: https://github.com/myorg/config-repo
          default-label: main
          search-paths: '{application}'
          clone-on-start: true
          timeout: 10
          # For private repos
          username: ${GIT_USERNAME}
          password: ${GIT_TOKEN}

        # Multiple repositories
        # git:
        #   uri: https://github.com/myorg/default-config
        #   repos:
        #     user-service:
        #       pattern: user-*
        #       uri: https://github.com/myorg/user-config

# Security
management:
  endpoints:
    web:
      exposure:
        include: health,refresh

Native Filesystem Backend

spring:
  profiles:
    active: native
  cloud:
    config:
      server:
        native:
          search-locations:
            - classpath:/config
            - file:///config-repo

Config Client Setup

Dependencies

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

application.yml (Client)

spring:
  application:
    name: user-service
  config:
    import: optional:configserver:http://localhost:8888

  cloud:
    config:
      fail-fast: true
      retry:
        initial-interval: 1000
        max-interval: 2000
        max-attempts: 6
        multiplier: 1.1
      label: main  # Git branch

# For service discovery
# spring:
#   config:
#     import: optional:configserver:
#   cloud:
#     config:
#       discovery:
#         enabled: true
#         service-id: config-server

Config Repository Structure

config-repo/
├── application.yml           # Shared by all apps
├── application-dev.yml       # Shared dev profile
├── application-prod.yml      # Shared prod profile
├── user-service.yml          # user-service defaults
├── user-service-dev.yml      # user-service dev
├── user-service-prod.yml     # user-service prod
├── order-service.yml
└── order-service-prod.yml

Example: user-service.yml

# Base configuration
server:
  port: 8081

app:
  name: User Service
  feature-flags:
    new-dashboard: false
    beta-features: false

database:
  pool-size: 10
  timeout: 5000

Example: user-service-prod.yml

# Production overrides
server:
  port: 80

app:
  feature-flags:
    new-dashboard: true

database:
  pool-size: 50
  timeout: 3000

Accessing Configuration

REST Endpoints

# Get configuration
GET http://localhost:8888/{application}/{profile}
GET http://localhost:8888/{application}/{profile}/{label}

# Examples
GET http://localhost:8888/user-service/default
GET http://localhost:8888/user-service/prod
GET http://localhost:8888/user-service/prod/main

# Get specific file
GET http://localhost:8888/{application}/{profile}/{label}/{filename}

Dynamic Refresh

Enable Refresh

management:
  endpoints:
    web:
      exposure:
        include: refresh,health,info

@RefreshScope

@RestController
@RefreshScope
public class ConfigController {

    @Value("${app.feature-flags.new-dashboard}")
    private boolean newDashboard;

    @Value("${app.name}")
    private String appName;

    @GetMapping("/config")
    public Map<String, Object> getConfig() {
        return Map.of(
            "appName", appName,
            "newDashboard", newDashboard
        );
    }
}

@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "app")
public class AppConfig {
    private String name;
    private Map<String, Boolean> featureFlags;
    // getters, setters
}

Trigger Refresh

# Single service
POST http://localhost:8081/actuator/refresh

# Response: changed properties
["app.feature-flags.new-dashboard", "app.name"]

Spring Cloud Bus (Broadcast Refresh)

Dependencies

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
<!-- or Kafka -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bus-kafka</artifactId>
</dependency>

Configuration

spring:
  rabbitmq:
    host: localhost
    port: 5672
    username: guest
    password: guest

management:
  endpoints:
    web:
      exposure:
        include: busrefresh

Broadcast Refresh

# Refresh all instances
POST http://localhost:8888/actuator/busrefresh

# Refresh specific service
POST http://localhost:8888/actuator/busrefresh/user-service:**

Encryption/Decryption

Setup

# Config Server
encrypt:
  key: ${ENCRYPT_KEY}  # Symmetric key

# Or asymmetric
encrypt:
  key-store:
    location: classpath:/server.jks
    password: ${KEYSTORE_PASSWORD}
    alias: configkey

Encrypt Values

# Encrypt a value
POST http://localhost:8888/encrypt -d "mysecret"
# Returns: AQA...encrypted...

# Decrypt
POST http://localhost:8888/decrypt -d "AQA...encrypted..."

Use in Config

# In config repo
spring:
  datasource:
    password: '{cipher}AQA...encrypted...'

database:
  api-key: '{cipher}AQB...encrypted...'

Health Check

@Configuration
public class ConfigHealthConfig {

    @Bean
    public HealthIndicator configServerHealthIndicator(ConfigClientProperties props) {
        return () -> {
            try {
                // Check config server connectivity
                return Health.up()
                    .withDetail("configServer", props.getUri())
                    .build();
            } catch (Exception e) {
                return Health.down()
                    .withException(e)
                    .build();
            }
        };
    }
}

Vault Backend

spring:
  cloud:
    config:
      server:
        vault:
          host: localhost
          port: 8200
          scheme: https
          backend: secret
          default-key: application
          profile-separator: /
          kv-version: 2
          authentication: TOKEN
          token: ${VAULT_TOKEN}

Best Practices

DoDon't
Use Git for version controlStore configs locally only
Encrypt sensitive valuesStore passwords in plain text
Use profile-specific configsMix environments in one file
Enable fail-fast in productionIgnore config server failures
Use @RefreshScope sparinglyRefresh-scope everything

Production Checklist

  • Config server highly available
  • Git repo secured
  • Sensitive values encrypted
  • Retry configuration set
  • fail-fast enabled
  • Health checks configured
  • Spring Cloud Bus for broadcast
  • Actuator endpoints secured
  • Label (branch) strategy defined
  • Webhook for auto-refresh

When NOT to Use This Skill

  • Single application - Use standard Spring Boot properties
  • Kubernetes - Use ConfigMaps, Secrets
  • Secrets only - Use Vault, AWS Secrets Manager
  • Simple setup - Overhead may not be justified

Anti-Patterns

Anti-PatternProblemSolution
Secrets in GitSecurity vulnerabilityUse encrypt or Vault
No fail-fastApp starts with wrong configEnable spring.cloud.config.fail-fast
Missing @RefreshScopeConfig changes need restartAdd annotation to beans
Polling config serverHigh loadUse webhook-based refresh
No backup configConfig server down = app downConfigure fallback

Quick Troubleshooting

ProblemDiagnosticFix
Config not loadingCheck config server logsVerify profile, label
Refresh not workingCheck @RefreshScopeAdd annotation, POST /actuator/refresh
Wrong environmentCheck spring.profiles.activeSet correct profile
Git auth failingCheck credentialsConfigure correct auth
Encryption not workingCheck encrypt.keySet encryption key

Reference Documentation

平台分布

Codex

34.74%
按下载量换算63

Claude

27.96%
按下载量换算51

Cursor

19.59%
按下载量换算36

Gemini CLI

8.99%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills