agentleFS
edjchapmanedjchapman/claude-code-config/skills/infrastructure/SKILL.md

infrastructure

Skill8 starsChanged 19 days agoMITView on GitHub

Terraform, Kubernetes, and Helm conventions. Use when editing infrastructure modules, manifests, charts, or deployment config.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 7 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use a standard layout: main.tf, variables.tf, outputs.tf, versions.tf

    line 12
  2. Distinctive:

    Keep modules focused -- one resource group per module

    line 14
  3. Very specific:

    Use terraform-docs to auto-generate module documentation

    line 15
  4. Distinctive:

    Always use remote state (S3, GCS, or Terraform Cloud)

    line 19
  5. Distinctive:

    Use separate state files per environment

    line 21
  6. Very specific:

    Never commit .tfstate files to version control

    line 22
  7. Very specific:

    Use terraform import for existing resources, never recreate

    line 23
  8. Very specific:

    Use terraform fmt and terraform validate in CI

    line 28
  9. Very specific:

    Run terraform plan in CI, apply only from CD pipeline

    line 29
  10. Very specific:

    Use data sources to reference existing infrastructure

    line 31
  11. Very specific:

    Use locals for computed values, variables for inputs

    line 32
  12. Very specific:

    Always set requests and limits for CPU and memory

    line 38
  13. Distinctive:

    Start conservative and tune based on metrics

    line 40
  14. Very specific:

    Use LimitRange and ResourceQuota for namespace defaults

    line 41
  15. Distinctive:

    Use HTTP probes for web services, TCP for databases, exec for custom checks

    line 48
  16. Very specific:

    Use Deployment for stateless, StatefulSet for stateful workloads

    line 53
  17. Very specific:

    Use ConfigMap for config, Secret for sensitive data

    line 55
  18. Distinctive:

    Use namespaces to isolate environments and teams

    line 57
  19. Very specific:

    Use values.yaml for defaults, override per environment

    line 63
  20. Distinctive:

    Use subcharts for shared infrastructure (databases, caches)

    line 68

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Infrastructure Patterns

Terraform

Module Structure

  • Use a standard layout: main.tf, variables.tf, outputs.tf, versions.tf
  • Extract reusable patterns into modules under modules/
  • Keep modules focused -- one resource group per module
  • Use terraform-docs to auto-generate module documentation

State Management

  • Always use remote state (S3, GCS, or Terraform Cloud)
  • Enable state locking (DynamoDB for S3 backend)
  • Use separate state files per environment
  • Never commit .tfstate files to version control
  • Use terraform import for existing resources, never recreate

Best Practices

  • Pin provider versions in versions.tf
  • Use terraform fmt and terraform validate in CI
  • Run terraform plan in CI, apply only from CD pipeline
  • Tag all resources with environment, team, and managed_by
  • Use data sources to reference existing infrastructure
  • Use locals for computed values, variables for inputs

Kubernetes

Resource Limits

  • Always set requests and limits for CPU and memory
  • requests = guaranteed minimum, limits = hard ceiling
  • Start conservative and tune based on metrics
  • Use LimitRange and ResourceQuota for namespace defaults

Probes

  • livenessProbe: restart if unhealthy (checks process is alive)
  • readinessProbe: remove from service if not ready (checks dependencies)
  • startupProbe: allow slow-starting containers before liveness kicks in
  • Use HTTP probes for web services, TCP for databases, exec for custom checks
  • Set initialDelaySeconds based on actual startup time

Best Practices

  • Use Deployment for stateless, StatefulSet for stateful workloads
  • Define PodDisruptionBudget for high-availability services
  • Use ConfigMap for config, Secret for sensitive data
  • Set imagePullPolicy: IfNotPresent and use specific image tags
  • Use namespaces to isolate environments and teams

Helm

Chart Best Practices

  • Use values.yaml for defaults, override per environment
  • Template helpers go in _helpers.tpl
  • Include NOTES.txt for post-install instructions
  • Use helm lint and helm template in CI
  • Pin chart versions in Chart.lock
  • Use subcharts for shared infrastructure (databases, caches)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.