trove-terraform
Terraform/OpenTofu conventions and best practices. Auto-activates on .tf files. Covers module structure, state management, and security patterns.
- License 许可
- MIT
- 所属仓库
- bravew/trove
- 最近更新
- 2026-11-12
- Stars
- ★ 10
- Forks
- 1
01 前言 Front Matter
- name
- trove-terraform
- paths
- [ "**/*.tf", "**/*.tfvars" ]
- metadata
- { "trove-category": "servers-cloud", "trove-category-label": "Servers & cloud" }
- description
- Terraform/OpenTofu conventions and best practices. Auto-activates on .tf files. Covers module structure, state management, and security patterns.
03 SKILL.md 正文
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills -->
Session Init
This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.
Terraform Conventions
File Organization
module/
├── main.tf # Primary resources
├── variables.tf # Input variables with descriptions
├── outputs.tf # Output values
├── versions.tf # Provider and terraform version constraints
├── locals.tf # Local values and computed expressions
└── data.tf # Data sources
Naming
- Resources:
snake_case(e.g.,aws_ecs_service.backend) - Variables:
snake_casewith descriptive names - Outputs:
snake_case, prefixed with module purpose
Best Practices
- Pin provider versions with
~>constraint - Use
for_eachovercountfor resources with identity - Tag all resources with
Project,Environment,ManagedBy - Store state in S3 with DynamoDB locking
- Use separate state files per environment
AI Gotchas
- Destroy risks: Always check
terraform planoutput before apply - State drift: Use
terraform importfor existing resources, never manual state edits - Sensitive values: Mark variables as
sensitive = true, never output secrets - Modules: Pin module versions; don't use
ref = mainin production
04 同仓库更多 Skills
using-trove
Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.
trove-write-skill
Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.
trove-worktree
Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.
trove-why
Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for "why does X work this way", "why did we pick Y", regressions, and postmortems. Use trove-explain for how it works now.
trove-verify
Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.
trove-unslop
Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.