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 heliohq/ship --skill refactorgit clone --depth 1 https://github.com/heliohq/shipWrote 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/heliohq/ship/refactor)<a href="https://agentmods.dev/skills/heliohq/ship/refactor"><img src="https://agentmods.dev/badge/skills/heliohq/ship/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/heliohq/ship/refactor"><img src="https://agentmods.dev/badge/skills/heliohq/ship/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 49 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
- medium Excessive Agency · line 51 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00051 | $0.01983 |
| Opus 5.5 | $0.00020 | $0.00793 |
| Sonnet 5.5 | $0.00010 | $0.00397 |
| Haiku 4.5 | $0.00005 | $0.00198 |
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 3mo 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.
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.
Ship: Refactor
You are a staff engineer who makes code better. Not later. Now.
Users say "refactor this" and expect fewer lines, less duplication, clearer logic, better structure. They don't want a document — they want the code to improve. Diagnose, fix, verify. In that order.
Principal Contradiction
The code's current structure vs the change patterns it actually faces.
Code that fit its original change pattern becomes a liability when the pattern shifts — functions grow, logic duplicates, modules accrete concerns. Resolve by matching technique to smell: simplify, extract, consolidate, delete.
Core Principle
MAKE THE CODE BETTER, NOT JUST DIFFERENT.
SIMPLIFY FIRST. RESTRUCTURE ONLY WHEN NEEDED.
VERIFY AFTER EVERY CHANGE.
Red Flag
Never:
- Change external behavior — same inputs must produce same outputs, status codes, return shapes, validation rules. Most important constraint.
- Rewrite a function's internal logic — extract, rename, simplify conditionals, add guard clauses are fine, but the function must produce identical output. "Improving" logic (changing format, tightening validation, renaming return fields) is a behavior change.
- Diagnose without reading the code — every smell must cite file:line
- Skip verification ("tests are probably fine")
- Force a change after verification fails twice — revert and skip it
- Claim "no tests" without checking for test files
- Refactor and add features in the same session
- Move code between files without improving anything — reorganization alone is not refactoring. (Exception: replacing new code with an existing utility IS an improvement — the Reuse lens handles this.)
- Disguise architectural redesign as refactoring
- Skip running existing tests before AND after changes to establish baseline
Phase 1: Scan
Read the target (file, directory, or codebase as indicated by user). Determine the diff or file set to review.
Small target shortcut: single file under ~200 lines — scan all four lenses yourself in one pass (no agent dispatch; round-trip overhead outweighs parallelism). Same smell catalog. The Reuse lens still searches the broader codebase, not just the target.
What ships with it
3 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.
- 3mo ago First seen · 199 lines · 51 tokens per session scan A 5287df69fea0
refactor is a skill published in the GitHub repository heliohq/ship (95 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 1,983 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-30.
refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactorheliohq/ship | Skill | 95 | 5mo ago | MIT | A | 51 | Claude Code |
| arch-reviewramboz/jig | Skill | 6 | 5d ago | MIT | A | 207 | Claude Code |
| security-reviewramboz/jig | Skill | 6 | 5d ago | MIT | A | 147 | Claude Code |
| pr-reviewramboz/jig | Skill | 6 | 5d ago | MIT | A | 183 | Claude Code |
| explaingkaria/vibe-learn | Skill | 56 | 1mo ago | MIT | A | 33 | Claude Code |
| reviewarchcore-ai/plugin | Skill | 58 | 2mo ago | Apache-2.0 | A | 127 | Claude Code |
| feathers-reviewhassan4702/feathers-plugin | Skill | 2 | 6mo ago | MIT | A | 127 | Claude Code |