Borrowing it
Nothing to install: this file belongs to zexion7873/copilot-setting. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zexion7873/copilot-setting/main/.github/skills/refactor/SKILL.mdgit clone --depth 1 https://github.com/zexion7873/copilot-settingWrote 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/zexion7873/copilot-setting/refactor)<a href="https://agentmods.dev/skills/zexion7873/copilot-setting/refactor"><img src="https://agentmods.dev/badge/skills/zexion7873/copilot-setting/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/zexion7873/copilot-setting/refactor"><img src="https://agentmods.dev/badge/skills/zexion7873/copilot-setting/refactor.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.00073 | $0.00504 |
| Opus 5.5 | $0.00029 | $0.00202 |
| Sonnet 5.5 | $0.00015 | $0.00101 |
| Haiku 4.5 | $0.00007 | $0.00050 |
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 — Workflow
Surgical, behavior-preserving structural changes.
Phase 0 — Load canonical rules
MANDATORY pre-load gate — do NOT apply a refactoring (Safe Process step 3) until you have opened the instruction files for the layers you touch. Your training data defaults to modern Java/Spring; these files are the version lock for Java 8 / Spring 3.2 / Hibernate 4.2. Open them first, every time — the negative lists in the agent body are a floor, not the full rules. Read-back receipt: NAME each file you opened and QUOTE its single most load-bearing rule for this change — a generic restatement you could have written from memory means you skipped the file.
Layers you touch — open each one: instructions/java.instructions.md, instructions/spring-hibernate.instructions.md, instructions/sql.instructions.md, instructions/sql-ddl.instructions.md, instructions/security.instructions.md, instructions/jsp.instructions.md, instructions/xml-config.instructions.md.
Safe Process
- Identify the smell: name it precisely (God Class, Long Method, Feature Envy, Duplicated Code, etc.)
- Long method (does >1 thing; ~30+ lines of logic) → Extract Method
- Long parameter list (~4+ params, or flag/boolean args) → Introduce Parameter Object
- Verify preconditions: understand all callers and dependents before touching anything
- Apply one refactoring at a time: extract → rename → simplify. Never combine — keep the diff minimal, one smell per session.
- Verify after each step: behavior must be identical — check callers still work; if existing tests break, the refactoring is wrong, not the tests. Found a bug along the way? Log it separately — never fix it in the same diff.
Handoffs
- →
@reviewer— for review after refactoring - →
implementskill — if refactoring reveals a need for new code
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 Changed · -8 lines 0ec746162e07
- 2mo ago First seen · 37 lines · 73 tokens per session scan A 20752d3804cf
refactor is a skill published in the GitHub repository zexion7873/copilot-setting (1 stars, last pushed 1mo ago), licensed MIT. It adds 73 tokens to every session and 504 once invoked, about $0.0003 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.
refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactorzexion7873/copilot-setting | Skill | 1 | 1mo ago | MIT | A | 73 | Claude Code, Codex |
| jira-cliCode-and-Sorts/awesome-copilot-agents | Skill | 593 | 6mo ago | CC0-1.0 | A | 60 | Claude Code, Codex |
| azure-pricesCode-and-Sorts/awesome-copilot-agents | Skill | 593 | 6mo ago | CC0-1.0 | A | 90 | Claude Code, Codex |
| calculatorCode-and-Sorts/awesome-copilot-agents | Skill | 593 | 6mo ago | CC0-1.0 | A | 50 | Claude Code, Codex |
| az-cliCode-and-Sorts/awesome-copilot-agents | Skill | 593 | 6mo ago | CC0-1.0 | A | 79 | Claude Code, Codex |
| plan-tasksavedpixel/ai-agent-rules-generator | Skill | 8 | 6mo ago | MIT | A | 45 | Claude Code, Codex |
| commitsavedpixel/ai-agent-rules-generator | Skill | 8 | 6mo ago | MIT | A | 40 | Claude Code, Codex |