refactor

A set of instructions for restructuring existing code while keeping its behavior the same. It covers tasks such as removing duplication, improving names, simplifying logic, and splitting large functions.

In plain words
What is it for?
Use it when refactoring, extracting helpers, renaming code, reducing repetition, or untangling dependencies.
Why use it?
It gives an agent a defined way to clean up difficult code without changing what the program does.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/yelmuratoff/agent_sync/refactor
Any agent
npx skills add yelmuratoff/agent_sync --skill refactor
Clone the repo
git clone --depth 1 https://github.com/yelmuratoff/agent_sync

Made for: Claude Code, Codex.

Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 405 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00108 $0.00405
Opus 5 $0.00054 $0.00202
Sonnet 5 $0.00022 $0.00081
Haiku 4.5 $0.00011 $0.00040

Measured 2d ago against content hash 1524faa347a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

.ai/src/skills/refactor/SKILL.md · 28 lines

The source is not reproduced here

Licensed GPL-3.0

The repository is licensed GPL-3.0, which this catalogue does not treat as permission to reproduce the file. Read it at the source.

Read it on GitHub

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. 2d ago First seen · 28 lines · 108 tokens per session scan A 1524faa347a3

Subscribe to this mod's changes

refactor is a skill published in the GitHub repository yelmuratoff/agent_sync (14 stars, last pushed 2d ago), licensed GPL-3.0. It adds 108 tokens to every session and 405 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-30.

Related

Other skills, from other repositories

link-ticket-to-session

Link the current Claude Code session to a ticket (Linear, Jira, GitHub Issues, or GitHub Pull Requests) and cache its title/status in karma. Use when the user explicitly asks to link, attach, associate, or connect this session to a ticket, issue, or PR — e.g. "/link-ticket-to-session ABC-123", "link this session to…

JayantDevkar/claude-code-karma · 91 tokens

cocowatch

Developer engagement observer — non-blocking, always-on observational layer that tracks Delegation Intensity, Review Depth, and Engagement Zone throughout a session. Summary surfaced at $ship and FULL checkpoints.

Snowflake-Labs/cocoplus · 43 tokens

laundering

Use when all territories report completion after the hit — handles integration, verification, consigliere final review, cleanup, and ledger updates to produce clean production-ready code.

kucherenko/gangsta · 35 tokens

reconnaissance

Use when beginning a new heist — deploys associates to survey the target codebase, existing tests, dependencies, documentation, and the ledger to produce a reconnaissance dossier for the don's review.

kucherenko/gangsta · 43 tokens

the-grilling

Use when adversarial brainstorming is needed after reconnaissance — the Proposer, Devils-Advocate, and Synthesizer each run ONE pass (no rounds); the Don is grilled on the IDEA first, one question at a time, then the proposal is attacked.

kucherenko/gangsta · 55 tokens

using-gangsta

Use when starting any conversation — establishes how to find and use Gangsta skills, enforces the 1% invocation rule, maps platform tools, and routes the Don's intent through the Gangsta Agents Family hierarchy.

kucherenko/gangsta · 47 tokens