Agent skill

Omh Frontend Refactor

by rlaope in rlaope/oh-my-hermes

[omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state…

MITAuto-check passedFrontend & Design

Install Omh Frontend Refactor

skills CLI
$ npx skills add rlaope/oh-my-hermes --skill omh-frontend-refactor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rlaope/oh-my-hermes omh-frontend-refactor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rlaope/oh-my-hermes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/omh-frontend-refactor .claude/skills/omh-frontend-refactor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
omh-frontend-refactor
GitHub stars
3.2k
Token cost
~3k tokens
SKILL.md length
1,551 words
Files
3 (incl. references)
Skills in repo
143
Repo updated
First seen
Licence
MIT

At a glance

[omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state…

  • The user says: frontend-refactor
  • SKILL.md covers Why This Exists, Do Not Use When, Examples and Completion Checklist, plus 5 more sections
  • Calls claude and codex
  • Frontend refactor

What it does

Omh Frontend Refactor is an agent skill from rlaope/oh-my-hermes. [omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state architecture down to naming polish. Use when the user says: frontend-refactor, front-refactor, frontend refactor, refactor this component, refactor the component, refactor my component, component refactor, react refactor.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/refactor-passes.md` and `references/state-discipline.md`).

It sits in Frontend & Design, covering Refactoring. It works with React. The repository describes itself as: All in one plugin for Hermes Agent ⚚ the coding intelligence, a long-term memory system and model optimized workflow packages. The licence is MIT.

When your agent uses it

  • The user says: frontend-refactor
  • Frontend refactor
  • Refactor this component
  • Refactor the component

Example prompts

  • “/omh-frontend-refactor”

What it can do on your machine

Read from SKILL.md and the folder at commit 41de9dc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude
    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Omh Frontend Refactor loads about 3k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 1,551 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rlaope/oh-my-hermes at commit 41de9dc, republished under its MIT licence (© rlaope). 1,551 words, ~2,988 tokens.

Download SKILL.mdSave it as .claude/skills/omh-frontend-refactor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
omh-frontend-refactor
description
[omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state architecture down to naming polish. Use when the user says: frontend-refactor, front-refactor, frontend refactor, refactor this component, refactor the component, refactor my component, component refactor, react refactor.

Frontend Refactor

This is a Hermes-native frontend-refactor workflow skill.

Why This Exists

frontend-refactor exists so UI restructuring runs as a previewed, behavior-locked, impact-ordered process instead of ad-hoc rewrites: the plan comes before any edit, state fixes come before polish, and every change carries its safety reason.

Do Not Use When

  • The target is not UI code, or the smell is generic slop, duplication, or dead code outside a component tree; use ai-slop-cleaner.
  • The user wants new UI built or redesigned rather than restructured; use frontend.
  • The user wants findings and a verdict without changing the code; use code-review.
  • The restructuring crosses module boundaries or changes architecture beyond the component tree; use refactor-plan for the phased execution shape, or ralplan first when the direction itself is still contested.

Examples

Good example:

  • Prompt: This dashboard component is 800 lines and has six useState booleans - refactor it without changing behavior.
  • Expected behavior: Preview first: characterization-test gate, then a plan that folds the booleans into one state union, extracts along change reasons found by the scroll test, and lists per-change line refs with safety reasons; apply only as the explicit second step.
  • Why: Oversized component plus flag-cluster state is exactly the impact-ordered, behavior-locked restructuring this workflow owns.

Bad example:

  • Prompt: Refactor and also add the dark-mode feature while you are in there.
  • Expected behavior: Split the request: the behavior-preserving refactor runs under this workflow, and the dark-mode feature is new frontend work planned separately.
  • Why: A refactor that changes behavior cannot claim behavior preservation; mixing the two hides the feature from review.

Completion Checklist

  • The preview plan was emitted before any file changed, and the apply step was an explicit second decision.
  • Behavior evidence exists on both sides of apply, and unsafe-in-isolation changes are listed as notes, not half-applied.
  • Pass order was impact-first and each finding names its category and safety reason.
  • Out-of-scope smells were routed: generic slop to ai-slop-cleaner, new UI to frontend, verdict-only review to code-review.

Recovery Notes

  • If no tests exist, write the characterization checks first or hand the user the smallest set to approve; do not start the macro pass on unlocked behavior.
  • If a change turns out to alter behavior mid-apply, revert that change, record it as a finding, and keep the rest of the pass.
  • If the component resists extraction because state is tangled, run the state ladder first and re-attempt decomposition after.

Workflow Lane

  • Current lane: Coding handoff (idea-to-deploy, llm-app-dev, cto-loop, deploy-and-monitor, code-review, build-failure-triage, verification-gate, security-safety-review, +28 more) - coding owners, handoffs, review, CI, and merge evidence.
  • If intent belongs to another lane, hand back to oh-my-hermes or name the adjacent workflow.
  • Shared product, routing, compatibility, and evidence rules: omh-routing/references/skill-common-rail.md.

Use When

Use when existing UI code needs restructuring without behavior change - an oversized component, boolean-flag state, effect chains, prop drilling - and the user wants a previewed, pass-ordered refactor plan rather than a new build or a verdict-only review.

Strong routing signals: `frontend-refactor`, `front-refactor`, `frontend refactor`, `refactor this component`, `refactor the component`, `refactor my component`, `component refactor`, `react refactor`, `refactor this hook`, `split this component`, `split the component`, `this component is too big`, `component is too large`, `state management review`, `state management`, `state colocation`, `too many useeffects`, `useeffect cleanup`, `clean up useeffect`, `prop drilling`, `컴포넌트 리팩터링`, `컴포넌트 리팩토링`, `컴포넌트 분리`, `컴포넌트가 너무 커`, `상태 관리 정리`, `상태 관리 리뷰`, `프론트 리팩터링`, `프론트엔드 리팩터링`, `useEffect 정리`

Catalog Metadata

Category: maintenance Phase: frontend-refactor Hermes role: handoff-guide Quality tier: behavior-lock-gated Reasoning demand: heavy

Quality bar:

  • Work the ladder impact-first: state architecture before hook patterns before decomposition before naming and style - a state fix usually deletes the code a style pass would have polished.
  • Make impossible states unrepresentable before memoizing anything: flag clusters become one discriminated union or reducer, and a state machine only when transitions carry retries, resets, or races.
  • Treat effects as synchronization with external systems: deriving, event responses, prop-change resets, parent notification, and effect chains each have a non-effect form named in omh-frontend-refactor/references/state-discipline.md.
  • Run the micro pass in fixed order - dead code, naming, simplification, modernization - finishing one category before the next; the full contract is omh-frontend-refactor/references/refactor-passes.md.
  • Gate macro changes on characterization tests written before the refactor; snapshot tests lock markup, not behavior, and do not count.
  • The scroll test picks the decomposition entry point, and extraction follows independent change reasons completely - a half-extracted component is two coupled ones.

Handoff policy:

Hermes prepares the preview plan, pass order, and characterization-test gate; the apply step is coding work for the selected executor lane, and behavior preservation is claimed only from observed test runs before and after apply.

Executor readiness:

  • When accepted work mutates code, check executor_readiness/v1 for the selected Codex, Claude Code, Hermes, or oh-my runtime path before first dispatch.
  • If readiness is missing or blocked, ask the user to choose another coding agent, configure PATH, continue in Hermes, or keep a prompt/runtime handoff; retry only after that state changes.
  • A readiness probe is not dispatch, implementation, verification, review, CI, merge-readiness, or merge evidence.

Delegation transparency:

  • When delegating, show the composed delegate prompt in a fenced code block in the status message; truncate a long prompt to a bounded preview ending with ... [truncated, N chars total] — the user must see WHAT was asked, not just that something was.
  • Name every delegated or parallel lane's model and, when the host exposes it, its reasoning effort inline as (model effort) in status and briefing lines — including runtime-native subagents; when no effort is exposed, show the model alone as (model) rather than writing a placeholder like unknown beside a known model, and never emit empty parentheses. Carry token and elapsed figures the same way in these narration lines: report observed figures and omit unobserved ones — when the user asks for a figure directly, say it was not observed instead of omitting it; a rendered status-board column keeps its own unknown cell.
  • Capture a resumable session or thread id at dispatch and report it in the status message: for non-interactive Claude Code pass --output-format json and read session_id from the result (resume with claude -p --resume <session-id>); for Codex pass --json and read thread_id (resume with codex exec resume <thread-id>, repeating --skip-git-repo-check outside a git repo). Never leave a delegate run with no recorded way to resume or steer it — a plain-text one-shot that hides its session id strands the work when the run stalls or times out.
  • Before dispatch, grant the executor session every permission the task will need — file write/edit, command/test execution, and the working directory — on the dispatch command itself, not through settings-file guesses: for non-interactive Claude Code pass --permission-mode acceptEdits or an explicit --allowedTools list (--dangerously-skip-permissions only inside an isolated worktree or sandbox), and the equivalent sandbox/approval flags for other CLIs. acceptEdits: true is not a settings key and ~/.claude/settings.local.json is not a file Claude Code reads — user scope is ~/.claude/settings.json and project scope is the dispatch cwd's .claude/settings.local.json with rules under permissions.allow. Prove the grant with a bounded scratch-edit probe run before the real dispatch: a permission denial in a non-interactive run recurs identically on retry, so never redispatch until a changed grant is proven, and surface an ungrantable permission as a blocker before dispatch, not after minutes of silence.
Show full SKILL.md (361 more words)Show less

Required inputs:

  • the target files or component, and the framework in use
  • current behavior evidence: tests, or the characterization checks to write first
  • the diff budget: micro pass only, one macro tier, or full ladder

Expected outputs:

  • preview change plan with per-change line refs, before/after, safety reason, and category counts
  • impact-ordered pass selection naming what is deferred and why
  • characterization-test gate verdict before any macro change
  • apply-step handoff with the unsafe-in-isolation changes listed under notes, never half-applied

Artifact expectations:

  • metadata-only runtime record when a wrapper or shell is available

Safety rules:

  • Preview is the default: analyze the whole target and emit the plan before touching any file.
  • Outputs, side effects, and error handling stay identical; a dropped branch or weakened handler is a defect, not a simplification.
  • Never rename exports, change signatures, merge or split files, or alter async execution models without flagging a breaking change; cross-file renames are notes, not silent edits.
  • Do not refactor test files, and do not claim behavior preservation without the before/after test evidence.

Runtime Evidence

Preferred harness for this skill: coding-handling.

sh
omh runtime record --skill frontend-refactor --harness coding-handling --status started

Record observed delegation results; otherwise return not_available or not_observed. Prepared OMH routing is not execution, review, CI, merge-readiness, or merge evidence.

  • Treat wrapper memory/context summaries as advisory local context, not proof of opaque Hermes memory reads or changes. Preserve workflow intent and stop conditions; verify before claiming completion. Reply in the user's own words and the host's own voice: its SOUL.md persona owns reply language, tone, speech level, and sentence endings, progress updates included (where it sets no language, use the one the user wrote in), and OMH shapes structure and content only; OMH's record terms (surface, lane, wrapper, handoff, evidence boundary, not_observed) stay in records and tool calls, never in the sentence the user reads unless they ask about one; and when a stop condition or a decision the user owns ends the turn, offer the next action as a question rather than declaring what will not be done.

Use Hermes-native subagent/delegation features when available: native subagents -> Hermes delegation when available, otherwise sequential lanes.

Shared product, compatibility, topology, memory, harness, and execution rules: omh-routing/references/skill-common-rail.md. Load it when applicable; otherwise name an unavailable capability.

© rlaope, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/omh-frontend-refactor of rlaope/oh-my-hermes.

  • SKILL.md
  • references/refactor-passes.md
  • references/state-discipline.md

Open the folder on GitHubat commit 41de9dc

Compare with similar skills

Omh Frontend Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Omh Frontend Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Omh Frontend Refactor this skillrlaope/oh-my-hermes3.2k—~3kAutomated safety check: PassMIT
Vercel React Best Practicessanity-io/sanity6.4k129 repos~1.6kAutomated safety check: PassMIT
Frontend Module Standardssiteboon/claudecodeui14k—~2.6kAutomated safety check: PassAGPL-3.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React Best Practicesmastra-ai/mastra29k—~1.9kAutomated safety check: PassCustom licence
Plate UIudecode/plate17k—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 129 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Frontend Module Standards

    siteboon/claudecodeui

    Enforces one repository's React and TypeScript module layout for code under src/: source-root imports, feature barrels, deliberate exports and no deep imports.

    14k GitHub stars~2.6k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Best Practices

    mastra-ai/mastra

    React performance optimization guidelines from Mastra Engineering.

    29k GitHub stars~1.9k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Plate UI

    udecode/plate

    Build new shadcn-style components for Plate's registry and editor surfaces.

    17k GitHub stars~2.6k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • No Use Effect

    fastrepl/anarlog

    Avoid direct React useEffect usage when writing or reviewing React components and hooks.

    9.5k GitHub stars~825 tokensUpdated today
    Frontend & DesignAuto-check passed

More from rlaope/oh-my-hermes

All 143 skills in this repo
  • Omh Accessibility Audit

    rlaope/oh-my-hermes

    [omh] Screen-reader or keyboard accessibility gaps: prepare WCAG, keyboard, focus, screen-reader, target-size, and reflow evidence gates for UI surfaces.

    3.2k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Omh Agent Evaluation

    rlaope/oh-my-hermes

    [omh] Choosing between coding agents on evidence: compare executor or agent choices on reproducible tasks using quality, cost, time, tool, and evidence metrics.

    3.2k GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Omh Agent Instructions

    rlaope/oh-my-hermes

    [omh] Agent instruction file for a repo -- AGENTS.md, CLAUDE.md, a Cursor rule: write or update what an agent cannot derive from the code, inside a marked region, with every command verified or…

    3.2k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Omh Agent Ops Review

    rlaope/oh-my-hermes

    [omh] AI agent progress for managers: help managers inspect AI-agent progress, blockers, quality gates, and throughput levers.

    3.2k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Omh AI Slop Cleaner

    rlaope/oh-my-hermes

    [omh] Messy or AI-generated code to clean up: delete AI-generated slop, dead code, and duplication while observable behavior stays identical.

    3.2k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Omh App Debugging

    rlaope/oh-my-hermes

    [omh] Application code misbehaves -- a wrong value, a flaky test, a lost update: reproduce it first, form competing hypotheses, discriminate them with the cheapest observation, and only then fix the…

    3.2k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Omh Frontend Refactor

What does Omh Frontend Refactor do?

[omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state…. Omh Frontend Refactor is an agent skill from rlaope/oh-my-hermes. [omh] Oversized or tangled UI component: behavior-preserving refactor of UI code - preview the full change plan first, apply as a second explicit step, and work impact-ordered from state architecture down to naming polish.

When should I use Omh Frontend Refactor?

Omh Frontend Refactor fits situations like: the user says: frontend-refactor; frontend refactor; refactor this component; refactor the component.

How do I install Omh Frontend Refactor in Claude Code?

Run `npx skills add rlaope/oh-my-hermes --skill omh-frontend-refactor -a claude-code`. Or copy the skill folder (skills/omh-frontend-refactor in rlaope/oh-my-hermes) into .claude/skills/omh-frontend-refactor in your project. Claude Code loads it when a task matches its description.

How do I install Omh Frontend Refactor in Codex?

Run `npx skills add rlaope/oh-my-hermes --skill omh-frontend-refactor -a codex`. Or copy the skill folder (skills/omh-frontend-refactor in rlaope/oh-my-hermes) into .agents/skills/omh-frontend-refactor in your project. Codex loads it when a task matches its description.

Can I use Omh Frontend Refactor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rlaope/oh-my-hermes --skill omh-frontend-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/omh-frontend-refactor, .gemini/skills/omh-frontend-refactor, .github/skills/omh-frontend-refactor and .opencode/skills/omh-frontend-refactor in your project.

What does Omh Frontend Refactor need to run?

Going by SKILL.md and its folder, Omh Frontend Refactor needs the command-line tools its instructions call (claude and codex).

Does Omh Frontend Refactor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Omh Frontend Refactor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Omh Frontend Refactor use?

Omh Frontend Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Omh Frontend Refactor use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Omh Frontend Refactor?

Skills that share tags, products or a category with Omh Frontend Refactor: Vercel React Best Practices (sanity-io/sanity, 6.4k stars), Frontend Module Standards (siteboon/claudecodeui, 14k stars), Dify Component Writing Guide (langgenius/dify, 158k stars) and React Best Practices (mastra-ai/mastra, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Omh Frontend Refactor?

rlaope (a GitHub user) maintains it in rlaope/oh-my-hermes, which has 3,233 GitHub stars. The repository holds 143 skills in this directory. The repository was last updated on October 8, 2026.

Source: rlaope/oh-my-hermes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.