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 rsmdt/the-startup --skill refactorgit clone --depth 1 https://github.com/rsmdt/the-startupWrote 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/rsmdt/the-startup/refactor)<a href="https://agentmods.dev/skills/rsmdt/the-startup/refactor"><img src="https://agentmods.dev/badge/skills/rsmdt/the-startup/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/rsmdt/the-startup/refactor"><img src="https://agentmods.dev/badge/skills/rsmdt/the-startup/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
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 →
- high System Prompt Leakage · line 53 Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
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.00020 | $0.01022 |
| Opus 5.5 | $0.00008 | $0.00409 |
| Sonnet 5.5 | $0.00004 | $0.00204 |
| Haiku 4.5 | $0.00002 | $0.00102 |
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 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.
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 — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persona
Act as a refactoring orchestrator that improves code quality while strictly preserving all existing behavior.
Refactoring Target: $ARGUMENTS
Interface
Finding { impact: HIGH | MEDIUM | LOW title: string // max 40 chars location: string // shortest unique path + line problem: string // one sentence refactoring: string // specific technique to apply risk: string // potential complications }
State { target = $ARGUMENTS perspectives = [] // from reference/perspectives.md mode: Standard | Agent Team | Dynamic Workflow baseline: string findings: Finding[] }
In scope: Code structure, internal implementation, naming, duplication, readability, dependencies. Specific techniques: nested ternaries to if/else or switch, dense one-liners to multi-line with clear steps, clever tricks to obvious implementations, abbreviations to descriptive names, magic numbers to named constants. Out of scope: External behavior, public API contracts, business logic results, side effect ordering.
Constraints
Always:
- Delegate all analysis tasks to specialist agents.
- Establish test baseline before any changes.
- Run tests after EVERY individual change.
- One refactoring at a time — never batch changes before verification.
- Revert immediately if tests fail or behavior changes.
- Get user approval before refactoring untested code.
Never:
- Change external behavior, public API contracts, or business logic results.
Reference Materials
- reference/perspectives.md — analysis perspectives
- reference/code-smells.md — smell catalog
- reference/output-format.md — output guidelines
- examples/output-example.md — output example
Workflow
1. Establish Baseline
Locate target code from $ARGUMENTS. Run existing tests to establish baseline. Read reference/output-format.md and format the baseline report accordingly.
match (baseline) { tests failing => stop, report to user coverage gaps => ask the user to choose: Add tests first (recommended) | Proceed without coverage | Cancel ready => continue }
What ships with it
12 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.
- evals/evals.json 1.9 KB
- evals/files/order-service-failing-baseline/package.json 125 B
- evals/files/order-service-failing-baseline/src/services/OrderService.js 1.4 KB runs code
- evals/files/order-service-failing-baseline/src/utils/currency.js 301 B runs code
- evals/files/order-service-failing-baseline/test/currency.test.js 803 B runs code
- evals/files/parser-nested-ternaries/package.json 118 B
- evals/files/parser-nested-ternaries/src/utils/parser.js 1.0 KB runs code
- evals/files/parser-nested-ternaries/test/parser.test.js 1.4 KB runs code
- examples/output-example.md 2.7 KB
- reference/code-smells.md 8.1 KB
- reference/output-format.md 855 B
- reference/perspectives.md 2.0 KB
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 Changed · +5 lines 6af5bff19a12
- 1mo ago First seen · 114 lines · 20 tokens per session scan A a8997dd0f721
refactor is a skill published in the GitHub repository rsmdt/the-startup (575 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 1,022 once invoked, about $0.0001 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.
Other skills, from other repositories
security-architecture-review
Reviews a design or change for security before it ships — authentication and authorization, data handling, secrets, dependencies, and the secure-development practices around it. Use this to review an architecture or pull request for security, set secure coding standards, choose or tune SAST and DAST tooling, assess a…
code-review
Conducts and responds to code review — reviewing a change for correctness, design, and risk, and evaluating review feedback received on your own work. Use this before merging, when asked to review a diff or pull request, when review feedback has arrived and needs acting on, or when feedback seems wrong and needs a…
audit-project
Run an iterative multi-agent code audit until critical and high findings are resolved. Use when the user says "audit my code", "find all the bugs", "deep code audit", "iterative review", or "review until clean".
create-pull-request
Use when asked to create or update a PR, revise its description, or link issue references to its body. Not for multi-PR stacks: use gate-and-merge. Not for releases: use git-workflow-and-versioning.
gate-and-merge
Use when landing a queue of open PRs: gate each PR, sweep its review feedback to root cause, then merge, repair, hold, or close it. Human-only.
doubt-driven
Use when a non-trivial decision sits under uncertainty and correctness matters more than speed. Not for patch review: use review. Not for plan attacks: use load-bearing-assumption-test.