oma-refactor

oma-refactor is a skill for Claude Code, Codex from gracefullight/docusaurus-plugins. It costs 71 tokens per session (2,689 once invoked), scanned A, a copy of oma-refactor, MIT.

A refactoring specialist that restructures code while preserving its observable behavior. Refactoring means improving internal organization without intentionally changing what the program does.

In plain words
What is it for?
Use it to split long methods or files, move or rename code, remove duplication, modernize legacy code, choose refactoring hotspots, and add characterization tests.
Why use it?
It reduces technical debt and code smells through small, checked changes, using tests and other safety checks to catch accidental behavior changes.

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/gracefullight/docusaurus-plugins/oma-refactor
Any agent
npx skills add gracefullight/docusaurus-plugins --skill oma-refactor
Clone the repo
git clone --depth 1 https://github.com/gracefullight/docusaurus-plugins

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 oma-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/gracefullight/docusaurus-plugins/oma-refactor.svg)](https://agentmods.dev/skills/gracefullight/docusaurus-plugins/oma-refactor)
Your own site
<a href="https://agentmods.dev/skills/gracefullight/docusaurus-plugins/oma-refactor"><img src="https://agentmods.dev/badge/skills/gracefullight/docusaurus-plugins/oma-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod 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.00071 $0.02689
Opus 5 $0.00036 $0.01345
Sonnet 5 $0.00014 $0.00538
Haiku 4.5 $0.00007 $0.00269

Measured yesterday against content hash f8a2024b1fef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

Origin

This is a copy

92% identical to oma-refactor — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/oma-refactor/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refactor Agent - Behavior-Preserving Restructuring Specialist

Scheduling

Goal

Improve internal code structure - readability first - without changing observable behavior, through small verified transformations, each gated by a safety net (tests / tooling / types) and committed separately from any behavior change.

Intent signature

  • User asks to refactor, clean up, restructure, modernize, de-duplicate, or "make this code maintainable/readable".
  • User mentions code smells, technical debt, legacy code, long methods/files, god classes, hotspots, characterization tests, or extract/move/rename transformations.
  • User asks "where should we refactor first?" or wants a refactoring plan/priority for a codebase.

When to use

  • Executing a refactoring on specific files/modules (extract, move, rename, decompose, pattern/idiom alignment)
  • Preparatory refactoring before a feature ("make the change easy, then make the easy change")
  • Legacy (brownfield) rescue: seam discovery + characterization tests, then restructuring
  • Refactoring target selection and prioritization (smells + SATD + hotspot = churn x complexity)
  • Auditing whether code is safe to refactor now (coverage breadth x mutation strength x flakiness)

When NOT to use

  • Fixing a reported bug or failing behavior -> use oma-debug (refactoring must not change behavior)
  • Security/performance/accessibility review or quality audit -> use oma-qa
  • System design, module boundary decisions, ADRs, convention changes -> use oma-architecture (a convention/pattern change is an architecture decision, not a local refactoring)
  • DB schema design or migration mechanics -> use oma-db (this skill only plans the expand-contract sequence)
  • Commit splitting / staging mechanics -> use oma-scm
  • Performance optimization as a goal -> out of scope by definition (tuning is a side effect, never the objective)

Expected inputs

  • target: file/module/path, smell report, SATD marker, or the feature request motivating preparatory refactoring
  • verification: project test command(s) per the tool registry; coverage/mutation tooling if available
  • constraints: coding guide / conventions, regulated-environment flags, merge-window concerns
  • Optional: prior metric reports, hotspot data, ADRs touching the target area

Read the full file on GitHub · 168 lines

Files

What ships with it

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

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. yesterday First seen · 168 lines · 71 tokens per session scan A f8a2024b1fef

Subscribe to this mod's changes

oma-refactor is a skill published in the GitHub repository gracefullight/docusaurus-plugins (22 stars, last pushed 2mo ago), licensed MIT. It adds 71 tokens to every session and 2,689 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to oma-refactor, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

testing

Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.

iOfficeAI/AionUi · 55 tokens

cometchat-native-testing

Testing patterns for CometChat React Native — Jest + React Native Testing Library setup, mocking the UI Kit + SDK, testing custom bubbles / headers / composer actions, snapshot pitfalls, E2E with Detox vs Maestro, and CI integration. Covers what to test vs what to skip.

cometchat/cometchat-skills · 63 tokens

cometchat-flutter-v5-testing

Testing patterns for CometChat Flutter UIKit v5 (GetX-based). Covers fluttertest (built-in), mocktail for SDK mocking, widget tests around CometChat widgets, integrationtest for real-device flows, golden tests for theming, and CI on GitHub Actions / Codemagic. Sister skill of cometchat-flutter-v6-testing — the cohorts…

cometchat/cometchat-skills · 99 tokens

cometchat-ios-testing

Testing patterns for CometChat iOS UI Kit v5 in Swift / SwiftUI / UIKit projects. Covers XCTest setup, mocking CometChatSDK + CometChatUIKitSwift via protocols, snapshot testing with iOSSnapshotTestCase, async/await test helpers, UI testing for full chat flows on simulators, and CI on Xcode Cloud / GitHub Actions.

cometchat/cometchat-skills · 81 tokens

cometchat-react-testing

Testing patterns for CometChat React UI Kit v6 in Vite / Next.js / React Router / Astro projects. Covers Vitest + React Testing Library setup, mocking @cometchat/chat-sdk-javascript and @cometchat/chat-uikit-react, Playwright e2e for full chat flows, the chat-specific assertions (init resolves before render, error UI…

cometchat/cometchat-skills · 118 tokens

cometchat-flutter-v6-testing

Testing patterns for CometChat Flutter UIKit v6 (stable, Bloc-based). Covers fluttertest + bloctest for Bloc unit tests, mocktail for SDK mocking, widget tests around the Bloc-driven CometChat widgets, integrationtest for real-device flows, golden tests for theming, and CI on GitHub Actions / Codemagic. Sister skill…

cometchat/cometchat-skills · 107 tokens