Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add bregman-arie/devops-sre-skills --skill recover-state-lockgit clone --depth 1 https://github.com/bregman-arie/devops-sre-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bregman-arie/devops-sre-skills/recover-state-lock)<a href="https://agentmods.dev/skills/bregman-arie/devops-sre-skills/recover-state-lock"><img src="https://agentmods.dev/badge/skills/bregman-arie/devops-sre-skills/recover-state-lock/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bregman-arie/devops-sre-skills/recover-state-lock"><img src="https://agentmods.dev/badge/skills/bregman-arie/devops-sre-skills/recover-state-lock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.00413 |
| Opus 5.5 | $0.00007 | $0.00165 |
| Sonnet 5.5 | $0.00003 | $0.00083 |
| Haiku 4.5 | $0.00002 | $0.00041 |
Grade A, and why
Recover Terraform State Lock scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
When to use
Use when Terraform reports the state is locked and operations cannot proceed.
Preconditions
- You have access to the workspace and can identify the last run/operator.
- You understand the blast radius of forcing an unlock.
Procedure
- Determine whether a Terraform operation is currently running (CI runner, TFC/TFE run, local terminal).
- Identify lock metadata (who/when/operation).
- If a run is active, wait or stop it cleanly.
- If the lock is stale, coordinate and force-unlock only after confirming no active writers.
- Run a plan to confirm state consistency.
Decision points
- Active run present: do not force-unlock.
- Stale lock (no active run, old timestamp): force-unlock may be appropriate.
- Repeated lock issues: investigate backend connectivity and CI cancellation behavior.
Verification
- A new
terraform plancompletes successfully. - No concurrent runs are writing to state.
Rollback / undo
- If state becomes inconsistent, restore from backend versioning/snapshots.
- If a partial apply occurred, reconcile with a fresh plan and targeted remediation.
Escalation
- Escalate to platform/IaC owners if unlock requires backend admin privileges.
- Escalate if state corruption is suspected.
Examples
terraform plan
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 66 lines · 17 tokens per session scan A 12b0d209d5fe
Recover Terraform State Lock is a skill published in the GitHub repository bregman-arie/devops-sre-skills (30 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 413 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Recover Terraform State Lock compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Recover Terraform State Lockbregman-arie/devops-sre-skills | Skill | 30 | 8mo ago | Apache-2.0 | A | 17 | Claude Code, Codex |
| auditing-terraform-infrastructure-for-securityxalgorix/xalgorix | Skill | 1.5k | 2d ago | Apache-2.0 | A | 59 | Claude Code, Codex |
| implementing-infrastructure-as-code-security-scanningxalgorix/xalgorix | Skill | 1.5k | 2d ago | Apache-2.0 | A | 81 | Claude Code, Codex |
| k8s-incident-triageinitializ/forge | Skill | 223 | 10d ago | Apache-2.0 | A | 41 | Claude Code, Codex |
| huawei-cloud-apig-instance-managementhuaweicloud/huaweicloud-devkit | Skill | 71 | today | Apache-2.0 | A | 206 | Claude Code |
| huawei-cloud-deployment-task-managementhuaweicloud/huaweicloud-devkit | Skill | 71 | today | Apache-2.0 | A | 203 | Claude Code |
| huawei-cloud-waf-aad-rule-managementhuaweicloud/huaweicloud-devkit | Skill | 71 | today | Apache-2.0 | A | 338 | Claude Code |