/iac-automation-skills:gremlin-chaos-engineering-configurationfrom iac-automation-skills
Configures Gremlin-specific chaos engineering attacks — installing the agent, defining resource/state/network attacks via CLI/API/Terraform provider, scoping blast radius, and composing multi-step Scenarios.
Ships in iac-automation-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Gremlin is a commercial, cross-platform fault-injection tool that runs attacks via a lightweight agent (a Kubernetes DaemonSet/sidecar, a host daemon on EC2/on-prem, or an ECS task) and a central control plane that handles targeting, scheduling, and halting attacks — distinct from Kubernetes-native tools like Chaos Mesh/LitmusChaos in that it works consistently across Kubernetes, VMs, and bare metal without needing a different tool per platform. This skill covers the Gremlin-specific mechanics: installing the agent, defining attacks (resource, state, network) via the CLI/API/Terraform provider, scoping targets and halt conditions, and composing multi-step Scenarios. The why — steady-state hypotheses, blast-radius philosophy, game-day facilitation, and graduating to production — is covered generically in chaos-engineering-and-resilience-testing and is not repeated here; apply that skill's principles using Gremlin as the execution tool.
gremlin Helm chart, deployed as a DaemonSet so
every node runs an agent capable of attacking pods/containers
scheduled there.gremlind daemon installed via package
manager, requiring host-level capabilities (it needs privileged
access to inject resource/network faults, so scope the host/IAM
permissions around it deliberately).Install the agent scoped to the intended blast-radius environment — start in a non-production namespace/cluster/ASG, not org-wide:
# Kubernetes: install via Helm, scoped to a specific namespace's
# nodes by targeting later at the attack level, not by limiting
# agent install (the agent itself is typically cluster-wide, but
# attacks are scoped per-attack in step 3)
helm repo add gremlin https://helm.gremlin.com
helm install gremlin gremlin/gremlin \
--namespace gremlin --create-namespace \
--set gremlin.secret.managed=true \
--set gremlin.secret.type=secret \
--set gremlin.team_id="$GREMLIN_TEAM_ID" \
--set gremlin.secret_key="$GREMLIN_SECRET_KEY"
Define a resource attack (CPU, memory, disk, or IO exhaustion), scoped by an explicit target selector and a fixed duration — never an open-ended attack:
# CLI: 80% CPU load on 1 container matching a label, for 60 seconds
gremlin attack-container \
--target-type Label \
--target-labels app=payments-api \
--target-exact 1 \
cpu --cores 2 --length 60
The --target-exact 1 (or an equivalent explicit count/percentage)
is the blast-radius control — never omit it in favor of an unscoped
"all matching containers" attack, especially for a first run.
Define a state attack (process kill, container/host shutdown) to test restart/failover behavior specifically:
gremlin attack-container \
--target-type Label \
--target-labels app=payments-api \
--target-exact 1 \
shutdown --delay 0
This is the Gremlin equivalent of Chaos Mesh's PodChaos pod-kill
action — validates the same restart/redundancy assumption, on
whatever platform the agent runs on (Kubernetes, EC2, or bare metal).
Define a network attack to test timeout/circuit-breaker handling for a specific downstream dependency, rather than a blanket network outage:
# Inject 300ms latency toward a specific downstream hostname only
gremlin attack-container \
--target-type Label \
--target-labels app=payments-api \
--target-exact 1 \
latency --delay 300 --hostnames fraud-check.internal
Scoping by --hostnames (or an equivalent egress-target filter) keeps
the attack specific to the dependency under test, instead of
degrading all of that service's network traffic indiscriminately.
Always set an explicit halt condition tied to a real health check
or metric, in addition to the attack's own fixed --length:
{
"haltCondition": {
"type": "metric",
"metricSource": "datadog",
"query": "avg:checkout.error_rate{service:payments-api}",
"comparator": ">",
"threshold": 2.0
}
}
Warning: Running a Gremlin attack with no halt condition beyond its fixed duration, especially in production, is a destructive default — a fixed-duration attack still runs to completion even if it's already causing real customer impact partway through. Always pair a duration limit with a metric-based halt condition (or use Gremlin's manual "Halt" action as an immediately-available backup, never the sole safeguard).
Compose a Scenario for a multi-step failure sequence, chaining attacks with delays between them to simulate a realistic compound failure (e.g., degraded network to a dependency, followed by a pod kill on the retry-exhausted service):
# Gremlin Scenario definition (simplified structure)
name: payments-dependency-degradation-then-restart
steps:
- type: attack
attack:
type: latency
target: { labels: { app: payments-api }, exact: 1 }
args: { delay: 300, hostnames: [fraud-check.internal] }
delayBeforeNextStep: 120
- type: attack
attack:
type: shutdown
target: { labels: { app: payments-api }, exact: 1 }
args: { delay: 0 }
Use Scenarios specifically for compound failure modes worth testing together (e.g., "does the retry backoff behavior under dependency latency make things worse when combined with losing a replica"), not as a substitute for the simpler single-attack steps above.
Use the Gremlin Terraform provider to version-control recurring attacks/scenarios (e.g., a scheduled monthly game-day scenario) alongside other infrastructure-as-code, instead of only ever click-configuring them in the web UI:
resource "gremlin_scenario" "monthly_payments_gameday" {
name = "payments-api-monthly-gameday"
hypothesis = "checkout success rate stays >= 99.5% during a single replica loss combined with dependency latency"
steps = [ /* ... */ ]
}
--target-exact, a labeled subset), never Gremlin's broadest "all
matching" default, especially outside of staging.Symptom: An attack is launched against "all containers matching
this label" with no exact count, and it ends up degrading the entire
service fleet instead of the single instance intended.
Fix: Always set an explicit --target-exact count or a bounded
percentage (step 2) — never rely on a label selector alone to bound
blast radius, since the number of matching targets can be larger (or
grow) beyond what was intended at attack-definition time.
Symptom: A network-latency attack is scoped by target container but
not by destination hostname, and it ends up delaying all of that
service's outbound traffic (including calls unrelated to the
dependency being tested), causing broader impact than intended.
Fix: Scope network attacks with --hostnames/port filters (step 4)
to the exact dependency under test, not the target's entire egress
traffic.
Symptom: A resource attack runs its full fixed duration even though the service's error rate spiked well before the timer ended, because no halt condition beyond duration was configured. Fix: Always configure a metric-based halt condition alongside the duration (step 5) — a duration limit alone only bounds how long the attack runs, not whether it should stop early due to real impact.
Symptom: A team builds an elaborate multi-step Scenario for their first-ever Gremlin experiment, and when it fails, it's unclear which of the several chained attacks actually caused the problem. Fix: Start with single, isolated attacks to validate one assumption at a time (steps 2-4); reserve Scenarios (step 6) for compound failure modes only after the individual attack types involved have already been validated separately.
Symptom: Attacks and scenarios are all configured through the web UI by whoever happened to set them up, and nobody else on the team knows what's currently scheduled or how it's scoped. Fix: Move recurring/scheduled attacks to the Gremlin Terraform provider (step 7) so they're versioned, reviewable, and visible to the whole team like any other infrastructure change.
Scenario: The payments-api team, running on Kubernetes with the
Gremlin agent already installed as a DaemonSet, wants to validate the
same replica-loss resilience hypothesis used in the generic chaos skill's
worked example, but using Gremlin instead of Chaos Mesh, and additionally
test it combined with downstream latency.
shutdown state attack targets
exactly 1 of 3 payments-api pods (--target-exact 1), with a halt
condition on checkout.error_rate > 2%. Result: passes, matching the
earlier Chaos Mesh result — same underlying redundancy assumption,
validated with a different tool.latency network attack
injects 300ms toward fraud-check.internal only (not blackholing all
egress), again on 1 pod, halt condition on the same error-rate metric.
Result: fails — same missing circuit-breaker timeout finding as
before, now confirmed cross-tool.gremlin_scenario Terraform
resource and scheduled to re-run monthly as part of the team's
recurring game-day cadence defined in
chaos-engineering-and-resilience-testing.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin iac-automation-skills14 skills in this plugin
/ansible-playbook-and-role-designDesigns and safely runs Ansible playbooks, roles, and inventories for configuration management, including idempotent task design, Ansible Vault for secrets, and choosing config-management (Ansible) versus provisioning (Terraform/CloudFormation) for a given change. Use when the user asks to "write an Ansible playbook/role for X," "structure an Ansible inventory across environments," "make this task idempotent," "encrypt secrets with Ansible Vault," "dry-run a playbook before production," or "should this be Ansible or Terraform."
/aws-cloudformation-templatesAuthors and safely operates AWS CloudFormation templates (YAML/JSON), including stacks, change sets, nested and cross-stack references, StackSets for multi-account/multi-region deployment, and drift detection. Use when the user asks to "write a CloudFormation template for X," "structure nested CloudFormation stacks," "deploy the same stack across AWS accounts/regions," "review a CloudFormation change set before applying," "detect/reconcile drift on a stack," or "migrate/compare CloudFormation with Terraform" for an AWS-native IaC choice.
/chef-puppet-saltstack-legacy-config-managementProvides a comparative overview of Chef, Puppet, and SaltStack for teams maintaining existing legacy configuration-management estates alongside or instead of Ansible — agent-based pull architecture, DSL/resource models (Chef recipes/cookbooks, Puppet manifests/catalogs, Salt states/pillars), and a candid assessment of where each still earns its keep in a modern enterprise versus where it's inertia. Use when the user asks to "maintain this existing Chef/Puppet/Salt estate," "write a Chef recipe/Puppet manifest/Salt state," "should we migrate off Puppet to Ansible," "why is our Puppet run applying a change we didn't expect," or "compare Chef vs. Puppet vs. SaltStack."
/feature-flag-configuration-launchdarkly-and-unleashDesigns and operates feature flag configuration with LaunchDarkly or Unleash, covering flag lifecycle (create, target, roll out, retire), kill-switch patterns for fast incident mitigation without a redeploy, targeting/segmentation rules, and cleaning up stale flag debt before it accumulates into unreadable conditional logic. Use when the user asks to "add a feature flag for X," "set up a kill switch for this feature," "configure LaunchDarkly/Unleash targeting rules," "roll out a flag gradually by percentage," "clean up old feature flags," or "should we use LaunchDarkly or self-host Unleash."
/infrastructure-post-deployment-validation-and-smoke-testingVerifies that a Terraform apply, CloudFormation deploy, or Ansible playbook run actually produced working infrastructure — resource existence and configuration checks, connectivity/health smoke tests, and automated post-apply assertions — rather than treating a clean "apply succeeded" exit code as proof the system works. Use when the user asks to "verify this deployment actually worked," "write a smoke test after terraform apply/cloudformation deploy," "check the resource is actually reachable/configured correctly post-deploy," "add post-deployment validation to the pipeline," or "our apply succeeded but the service is down."
/makefile-authoring-and-validationAuthors Makefiles as a build/automation entry point for ops tasks — `.PHONY` target conventions, dependency graphs between targets, variable/default handling, and self-documenting `help` targets — and validates them with `make -n` (dry-run) and `checkmake`/shellcheck-style linting before they're relied on in CI or by other engineers. Use when the user asks to "write a Makefile for this project," "add a build/lint/ test target to the Makefile," "why does `make` rebuild everything every time," "make targets phony," or "lint/validate this Makefile."
Other plugins' skills for the same job