Awesome-omni-skill refactor-html
Refactor HTML/TSX files to use existing UI components, DaisyUI classes, and semantic colors. Use when (1) refactoring React/TSX page components to use reusable UI components, (2) replacing raw HTML elements with component library equivalents, (3) converting primitive Tailwind colors to semantic DaisyUI colors, (4) extracting repeated styling patterns into components.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/refactor-html-majiayu000" ~/.claude/skills/diegosouzapw-awesome-omni-skill-refactor-html && rm -rf "$T"
manifest:
skills/development/refactor-html-majiayu000/SKILL.mdsource content
Refactor HTML/TSX
Refactor page components to follow project conventions: use existing UI components, DaisyUI classes, and semantic colors.
Rules
1. Use Existing Components
Replace raw HTML with UI components from
packages/ui/src/components/ui/. See components.md for available components and their props.
| Before | After |
|---|---|
| |
| |
| |
| |
| |
| |
2. Use Semantic Colors
Replace primitive colors with DaisyUI semantic colors:
| Primitive (NG) | Semantic (OK) |
|---|---|
| |
| |
| |
| |
| |
3. Extract Repeated Styles
When styling patterns repeat (e.g.,
border-t border-base-300 pt-6), consider extracting to a component.
Workflow
- Read target file
- Check available components in
packages/ui/src/components/ui/ - Identify rule violations
- Apply refactoring with Edit tool
- Add necessary imports
- Report changes made