spring-cloud-config
Spring Cloud Config for centralized configuration management in microservices. Covers Config Server, Config Client, Git backend, and dynamic refresh. USE WHEN: user mentions "spring cloud config", "config server", "centralized configuration", "@RefreshScope", "externalized config" DO NOT USE FOR: simple properties files - use standard Spring Boot, secrets management - combine with Vault
What this skill does
# Spring Cloud Config - Quick Reference
> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `spring-cloud-config` for comprehensive documentation.
## Config Server Setup
### Dependencies
```xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
```
### Main Application
```java
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
}
```
### application.yml (Server)
```yaml
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
```yaml
spring:
profiles:
active: native
cloud:
config:
server:
native:
search-locations:
- classpath:/config
- file:///config-repo
```
## Config Client Setup
### Dependencies
```xml
<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)
```yaml
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
```yaml
# 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
```yaml
# Production overrides
server:
port: 80
app:
feature-flags:
new-dashboard: true
database:
pool-size: 50
timeout: 3000
```
## Accessing Configuration
### REST Endpoints
```bash
# 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
```yaml
management:
endpoints:
web:
exposure:
include: refresh,health,info
```
### @RefreshScope
```java
@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
```bash
# Single service
POST http://localhost:8081/actuator/refresh
# Response: changed properties
["app.feature-flags.new-dashboard", "app.name"]
```
## Spring Cloud Bus (Broadcast Refresh)
### Dependencies
```xml
<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
```yaml
spring:
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
management:
endpoints:
web:
exposure:
include: busrefresh
```
### Broadcast Refresh
```bash
# Refresh all instances
POST http://localhost:8888/actuator/busrefresh
# Refresh specific service
POST http://localhost:8888/actuator/busrefresh/user-service:**
```
## Encryption/Decryption
### Setup
```yaml
# Config Server
encrypt:
key: ${ENCRYPT_KEY} # Symmetric key
# Or asymmetric
encrypt:
key-store:
location: classpath:/server.jks
password: ${KEYSTORE_PASSWORD}
alias: configkey
```
### Encrypt Values
```bash
# 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
```yaml
# In config repo
spring:
datasource:
password: '{cipher}AQA...encrypted...'
database:
api-key: '{cipher}AQB...encrypted...'
```
## Health Check
```java
@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
```yaml
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
| Do | Don't |
|----|-------|
| Use Git for version control | Store configs locally only |
| Encrypt sensitive values | Store passwords in plain text |
| Use profile-specific configs | Mix environments in one file |
| Enable fail-fast in production | Ignore config server failures |
| Use @RefreshScope sparingly | Refresh-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-Pattern | Problem | Solution |
|--------------|---------|----------|
| Secrets in Git | Security vulnerability | Use encrypt or VauRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.