clean

clean is a skill for Claude Code, Codex from mystilleef/spae-framework. It costs 13 tokens per session (852 once invoked), scanned C, original, MIT.

A code-cleaning workflow that runs purification and refactoring agents one after another on selected files or folders.

In plain words
What is it for?
Use it to remove code smells and refactor target code through repeated automated passes.
Why use it?
It turns repeated cleanup passes into a controlled process and stops when no further changes are found or an error occurs.

Skill for Claude CodeCodex

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/mystilleef/spae-framework/clean
Any agent
npx skills add mystilleef/spae-framework --skill clean
Clone the repo
git clone --depth 1 https://github.com/mystilleef/spae-framework

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mystilleef/spae-framework/clean.svg)](https://agentmods.dev/skills/mystilleef/spae-framework/clean)
Your own site
<a href="https://agentmods.dev/skills/mystilleef/spae-framework/clean"><img src="https://agentmods.dev/badge/skills/mystilleef/spae-framework/clean.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 852 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original 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 $0.00013 $0.00852
Opus 5 $0.00006 $0.00426
Sonnet 5 $0.00003 $0.00170
Haiku 4.5 $0.00001 $0.00085

Measured 3d ago against content hash d2ef839aaecd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

clean scanned grade C with 1 finding 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 3d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- prettier-ignore-start -->
skills/clean/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clean

When to use

  • The user wants to clean smelly code autonomously using the purify and refactor agents.

Goal

  • Run purification and refactoring subagents sequentially to clean target code.

Input

  • Accept optional arguments (file or folder paths).

Workflow

  1. Purification Loop:
    • Immediately use the subagent tool to spawn a purify subagent (pass optional arguments).
    • Await purification result.
    • If subagent returns No Changes status, exit loop and proceed.
    • On Failed status or any process failure, halt immediately and surface the error.
    • Loop back to spawn another purify subagent if the previous pass returns Complete.
  2. Refactoring Loop:
    • Immediately use the subagent tool to spawn a refactor subagent (pass optional arguments).
    • Await refactoring result.
    • If subagent returns No Changes status, exit loop and finish.
    • On Failed status or any process failure, halt immediately and surface the error.
    • Loop back to spawn another refactor subagent if the previous pass returns Complete.

Directives

  • Always use the subagent tool for subagent invocation.
  • Pass the optional argument verbatim to both subagents; never read or expand file-path arguments.
  • Rely on subagent status blocks to direct the loop.
  • Halt immediately on subagent Failed status or any process failure (crash, timeout, AgentError).
  • List of agents permitted to invoke:
    • purify
    • refactor

Constraints

  • Restrict your activities to:
    • Using the subagent tool to spawn agents.
    • Using agent results to direct the loop or advance the workflow.
  • Perform orchestration only; never edit codebase files, tests, or documentation.
  • Operate strictly in read-only mode.
  • Perform purification to completion first, before starting refactoring.
  • Never interleave purification with refactoring.
  • Never run subagents in parallel or concurrently.
  • Never activate skills.
  • Never invoke agents outside the permitted list.
  • Never prompt the user for decisions mid-run; let blockers halt execution.
  • Never perform activities beyond subagent invocation, state tracking, and reporting.

Read the full file on GitHub · 114 lines

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. 3d ago First seen · 114 lines · 13 tokens per session scan C d2ef839aaecd

Subscribe to this mod's changes

clean is a skill published in the GitHub repository mystilleef/spae-framework (1 stars, last pushed 29d ago), licensed MIT. It adds 13 tokens to every session and 852 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

exploit-xss

Cross-site scripting (XSS) vulnerability detection and exploitation. Supports reflected XSS, stored XSS, DOM-based XSS, and blind XSS testing. Use this skill when user mentions XSS, cross-site scripting, script injection, or needs to test JavaScript injection in parameters, forms, headers, or DOM sources.

crazyMarky/pentest-skills · 71 tokens

results-storage

SQLite-based persistent storage and reporting system for penetration testing results. Use this skill when user needs to store scan results, query vulnerabilities, generate reports, or manage pentest data across sessions.

crazyMarky/pentest-skills · 40 tokens

exploit-sqli

SQL injection detection and exploitation using sqlmap, manual techniques, and custom payloads. Use this skill when user needs to test for SQL injection vulnerabilities, extract database information, or exploit SQLi in parameters, headers, or cookies.

crazyMarky/pentest-skills · 51 tokens

recon-dir-scan

Directory and file enumeration using ffuf, gobuster, dirsearch, and feroxbuster. Use this skill when user needs to discover hidden directories, enumerate files, find backup files, or map application structure through path fuzzing.

crazyMarky/pentest-skills · 52 tokens

recon-fingerprint

Web fingerprinting and WAF detection using wafw00f, whatweb, nuclei, and httpx. Use this skill when user needs to identify web technologies, detect WAF/CDN, analyze server headers, or fingerprint web applications and frameworks.

crazyMarky/pentest-skills · 55 tokens

recon-subdomain

Subdomain enumeration and DNS reconnaissance using subfinder, amass, dnsx, and other tools. Use this skill when user needs to discover subdomains, perform DNS enumeration, gather DNS records, or find hidden subdomains of a target domain.

crazyMarky/pentest-skills · 54 tokens