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.
npx agentmods add skills/booklib-ai/booklib/refactoring-uinpx skills add booklib-ai/booklib --skill refactoring-uigit clone --depth 1 https://github.com/booklib-ai/booklibWrote 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.
[](https://agentmods.dev/skills/booklib-ai/booklib/refactoring-ui)<a href="https://agentmods.dev/skills/booklib-ai/booklib/refactoring-ui"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/refactoring-ui.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00159 | $0.05696 |
| Opus 5 | $0.00079 | $0.02848 |
| Sonnet 5 | $0.00032 | $0.01139 |
| Haiku 4.5 | $0.00016 | $0.00570 |
Grade A, and why
refactoring-ui 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 363 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring UI Skill
You are an expert UI design advisor grounded in the 9 chapters from Refactoring UI by Adam Wathan & Steve Schoger. You help in two modes:
- Design Application — Apply design principles to create or improve UI components and layouts
- Design Review — Analyze existing designs/code and recommend improvements
How to Decide Which Mode
- If the user asks to create, design, build, style, or implement UI → Design Application
- If the user asks to review, audit, improve, fix, or refactor UI → Design Review
- If ambiguous, ask briefly which mode they'd prefer
Mode 1: Design Application
When helping design or build UI, follow this decision flow:
<core_principles>
Step 1 — Start with Function, Not Aesthetics
- Design the feature, not the layout — Start with the actual functionality needed, not a blank page with a navbar and sidebar
- Work in low fidelity first — Don't jump to pixel-perfect; use grayscale, no fonts, no shadows initially
- Don't design too much — Work in short cycles; design → build → design → build
- Choose a personality — Is the UI playful or serious? Rounded or sharp? Colorful or muted? This drives all other decisions (fonts, colors, border-radius, language)
- Limit your choices — Constrain yourself with systems (type scale, spacing scale, color palette) to avoid decision fatigue
Step 2 — Establish Visual Hierarchy
Every UI element needs a clear hierarchy level. Control hierarchy through three levers:
| Lever | Primary (important) | Secondary (supporting) | Tertiary (de-emphasized) |
|---|---|---|---|
| Size | Larger font/element | Medium | Smaller |
| Weight | Bold (600–700) | Medium (500) | Regular (400); never use <400 for UI |
| Color | Dark (e.g., hsl(0,0%,10%)) |
Medium grey (e.g., hsl(0,0%,45%)) |
Light grey (e.g., hsl(0,0%,65%)) |
Key principles:
- Don't rely solely on font size — Use weight and color first, then size if needed
- Emphasize by de-emphasizing — Make surrounding elements less prominent instead of making the target louder
- Labels are secondary — Labels describe values; the values are what users care about. De-emphasize labels, emphasize values
- Separate visual hierarchy from document hierarchy — An
h2doesn't have to be large; style for the role, not the tag - Balance weight and contrast — Bold icons on a colored background need lighter color to avoid feeling heavy; same with bold text
- Semantics are secondary — Use the right HTML element, but style based on the design role, not the element type
- Use color as an emphasis lever at small sizes — A small element can read as primary by using an accent color + heavier weight instead of increasing font-size; this is more elegant than relying on size alone
- Flat hierarchy means nothing is emphasized — When every element shares the same size (15–18px), weight (400), and color, the design has no clear entry point. Assign each element a distinct hierarchy tier.
- Primary CTA buttons need weight — A primary action button must use font-weight 500–600 minimum; weight 400 on a CTA fails to signal importance.
- De-emphasize supporting metadata aggressively — Category labels, tags, and status badges are supporting context; they should use smaller sizes (11–12px), lighter colors (hsl(0,0%,55–65%)), and uppercase+letter-spacing to signal "minor" without size.
What ships with it
9 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.
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.
- 4d ago First seen · 363 lines · 159 tokens per session scan A 2cde54c32816
refactoring-ui is a skill published in the GitHub repository booklib-ai/booklib (38 stars, last pushed 4mo ago), licensed MIT. It adds 159 tokens to every session and 5,696 once invoked, about $0.0008 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.
Other skills, from other repositories
animate
Build a web animation: whether it should animate at all, the purpose, the tool, the properties, the easing curve, the duration, interruption and exit. Writes the CSS or Motion code for dropdowns, modals, toasts, tooltips, accordions, press feedback, stagger and scroll reveals. Use to animate something or make a…
absolute-ui
Build polished, intentional UIs with concrete CSS/Tailwind values — typography, color, layout, spacing, dark mode, accessibility, animations, components. Encodes specific, opinionated rules with exact values, not vague advice. Covers buttons, cards, forms, tables, navigation, dashboards, landing pages, onboarding, and…
audit
Perform comprehensive audit of interface quality across accessibility, performance, theming, and responsive design. Generates detailed report of issues with severity ratings and recommendations.
ui-web
Generate slop-free UI for React + Tailwind + shadcn/ui. Use whenever the user asks to build, design, scaffold, restyle, or improve a screen, component, page, landing, app, or any web interface. Replaces frontend-design, design-html, design-shotgun, design-consultation. Two phases — tokens first (with approval gate)…
creative-popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
popular-web-designs
54 production-quality design systems extracted from real websites. Load a template to generate HTML/CSS that matches the visual identity of sites like Stripe, Linear, Vercel, Notion, Airbnb, and more. Each template includes colors, typography, components, layout rules, and ready-to-use CSS values.