clean-run-state

clean-run-state is a skill for Claude Code from appsec-foundry/appsec-advisor. It costs 58 tokens per session (1,753 once invoked), scanned A, original, no licence file.

A cleanup tool for leftover state files from a crashed or abruptly stopped threat-model assessment. It checks for an active lock before removing stale run-state files.

In plain words
What is it for?
Use it when threat modeling appears to run forever after an interrupted session.
Why use it?
It clears a stuck run that the Claude Code interface still shows as scanning after a session crash.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the appsec-advisor plugin — 27 skills, 2 commands, 23 agents, 8 hooks shipped together

Install

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.

agentmods
npx agentmods add skills/appsec-foundry/appsec-advisor/clean-run-state
Any agent
npx skills add appsec-foundry/appsec-advisor --skill clean-run-state
Clone the repo
git clone --depth 1 https://github.com/appsec-foundry/appsec-advisor

Made for: Claude Code.

Or install appsec-advisor, the plugin that ships this one along with the rest of its 27 skills, 2 commands, 23 agents, 8 hooks.

Wrote 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.

agentmods badge for clean-run-state

README.md
[![agentmods](https://agentmods.dev/badge/skills/appsec-foundry/appsec-advisor/clean-run-state.svg)](https://agentmods.dev/skills/appsec-foundry/appsec-advisor/clean-run-state)
Your own site
<a href="https://agentmods.dev/skills/appsec-foundry/appsec-advisor/clean-run-state"><img src="https://agentmods.dev/badge/skills/appsec-foundry/appsec-advisor/clean-run-state.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.01753
Opus 5 $0.00029 $0.00877
Sonnet 5 $0.00012 $0.00351
Haiku 4.5 $0.00006 $0.00175

Measured 6d ago against content hash 0fde74e6b3fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

clean-run-state 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 6d 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.

skills/clean-run-state/SKILL.md · 181 lines

The source is not reproduced here

A licence we could not identify

The repository carries a LICENSE file, but it is custom or dual enough that GitHub cannot name it and neither can this catalogue. Unknown terms are not permission, so the body is not copied here. Read the licence at the source and decide for yourself.

Read it on GitHub

Changes

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.

  1. 6d ago First seen · 181 lines · 58 tokens per session scan A 0fde74e6b3fe

Subscribe to this mod's changes

clean-run-state is a skill published in the GitHub repository appsec-foundry/appsec-advisor (16 stars, last pushed today), with no licence file. It adds 58 tokens to every session and 1,753 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

owasp-top-10-web

Reviews web applications against the OWASP Top 10:2021 vulnerability categories. Auto-invoked when reviewing web application code, server configurations, or when a user asks for a general security review of a web application. Produces structured findings mapped to A01-A10 with CWE references, severity ratings, and…

UnitOneAI/SecuritySkills · 73 tokens

adr-skill

Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses…

Agent-Threat-Rule/agent-threat-rules · 89 tokens

terraform-skill

Terraform infrastructure as code best practices.

Agent-Threat-Rule/agent-threat-rules · 10 tokens

varlock-claude-skill

Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits.

Agent-Threat-Rule/agent-threat-rules · 28 tokens

security-expert

Expert-level application security, OWASP Top 10, penetration testing, and security best practices. Use when the user mentions OWASP, pentesting, appsec, vulnerability, encryption, or authentication, or when the task involves Security Principles, OWASP Top 10, Security Domains, or Broken Access Control.

personamanagmentlayer/pcl · 66 tokens

pypict-skill

Pairwise test generation.

Agent-Threat-Rule/agent-threat-rules · 10 tokens