copilot-setting: Skill for Claude Code

.github/skills/refactor/SKILL.md

refactor is a skill for Claude Code, Codex from zexion7873/copilot-setting. It costs 73 tokens per session (504 once invoked), scanned A, original, MIT.

A workflow for restructuring existing code while keeping its behavior unchanged. It covers tasks such as extracting methods, renaming code, removing duplication, and simplifying logic.

In plain words
What is it for?
Planning and carrying out behavior-preserving refactors in Java 8, Spring 3.2, Hibernate 4.2, SQL, JSP, XML, and Maven files, after loading the relevant project rules.
Why use it?
It provides a defined process for cleaning up code without accidentally turning the work into a feature change or bug fix.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is zexion7873/copilot-setting's own configuration. It tells Claude Code and Codex how to work on copilot-setting itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-setting configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/zexion7873/copilot-setting/main/.github/skills/refactor/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/zexion7873/copilot-setting

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/zexion7873/copilot-setting/refactor/github.svg)](https://agentmods.dev/skills/zexion7873/copilot-setting/refactor)
Your own site
<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.

agentmods 80×15 button for refactor

Your own site · 80×15
<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>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 0ec746162e07, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.github/skills/refactor/SKILL.md · 29 lines

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

  1. 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
  2. Verify preconditions: understand all callers and dependents before touching anything
  3. Apply one refactoring at a time: extract → rename → simplify. Never combine — keep the diff minimal, one smell per session.
  4. 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
  • → implement skill — if refactoring reveals a need for new code
Changes

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.

  1. 1mo ago Changed · -8 lines 0ec746162e07
  2. 2mo ago First seen · 37 lines · 73 tokens per session scan A 20752d3804cf

Subscribe to this mod's changes

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.

Related

refactor compared with skills from other repositories

refactor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refactorzexion7873/copilot-settingSkill11mo agoMITA73Claude Code, Codex
jira-cliCode-and-Sorts/awesome-copilot-agentsSkill5936mo agoCC0-1.0A60Claude Code, Codex
azure-pricesCode-and-Sorts/awesome-copilot-agentsSkill5936mo agoCC0-1.0A90Claude Code, Codex
calculatorCode-and-Sorts/awesome-copilot-agentsSkill5936mo agoCC0-1.0A50Claude Code, Codex
az-cliCode-and-Sorts/awesome-copilot-agentsSkill5936mo agoCC0-1.0A79Claude Code, Codex
plan-tasksavedpixel/ai-agent-rules-generatorSkill86mo agoMITA45Claude Code, Codex
commitsavedpixel/ai-agent-rules-generatorSkill86mo agoMITA40Claude Code, Codex