infrastructure

Infrastructure as Code patterns for deploying Guts nodes using Terraform, Docker, and Kubernetes

240 stars

Best use case

infrastructure is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Infrastructure as Code patterns for deploying Guts nodes using Terraform, Docker, and Kubernetes

Infrastructure as Code patterns for deploying Guts nodes using Terraform, Docker, and Kubernetes

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "infrastructure" skill to help with this workflow task. Context: Infrastructure as Code patterns for deploying Guts nodes using Terraform, Docker, and Kubernetes

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/infrastructure/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/abdelstark/infrastructure/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/infrastructure/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How infrastructure Compares

Feature / AgentinfrastructureStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Infrastructure as Code patterns for deploying Guts nodes using Terraform, Docker, and Kubernetes

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Infrastructure Skill for Guts

You are managing infrastructure for a decentralized application with multiple node types.

## Deployment Targets

1. **Local Development**: Docker Compose
2. **Testing**: Kubernetes (k3s/kind)
3. **Production**: Cloud-agnostic Kubernetes + Terraform

## Terraform Patterns

### Module Structure

```
infra/
├── terraform/
│   ├── modules/
│   │   ├── network/
│   │   ├── compute/
│   │   └── storage/
│   ├── environments/
│   │   ├── dev/
│   │   ├── staging/
│   │   └── prod/
│   └── main.tf
```

### Example Module

```hcl
# modules/guts-node/main.tf
variable "node_count" {
  type        = number
  description = "Number of Guts nodes to deploy"
  default     = 3
}

variable "instance_type" {
  type        = string
  description = "Instance type for nodes"
  default     = "t3.medium"
}

resource "aws_instance" "guts_node" {
  count         = var.node_count
  ami           = data.aws_ami.ubuntu.id
  instance_type = var.instance_type

  tags = {
    Name        = "guts-node-${count.index}"
    Environment = var.environment
    Project     = "guts"
  }
}
```

## Docker Best Practices

### Multi-stage Builds

```dockerfile
# Build stage
FROM rust:1.75-slim as builder
WORKDIR /app
COPY . .
RUN cargo build --release --bin guts-node

# Runtime stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/guts-node /usr/local/bin/
EXPOSE 8080 9000
ENTRYPOINT ["guts-node"]
```

### Docker Compose for Development

```yaml
version: '3.8'

services:
  node1:
    build: .
    ports:
      - "8081:8080"
    environment:
      - GUTS_NODE_ID=node1
      - GUTS_PEERS=node2:9000,node3:9000
    volumes:
      - node1-data:/data

  node2:
    build: .
    ports:
      - "8082:8080"
    environment:
      - GUTS_NODE_ID=node2
      - GUTS_PEERS=node1:9000,node3:9000
    volumes:
      - node2-data:/data

  node3:
    build: .
    ports:
      - "8083:8080"
    environment:
      - GUTS_NODE_ID=node3
      - GUTS_PEERS=node1:9000,node2:9000
    volumes:
      - node3-data:/data

volumes:
  node1-data:
  node2-data:
  node3-data:
```

## Kubernetes Patterns

### StatefulSet for Nodes

```yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: guts-node
spec:
  serviceName: guts-nodes
  replicas: 3
  selector:
    matchLabels:
      app: guts-node
  template:
    metadata:
      labels:
        app: guts-node
    spec:
      containers:
      - name: guts-node
        image: guts/node:latest
        ports:
        - containerPort: 8080
          name: api
        - containerPort: 9000
          name: p2p
        volumeMounts:
        - name: data
          mountPath: /data
  volumeClaimTemplates:
  - metadata:
      name: data
    spec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: 100Gi
```

## Monitoring Stack

- **Metrics**: Prometheus with custom Rust metrics
- **Logs**: Loki + Grafana
- **Tracing**: Jaeger with OpenTelemetry

## Security Checklist

- [ ] TLS certificates via cert-manager
- [ ] Network policies for pod isolation
- [ ] Secrets management with external-secrets
- [ ] Regular security scanning with Trivy
- [ ] RBAC for Kubernetes access

Related Skills

terraform-infrastructure

242
from aiskillstore/marketplace

Terraform infrastructure as code workflow for provisioning cloud resources, creating reusable modules, and managing infrastructure at scale.

infrastructure-reporting

242
from aiskillstore/marketplace

Generate comprehensive network infrastructure reports including health status, performance analysis, security audits, and capacity planning recommendations.

infrastructure-management

242
from aiskillstore/marketplace

Manage network hosts and devices across all UniFi sites. Monitor host status, device configuration, and infrastructure health for comprehensive inventory management.

test-infrastructure

242
from aiskillstore/marketplace

When invoked:

cloud-infrastructure

242
from aiskillstore/marketplace

Cloud infrastructure design and deployment patterns for AWS, Azure, and GCP. Use when designing cloud architectures, implementing IaC with Terraform, optimizing costs, or setting up multi-region deployments.

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

discover-skills

242
from aiskillstore/marketplace

当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。

web-performance-seo

242
from aiskillstore/marketplace

Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.

project-to-obsidian

242
from aiskillstore/marketplace

将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置

obsidian-helper

242
from aiskillstore/marketplace

Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)