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 ckorhonen/swe-skills --skill refactor-opportunitiesgit clone --depth 1 https://github.com/ckorhonen/swe-skillsWrote 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/ckorhonen/swe-skills/refactor-opportunities)<a href="https://agentmods.dev/skills/ckorhonen/swe-skills/refactor-opportunities"><img src="https://agentmods.dev/badge/skills/ckorhonen/swe-skills/refactor-opportunities/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/ckorhonen/swe-skills/refactor-opportunities"><img src="https://agentmods.dev/badge/skills/ckorhonen/swe-skills/refactor-opportunities.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00100 | $0.01414 |
| Opus 5 | $0.00050 | $0.00707 |
| Sonnet 5 | $0.00020 | $0.00283 |
| Haiku 4.5 | $0.00010 | $0.00141 |
Grade A, and why
swe:refactor-opportunities 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 10d 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 — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SWE Refactor Opportunities
What This Skill Does
Use this skill to produce a concrete shortlist of small refactor tickets, not a broad cleanup strategy.
Each recommendation should already look like a ticket someone could execute without re-scoping it.
When To Use
Use this skill when the user wants:
- A shortlist of narrow refactors
- Tickets that can be handed to multiple agents in parallel
- Low-risk maintainability improvements with bounded write surfaces
- Concrete suggestions rather than an open-ended cleanup brainstorm
Do Not Use
Do not use this skill for:
- Architecture rewrites
- Broad modernization plans
- Style-only cleanup work
- Bug hunting for recent regressions
Inputs To Confirm
Confirm or infer:
- Repository or package scope
- Whether the user wants suggestions tailored to a specific contributor
- Any no-touch areas
- Whether recent contribution history is available
What To Optimize For
- Small scope
- Low behavioral risk
- Clear write boundaries
- High leverage for maintainability
- Concrete tickets that can be executed independently
Prefer refactors that:
- De-duplicate repeated logic into a small helper or local module
- Extract a cohesive piece from an oversized file without large-scale splitting
- Consolidate repeated validation, mapping, or error-handling patterns
- Remove dead, redundant, or obviously obsolete code
- Simplify a confusing conditional or awkward interface boundary
- Standardize a tiny repeated pattern inside one local area
Avoid:
- Giant refactors
- Architecture rewrites
- Large-scale file splitting
- Cross-repo cleanup campaigns
- Renames done only for style
- Suggestions that require deep domain knowledge in untouched areas
- Vague advice that cannot be turned into a ticket immediately
Instructions
Step 1: Inspect The Repository Before Suggesting Anything
Review the repository structure, relevant files, and local patterns before forming suggestions.
Step 2: Find Candidate Refactor Surfaces
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.
- 10d ago First seen · 221 lines · 100 tokens per session scan A d01a58896b61
swe:refactor-opportunities is a skill published in the GitHub repository ckorhonen/swe-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 100 tokens to every session and 1,414 once invoked, about $0.0005 per session on Opus 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
improve
Autonomous quality improvement loop. Scores a target against a rubric, selects the highest-leverage axis, attacks it, verifies, documents, and loops. No pre-planning between iterations — each loop re-scores from scratch.
triage
GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to…
review
5-pass structured code review — correctness, security, performance, readability, consistency.
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.
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".
review-pr
Multi-agent PR review with four modes (review, re-review, self-review, address-feedback) - spawns parallel subagents, saves diff to /tmp for context efficiency, supports file exclusion patterns.