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 soulcodex/agentic --skill refactorgit clone --depth 1 https://github.com/soulcodex/agenticWrote 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/soulcodex/agentic/refactor)<a href="https://agentmods.dev/skills/soulcodex/agentic/refactor"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/refactor/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/soulcodex/agentic/refactor"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00046 | $0.00526 |
| Opus 5.5 | $0.00018 | $0.00210 |
| Sonnet 5.5 | $0.00009 | $0.00105 |
| Haiku 4.5 | $0.00005 | $0.00053 |
Grade A, and why
refactor 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 1mo 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
Refactor Skill
Improve the code structure without changing external behavior.
Step 1 — Understand the Goal
Ask or infer:
- What is wrong with the current code? (too long, duplicated, wrong layer, hard to test)
- What is the desired outcome? (extracted function, renamed variable, moved to correct layer)
- Are there tests in place? (if not, write characterization tests before refactoring)
Step 2 — Establish a Safety Net
Before changing anything, verify tests exist that cover the code being refactored. If tests are missing, write characterization tests first:
- A characterization test captures current behavior (even if the behavior is wrong).
- It prevents accidental behavior changes during refactoring.
Step 3 — Apply Refactoring in Small Steps
Work in small, safe increments. After each step, verify tests still pass:
Common refactoring moves:
- Extract function/method: identify a coherent chunk of logic with a clear purpose.
- Rename: choose a name that accurately describes the thing at the current abstraction level.
- Move to correct layer: domain logic in a controller → move to use case or domain service.
- Replace conditional with polymorphism: complex switch/if chains on type → strategy pattern.
- Introduce value object: raw primitive used to represent a domain concept → wrap it.
- Remove duplication: extract shared logic to a shared function; do not abstract prematurely.
Step 4 — Verify Behavior is Unchanged
After refactoring:
- All tests pass.
- The public API (exported signatures) is unchanged.
- No new dependencies introduced.
Step 5 — Summarize
## Refactor Summary
**What changed**: [List of moves applied]
**Why**: [The design problem that was addressed]
**Tests**: [Pass / added N new characterization tests]
**Breaking changes**: None (internal only)
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.
- 1mo ago First seen · 68 lines · 46 tokens per session scan A 1e8e7a9ce836
refactor is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 526 once invoked, about $0.0002 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-31.
Other skills, from other repositories
desktop-brand-builder
Generate a branded Qwen Code desktop package from the Tauri desktop shell using a minimal brandId and logo. Use when the user wants a custom, white-label, or rebranded desktop client, installer, DMG/EXE/AppImage/deb, or one-click brand build on top of packages/desktop.
app-screenshot-debug
Drive the running termio app via AppleScript / System Events to reach a UI state (focus the window, click a sidebar project, a terminal pane, a control), capture a pixel-accurate screenshot of just that window, and read it back for visual analysis — for diagnosing layout / spacing / alignment / 'this looks ugly'…
product-research
Find and compare current FF&E candidates from a design brief, with sourced purchasing facts and optional CSV-library save. Use to research or source products; not to match from an image or pair coordinating items.
product-enrich
Enrich FF&E schedule rows with categories, colors, materials, and style tags. Use to tag, categorize, or fill those missing fields; not to research new products.
color-palette-generator
Create an HTML color palette from a mood, description, or image, with swatches, color codes, pairings, and contrast checks. Use for color schemes or brand colors.
conversational-ux
Design voice and conversational interfaces — dialog flows, error recovery, and persona. Use when the interface speaks and listens rather than being tapped. For graphical input collection, use form-design.