preview-className-component

preview-className-component is a skill for Claude Code, Codex from bitovi/convey. It costs 82 tokens per session (3,350 once invoked), scanned A, original, MIT.

A guide for building panel controls that let users preview Tailwind CSS class changes in their app before accepting them. It defines how hovering, leaving, and clicking move a change through preview, undo, and draft stages.

In plain words
What is it for?
Use it when adding or changing controls that preview styling values. It explains the callback inputs and how the parent component connects them to preview, undo, and draft-change handling.
Why use it?
It keeps temporary previews from being mistaken for saved changes and gives every control the same interaction rules. This avoids inconsistent behavior across dropdowns, color pickers, sliders, and similar controls.

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/bitovi/convey/preview-classname-component
Any agent
npx skills add bitovi/convey --skill preview-classname-component
Clone the repo
git clone --depth 1 https://github.com/bitovi/convey

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 preview-className-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/bitovi/convey/preview-classname-component.svg)](https://agentmods.dev/skills/bitovi/convey/preview-classname-component)
Your own site
<a href="https://agentmods.dev/skills/bitovi/convey/preview-classname-component"><img src="https://agentmods.dev/badge/skills/bitovi/convey/preview-classname-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,350 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00082 $0.03350
Opus 5 $0.00041 $0.01675
Sonnet 5 $0.00016 $0.00670
Haiku 4.5 $0.00008 $0.00335

Measured 5d ago against content hash 99b06179aab3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

preview-className-component 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 5d 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.

.github/skills/preview-className-component/SKILL.md · 313 lines

How it starts

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

Skill: Building Components That Preview className Changes

Mental Model

Every interactive control in the panel follows a three-phase lifecycle:

HOVER → preview (live in user's app)
LEAVE → revert  (snap back to original)
CLICK → stage   (lock the new value as a draft)

The control itself only calls onHover(newClass) and onLeave(). The parent (usually Picker.tsx) owns the patchManager and wires those callbacks to preview() / revertPreview() / stage().


The onHover / onLeave Prop Contract

Every control that can preview a class change must accept these two props:

onHover: (fullClass: string) => void;  // called when a candidate value is highlighted
onLeave: () => void;                   // called when interaction ends without committing

onHover — fire on every discrete candidate value:

  • Mouse enters a swatch / list item → onHover(fullClass)
  • Scrub moves to a new step → onHover(fullClass)
  • Keyboard navigates to an option → onHover(fullClass)

onLeave — fire when the user abandons the interaction without clicking:

  • Mouse leaves the entire control
  • Dropdown closes without selecting
  • Focus leaves the container
  • Escape is pressed

The parent wires them:

// In Picker.tsx (or wherever patchManager is available)
<MyControl
  onHover={(newClass) => patchManager.preview(currentClass, newClass)}
  onLeave={() => patchManager.revertPreview()}
  onClick={(newClass) => {
    handleStage(property, currentClass, newClass);
    // commitPreview() is called automatically after staging
  }}
/>

Any control with a dropdown / floating menu must use the canonical floating menu stack:

  1. useFloating — positioning, flip, shift (from @floating-ui/react)
  2. FloatingPortal — renders outside any overflow: hidden ancestor, preventing clipping
  3. FocusTrapContainer — auto-focuses, fires onClose on blur/Escape
  4. useDismiss — optional, adds pointer click-outside close

Read the full file on GitHub · 313 lines

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. 5d ago First seen · 313 lines · 82 tokens per session scan A 99b06179aab3

Subscribe to this mod's changes

preview-className-component is a skill published in the GitHub repository bitovi/convey (46 stars, last pushed 19d ago), licensed MIT. It adds 82 tokens to every session and 3,350 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

omh-frontend

This is a Hermes-native frontend workflow skill.

rlaope/oh-my-hermes · 69 tokens

handoff-spec

Write the implementation handoff — measurements, behaviours, assets, states, and edge cases. Use when engineering picks up the work. For verifying the result afterwards use design-qa-checklist; for reusable library components use component-spec (design-systems).

Owl-Listener/designer-skills · 57 tokens

color-palette-generator

Create an HTML color palette from a mood, description, or image, with swatches, color codes, pairings, and contrast checks. Use for color schemes or brand colors.

AlpacaLabsLLC/skills-for-architects · 41 tokens

animation-patterns

SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects. Use when implementing, reviewing, or fixing animation or visual-effect code on iOS/macOS.

rshankras/claude-code-apple-skills · 58 tokens

landing-page-generator

Generates high-converting landing pages as complete Next.js/React (TSX) components with Tailwind CSS. Creates hero sections, feature grids, pricing tables, FAQ accordions, testimonial blocks, and CTA sections using proven copy frameworks (PAS, AIDA, BAB). Outputs SEO meta tags, structured data, and…

seaworld008/Commonly-used-high-value-skills · 153 tokens

uiux

Dashboard design system — colors, typography, spacing, components, and visual patterns for the session dashboard UI.

dlupiak/claude-session-dashboard · 24 tokens