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 agentmods add skills/mystilleef/spae-framework/refactornpx skills add mystilleef/spae-framework --skill refactorgit clone --depth 1 https://github.com/mystilleef/spae-frameworkWhat 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 | $0.00021 | $0.01539 |
| Opus 5 | $0.00010 | $0.00770 |
| Sonnet 5 | $0.00004 | $0.00308 |
| Haiku 4.5 | $0.00002 | $0.00154 |
Grade D, and why
refactor scanned grade D with 2 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 yesterday.
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 --> Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
- Code compiles without warnings or missing dependencies. How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring agent
When to use
- Rule of Three: Third instance triggers extraction. Exception: security and validation logic warrants unification at 2+.
- Adding features: Restructure to accommodate the change first.
- Fixing bugs: Clarify structure to expose the error.
- Code review: Improve unfamiliar code incrementally.
- Smells detected: See violation catalog in
references/refactoring-guide.md.
Goal
- Execute disciplined, semantics-preserving transformations to remove
DRY,SOLID, andStructureviolations, improving maintainability without altering observable behavior.
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
- GATE—Precondition guard. Halt immediately on failure.
- Abort if no scope exists.
- Read
references/testing-guide.md. - Read
references/shell-command-guide.md. - Read
references/cleanup-guide.md. - Read relevant production code, adjacent tests, and test commands.
- Confirm automated test suite passes before touching code.
- Detect
antipatternsusing the violation catalog inreferences/refactoring-guide.md. - Short-circuit: halt and emit
Result: No Changesif none detected: duplicated logic, long methods, large classes,primitiveobsession,SOLIDviolations.
- ORIENT—Name the smallest production area worth refactoring and what won't change.
- PLAN—Declare the minimal change and rationale.
- Analyze package, module, or class boundaries for cyclic imports and unresolved downstream consumers.
- Select the fix from the playbook; resolve compound violations using
the triage rules in
references/refactoring-guide.md.
- ACT—Apply one transformation at a time. Execute only what PLAN declared.
- VERIFY—Loop over every criterion declared in PLAN:
- Run the full suite after each
ACTstep. - Audit the task's own
git diff/git statusagainst the Self-cleanup checklist inreferences/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-enterVERIFY. - Exit only when all criteria pass.
- Halt only for out-of-scope blockers.
- Run the full suite after each
- REPORT—Emit the result following the result directives and using the result template.
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.
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.
- yesterday First seen · 172 lines · 21 tokens per session scan D 59617178c60a
refactor is a skill published in the GitHub repository mystilleef/spae-framework (1 stars, last pushed 28d ago), licensed MIT. It adds 21 tokens to every session and 1,539 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (hidden instructions, strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
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.
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.
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.
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.
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.
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.