purify

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

An agent that simplifies existing code while preserving its intended behavior. It removes dead code, repeated structures, unnecessary abstractions, and non-idiomatic patterns; KISS means keeping things simple, and YAGNI means avoiding code for needs that do not yet exist.

In plain words
What is it for?
Use it on specified files or folders, or on current repository changes, to remove safe complexity and verify the result with tests.
Why use it?
It reduces code that is harder to read, maintain, or run than necessary. It can also strengthen tests when simplification exposes missing coverage.

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/purify
Any agent
npx skills add mystilleef/spae-framework --skill purify
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 purify

README.md
[![agentmods](https://agentmods.dev/badge/skills/mystilleef/spae-framework/purify.svg)](https://agentmods.dev/skills/mystilleef/spae-framework/purify)
Your own site
<a href="https://agentmods.dev/skills/mystilleef/spae-framework/purify"><img src="https://agentmods.dev/badge/skills/mystilleef/spae-framework/purify.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,836 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.00023 $0.01836
Opus 5 $0.00012 $0.00918
Sonnet 5 $0.00005 $0.00367
Haiku 4.5 $0.00002 $0.00184

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

Security

Grade C, and why

purify 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/purify/SKILL.md · 199 lines

How it starts

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

Purification agent

When to use

  • Code contains visible waste, ceremony, duplication, or dead paths.
  • Existing implementation looks correct but heavier than necessary.
  • Performance, readability, or maintainability can improve without changing intended behavior.

Goal

  • Remove KISS, YAGNI, Idiomatic, and Hygiene violations: dead code, redundant abstractions, over-engineering, non-idiomatic patterns, and hygiene debt.
  • Reduce code to the smallest clear, idiomatic, maintainable form.
  • Improve efficiency only through safe, verified changes.
  • Strengthen tests when simplification or optimization exposes coverage gaps.

Input

Determine scope by the first available source:

  • Files or folders provided by the user.
  • Current changes in the repository.

Abort if no scope exists.

Current changes: staged and unstaged edits, deletions, and renames of tracked files, plus new untracked files. Requires a versioned project, abort with a clear message if none detected.

Testing

See references/testing-guide.md for test structure, isolation, mocking, assertion, and performance standards.

Shell commands

See references/shell-command-guide.md for command safety, timeouts, redirects, and non-interactive environment directives.

Cleanup

See references/cleanup-guide.md for the self-introduced-artifact checklist and diff-only audit scope.

Workflow

  1. GATE—Survey scope and establish baseline. Inspect target code, tests, build commands, and recent changes. Detect waste using the KISS, YAGNI, Idiomatic, and Hygiene sections of references/refactoring-guide.md. Read references/shell-command-guide.md. Run relevant tests; identify why verification can't run if tests don't pass.
    • If scope resolves to current changes, the project contains TypeScript or JavaScript sources, and fallow resolves (fallow --version): run git --no-pager diff --no-ext-diff HEAD | fallow audit -f json -q --diff-stdin and treat confirmed findings as additional dead-code signal. Treat all findings as unverified candidates; apply judgment during PLAN. Skip silently if fallow cannot be found or the project lacks TS/JS sources.
    • Exit immediately if the survey finds none of: dead code, redundant abstractions, unused helpers, over-engineered constructs, non-idiomatic patterns, or hygiene debt. Emit Result: No Changes via the template below and halt.
  2. ORIENT—State goal and scope in one sentence. Name what won't change: behavior, public interfaces, and feature scope.
  3. PLAN—Read references/testing-guide.md and references/cleanup-guide.md. Declare minimal changes: which violations to remove, which files to touch, and in what order. Check ambiguous or risky slices before acting.
  4. ACT—Execute only what PLAN declared. Nothing more.
    • Remove dead code, unused branches, redundant state, obsolete helpers, and needless comments.
    • Inline thin wrappers, merge duplicate paths, simplify conditions, reduce parameters, and replace overbuilt abstractions.
    • Improve hot or wasteful paths only when output and intended behavior stay unchanged.
    • Add or update tests only when needed to lock behavior around modified code.
  5. VERIFY—Loop over every criterion in Verification:
    • Run relevant tests after each ACT step.
    • Audit the task's own git diff/git status against the Self-cleanup checklist in references/cleanup-guide.md; remove every self-introduced artifact before proceeding.
    • For each unmet criterion: backtrack to last known-good state, return to ACT, and re-enter VERIFY.
    • Exit only when all criteria pass.
    • Halt only for out-of-scope blockers.
  6. PERSIST—Confirm all edits written. Run final compilation or type-check where applicable.
  7. REPORT—Emit the result following the result directives and using the result template. Confirm what changed matches ORIENT.

Read the full file on GitHub · 199 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 199 lines · 23 tokens per session scan C f44049e344d6

Subscribe to this mod's changes

purify is a skill published in the GitHub repository mystilleef/spae-framework (1 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 1,836 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

architecture

Project architecture and file structure conventions for all process types. Use when: (1) Creating new files or modules, (2) Deciding where code should go, (3) Converting single-file components to directories, (4) Reviewing code for structure compliance, (5) Adding new bridges, services, agents, or workers.

iOfficeAI/AionUi · 69 tokens

testing

Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.

iOfficeAI/AionUi · 55 tokens

ahk-review

Preview a code review against ticket/objective alignment, with deep semantic (name-vs-behavior) analysis. No tasks created, no harness tracking.

enmanuelmag/agent-harness-kit · 35 tokens

ahk-triage

Triage a bug or unexpected behavior. Deep diagnostic analysis with structured report. No tasks created, no harness tracking.

enmanuelmag/agent-harness-kit · 29 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-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