terrashark
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.
中文简介正在准备中。当前显示原文说明。
包含的文件(73)
- SKILL.md3.3 KB
- .claude-plugin/marketplace.json371 B
- .claude/settings.local.json66 B
- .github/CODEOWNERS16 B
- .github/dependabot.yml346 B
- .github/FUNDING.yml23 B
- .github/PULL_REQUEST_TEMPLATE.md1007 B
- .github/workflows/deploy-docs.yml1.1 KB
- .github/workflows/stale.yml1.4 KB
- .github/workflows/validate.yml2.9 KB
- .gitignore27 B
- assets/logo.png193.3 KB
- CHANGELOG.md18 B
- CODE_OF_CONDUCT.md943 B
- CONTRIBUTING.md1.7 KB
- docs/.gitignore21 B
- docs/advanced/comparison.md3.6 KB
- docs/advanced/token-efficiency.md3.1 KB
- docs/architecture/backend-state-safety.md4.5 KB
- docs/architecture/coding-standards.md3.6 KB
- docs/architecture/module-architecture.md3.0 KB
- docs/architecture/structure-and-state.md2.1 KB
- docs/book.json660 B
- docs/changelog.md837 B
- docs/contributing.md2.1 KB
- docs/core-concepts/failure-modes.md4.9 KB
- docs/core-concepts/philosophy.md6.4 KB
- docs/core-concepts/workflow.md4.9 KB
- docs/examples/bad-patterns.md2.7 KB
- docs/examples/do-dont-checklist.md3.3 KB
- docs/examples/good-patterns.md3.5 KB
- docs/examples/neutral-patterns.md1.9 KB
- docs/failure-modes/blast-radius.md2.3 KB
- docs/failure-modes/ci-drift.md3.9 KB
- docs/failure-modes/compliance-gates.md3.4 KB
- docs/failure-modes/identity-churn.md4.0 KB
- docs/failure-modes/secret-exposure.md2.9 KB
- docs/getting-started/installation.md4.0 KB
- docs/getting-started/quick-start.md2.4 KB
- docs/guides/ci-delivery.md4.8 KB
- docs/guides/migration-playbooks.md2.7 KB
- docs/guides/quick-ops.md3.5 KB
- docs/guides/security-governance.md2.0 KB
- docs/guides/testing.md3.5 KB
- docs/integrations/mcp-integration.md1.4 KB
- docs/package-lock.json101.3 KB
- docs/package.json323 B
- docs/README.md3.3 KB
- docs/SUMMARY.md1.7 KB
- LICENSE1.1 KB
- PHILOSOPHY.md9.6 KB
- README.md22.6 KB
- references/blast-radius.md1.8 KB
- references/ci-delivery-patterns.md5.0 KB
- references/ci-drift.md3.6 KB
- references/coding-standards.md3.5 KB
- references/compliance-gates.md3.0 KB
- references/conditional/backend-state-safety.md4.7 KB
- references/conditional/trusted-modules.md4.8 KB
- references/do-dont-patterns.md3.1 KB
- references/examples-bad.md2.2 KB
- references/examples-good.md3.2 KB
- references/examples-neutral.md1.6 KB
- references/identity-churn.md3.8 KB
- references/mcp-integration.md1.4 KB
- references/migration-playbooks.md2.5 KB
- references/module-architecture.md2.5 KB
- references/quick-ops.md3.9 KB
- references/secret-exposure.md2.5 KB
- references/security-and-governance.md1.7 KB
- references/structure-and-state.md1.9 KB
- references/testing-matrix.md3.4 KB
- references/token-balance-rationale.md713 B
SKILL.md(原文)
安装前可以查看交给 AI 代理的指令内容。
Terrashark: Failure-Mode Workflow for Terraform/OpenTofu
Run this workflow top to bottom.
1) Capture execution context
Record before writing code:
- runtime (
terraformortofu) 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.mdreferences/secret-exposure.mdreferences/blast-radius.mdreferences/ci-drift.mdreferences/compliance-gates.md
Supplemental references (only when needed):
references/testing-matrix.mdreferences/quick-ops.mdreferences/examples-good.mdreferences/examples-bad.mdreferences/examples-neutral.mdreferences/coding-standards.mdreferences/module-architecture.mdreferences/ci-delivery-patterns.mdreferences/security-and-governance.mdreferences/do-dont-patterns.mdreferences/mcp-integration.md
Conditional references (CRR; load only on detected signals):
references/conditional/backend-state-safety.md(backend iss3,azurerm,gcs,remote,cloud,pg,consul, orlocal, or task mentions backend migration, locking, state backup, or restore)references/conditional/trusted-modules.md(provider isaws,azurerm,google,oci, oribm)
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
评价
还没有评价。欢迎分享你的使用感受。
评论
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。