Omh Frontend Refactor logo

Omh Frontend Refactor

CommunityPopular
rlaope
omh-frontend-refactor

[omh] Hermes frontend refactor workflow: 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.

Overview

Publisherrlaope
Repositoryoh-my-hermes
Skill nameomh-frontend-refactor
Stars
2.7K
Forks
194
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by rlaope on GitHub. Read the source before you install it.

Installation

Install the Omh Frontend Refactor AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rlaope/oh-my-hermes.git /tmp/oh-my-hermes
mkdir -p .claude/skills
cp -r /tmp/oh-my-hermes/agent-skills/omh-frontend-refactor .claude/skills/omh-frontend-refactor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Omh Frontend Refactor in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Omh Frontend Refactor on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Omh Frontend Refactor is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frontend Refactor

This is an OMH frontend-refactor workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

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.

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

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

Use the current host's own tools and subagent/task mechanism when available; otherwise run the same lanes sequentially or name the unavailable capability. A prepared plan, handoff, checklist, or skill installation is not execution, review, CI, merge-readiness, or merge evidence. Report actual tool results or not_observed / not_available; never invent dispatch or host accounting. Treat supplied context as advisory, not proof of hidden memory reads or writes. State scope, constraints, verification, and the stop condition before work. Supporting paths are relative to this skill directory; sibling skill paths are relative to its parent. Resolve them from the host-provided skill base directory ({baseDir} on hosts that provide it), never a hardcoded install location. A named workflow not installed here is unavailable, not permission to emulate its host-specific capabilities. Verify through the real surface before done.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Omh Frontend Refactor AI skill do?

[omh] Hermes frontend refactor workflow: 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.

Why use Omh Frontend Refactor on TypingMind?

Because you install it once and use it with any model. Omh Frontend Refactor is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Omh Frontend Refactor in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/rlaope/oh-my-hermes/tree/main/agent-skills/omh-frontend-refactor. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Omh Frontend Refactor?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Omh Frontend Refactor?

As many as you like. As long as a model supports skills, you can use Omh Frontend Refactor with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Omh Frontend Refactor AI skill free?

Yes. It is published on GitHub by rlaope under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇