Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Cloud Native Patterns

ASecurity

Apply cloud-native architecture patterns. Use when designing for scalability, resilience, or cloud deployment. Covers microservices, containers, and distributed systems.

34 stars
0 votes
0 copies
0 views
Added 9/22/2026
devopsjavasqlspringkubernetesgitapidatabase

Works with

api

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add nguyenhuuca/assessment --skill cloud-native-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloud Native Patterns?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Cloud Native Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nguyenhuuca-cloud-native-patterns/badge)](https://www.skillsdirectory.com/skills/nguyenhuuca-cloud-native-patterns)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: cloud-native-patterns
description: Apply cloud-native architecture patterns. Use when designing for scalability, resilience, or cloud deployment. Covers microservices, containers, and distributed systems.
allowed-tools: Read, Write, Glob, Grep
---

# Cloud-Native Patterns

## Twelve-Factor App

1. **Codebase**: One codebase, many deploys
2. **Dependencies**: Explicitly declare and isolate
3. **Config**: Store in environment
4. **Backing Services**: Treat as attached resources
5. **Build, Release, Run**: Strictly separate stages
6. **Processes**: Execute as stateless processes
7. **Port Binding**: Export services via port
8. **Concurrency**: Scale out via process model
9. **Disposability**: Fast startup and graceful shutdown
10. **Dev/Prod Parity**: Keep environments similar
11. **Logs**: Treat as event streams
12. **Admin Processes**: Run as one-off processes

## Resilience Patterns

### Circuit Breaker (Resilience4j + Spring Boot)
Prevent cascading failures by failing fast.

```java
// Add dependency: io.github.resilience4j:resilience4j-spring-boot3

// Configuration
@Configuration
public class ResilienceConfig {
    @Bean
    public CircuitBreakerConfig circuitBreakerConfig() {
        return CircuitBreakerConfig.custom()
            .failureRateThreshold(50)
            .waitDurationInOpenState(Duration.ofSeconds(30))
            .slidingWindowSize(10)
            .build();
    }
}

// Service with circuit breaker
@Service
public class ExternalApiService {
    private final RestTemplate restTemplate;
    private final CircuitBreaker circuitBreaker;

    @CircuitBreaker(name = "externalApi", fallbackMethod = "fallback")
    public String callExternalApi(String request) {
        return restTemplate.getForObject(
            "https://api.example.com/data",
            String.class
        );
    }

    private String fallback(String request, Exception ex) {
        return "Fallback response: Service unavailable";
    }
}
```

### Retry with Backoff (Resilience4j)
```java
// Configuration
@Configuration
public class RetryConfig {
    @Bean
    public io.github.resilience4j.retry.RetryConfig retryConfig() {
        return io.github.resilience4j.retry.RetryConfig.custom()
            .maxAttempts(3)
            .waitDuration(Duration.ofSeconds(1))
            .retryExceptions(IOException.class, TimeoutException.class)
            .ignoreExceptions(BusinessException.class)
            .build();
    }
}

// Service with retry
@Service
public class DataService {
    @Retry(name = "dataService", fallbackMethod = "fallback")
    public Data fetchData(Long id) {
        // May throw transient exceptions
        return externalDataSource.fetch(id);
    }

    private Data fallback(Long id, Exception ex) {
        // Return cached or default value
        return Data.defaultValue();
    }
}

// Spring Retry alternative (simpler)
@Retryable(
    value = {RemoteAccessException.class},
    maxAttempts = 3,
    backoff = @Backoff(delay = 1000, multiplier = 2)
)
public String callRemoteService() {
    return restTemplate.getForObject(url, String.class);
}
```

### Bulkhead
Isolate failures to prevent system-wide impact.

## Service Communication

### Synchronous
- REST/HTTP
- gRPC

### Asynchronous
- Message queues (RabbitMQ, SQS)
- Event streaming (Kafka)

## Health Checks (Spring Boot Actuator)

```java
// Add dependency: spring-boot-starter-actuator

// application.yaml
management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics
  endpoint:
    health:
      show-details: always
  health:
    readiness-state:
      enabled: true
    liveness-state:
      enabled: true

// Built-in endpoints
// GET /actuator/health - Overall health
// GET /actuator/health/liveness - Kubernetes liveness probe
// GET /actuator/health/readiness - Kubernetes readiness probe

// Custom health indicator
@Component
public class DatabaseHealthIndicator implements HealthIndicator {
    private final DataSource dataSource;

    @Override
    public Health health() {
        try (Connection conn = dataSource.getConnection()) {
            if (conn.isValid(1000)) {
                return Health.up()
                    .withDetail("database", "PostgreSQL")
                    .withDetail("status", "reachable")
                    .build();
            }
        } catch (Exception e) {
            return Health.down()
                .withException(e)
                .build();
        }
        return Health.down().build();
    }
}

// Custom readiness check
@Component
public class CacheReadinessIndicator implements HealthIndicator {
    private final CacheManager cacheManager;

    @Override
    public Health health() {
        try {
            // Test cache connectivity
            boolean cacheHealthy = testCache();
            if (cacheHealthy) {
                return Health.up().build();
            }
        } catch (Exception e) {
            return Health.down().withException(e).build();
        }
        return Health.down().build();
    }
}
```

## Container Best Practices

- One process per container
- Use multi-stage builds
- Run as non-root user
- Use health checks
- Keep images small

Attribution

nguyenhuucanguyenhuuca
View sourceMore from nguyenhuuca →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

397921 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2648130 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

942310 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

805540 votes
View all in devops →