Agent skill
Terrashark
Prevent Terraform/
New to this? An agent skill is a file of instructions your AI assistant follows for one job. The text above is written for the assistant. How to use a skill
- It links to other files in its repo. Open the original to see them.
What it does
Terrashark is an operations skill from LukasNiessen/
In short, it guides your assistant through setting up and running software safely.
The file is 86 lines long and is set out in parts such as “Capture execution context”, “Diagnose likely failure mode(s)”, “Load only the relevant reference file(s)” and “Propose fix path with explicit risk controls”.
It is plain instructions, with no code to run.
When to use it
Reach for it when you are deploying, configuring or watching a service.
It points to other files in its repo, so open the original to read those too.
It does not ask for special tools.
Safety check
Our checker read all 86 lines before we listed it.
It found no attack techniques, no hidden text and no steps that switch off your assistant's safety or send your data away.
It did flag one thing to know, listed above.
The text links to no outside sites.
It is shared under the MIT license.
Still read it before you use it, like any instructions you give your AI.
Open in the appOriginal on GitHub
What is inside
- 1) Capture execution context
- 2) Diagnose likely failure mode(s)
- 3) Load only the relevant reference file(s)
- 4) Propose fix path with explicit risk controls
- 5) Generate implementation artifacts
- 6) Validate before finalize
- 7) Output contract
How to use it
- Claude Code: save the text as
.claude/skills/terrashark/SKILL.mdin your project. Claude reads it when a task needs it. - Claude, ChatGPT or Gemini: tap Copy skill and paste it into the chat. It arrives with a short line asking the assistant to use it.
- Cursor and other agents: add it to the project rules or instructions.
Read the full guide to using an agent skill
Want your own? How to write an agent skill that works
The full skill
--- name: terrashark description: "Prevent Terraform/OpenTofu hallucinations by diagnosing and fixing failure modes: identity churn, secret exposure, blast-radius mistakes, CI drift, and compliance gate gaps. Use when generating, reviewing, refactoring, or migrating IaC and when building delivery/testing pipelines." --- # Terrashark: Failure-Mode Workflow for Terraform/OpenTofu Run this workflow top to bottom. ## 1) Capture execution context Record before writing code: - runtime (`terraform` or `tofu`) and exact version - provider(s), target platform, and state backend - execution path (local CLI, CI, HCP Terraform/TFE, Atlantis) - environment criticality (dev/shared/prod) If unknown, state assumptions explicitly. ## 2) Diagnose likely failure mode(s) Select one or more based on user intent and risk: - identity churn: resource addressing instability, refactor breakage - secret exposure: secrets in state, logs, defaults, artifacts - blast radius: oversized stacks, weak boundaries, unsafe applies - CI drift: version mismatch, unreviewed applies, missing artifacts - compliance gate gaps: missing policies/approvals/audit controls ## 3) Load only the relevant reference file(s) Primary references: - `references/identity-churn.md` - `references/secret-exposure.md` - `references/blast-radius.md` - `references/ci-drift.md` - `references/compliance-gates.md` Supplemental references (only when needed): - `references/testing-matrix.md` - `references/quick-ops.md` - `references/examples-good.md` - `references/examples-bad.md` - `references/examples-neutral.md` - `references/coding-standards.md` - `references/module-architecture.md` - `references/ci-delivery-patterns.md` - `references/security-and-governance.md` - `references/do-dont-patterns.md` - `references/mcp-integration.md` Conditional references (CRR; load only on detected signals): - `references/conditional/backend-state-safety.md` (backend is `s3`, `azurerm`, `gcs`, `remote`, `cloud`, `pg`, `consul`, or `local`, or task mentions backend migration, locking, state backup, or restore) - `references/conditional/trusted-modules.md` (provider is `aws`, `azurerm`, `google`, `oci`, or `ibm`) Do not load multiple conditional references unless the task spans multiple detected backends, providers, or tools. ## 4) Propose fix path with explicit risk controls For each fix, include: - why this addresses the failure mode - what could still go wrong - guardrails (tests, approvals, rollback) ## 5) Generate implementation artifacts When applicable, output: - HCL changes (typed vars, stable keys, bounded versions) - migration blocks (`moved`, import strategy) - CI pipeline updates (plan/apply separation, artifacts, policy checks) - compliance controls (approvals, policy rules, evidence paths) When a trusted registry module covers the requested resource and the user has not asked for raw HCL, default to that module with an exact `version` pin (see `references/conditional/trusted-modules.md`). ## 6) Validate before finalize Always provide command sequence tailored to runtime and risk tier. Never recommend direct production apply without reviewed plan and approval. ## 7) Output contract Return: - assumptions and version floor - selected failure mode(s) - chosen remediation and tradeoffs - validation/test plan - rollback/recovery notes for destructive-impact changes
Copyright (c) LukasNiessen and contributors.
Published under the MIT License, which you can read in full there.
Shown as published on GitHub, with credit and a link to the original.
Read it before you use it.
More skills
Algorithmic art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
Canvas design
Create beautiful visual art in .png and .pdf documents using design philosophy.
API and interface design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface.
Try it in your browser
Today's AI news, one card per swipe.
Free to start.