Agent skill

Ranui

by chaxus in chaxus/ran

A skill your agent uses when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder —…

MITAuto-check passedFrontend & Design

Install Ranui

skills CLI
$ npx skills add chaxus/ran --skill ranui -a claude-code

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

GitHub CLI
$ gh skill install chaxus/ran ranui --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/chaxus/ran.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ranui/skills/ranui .claude/skills/ranui && 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
ranui
GitHub stars
271
Token cost
~2k tokens
SKILL.md length
736 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder —…

  • Building UI with the ranui web-component library (elements like <r-button
  • SKILL.md covers Authoritative reference (read…, Import map, Elements at a glance and Builder + reactivity (from…, plus 3 more sections
  • Calls npm
  • Its fluent DOM builder (ranui/builder — Div/View/Span/signal/createEffect/EventManager)

What it does

Ranui is an agent skill from chaxus/ran. Use when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder — Div/View/Span/signal/createEffect/EventManager). Covers the import map, the full element inventory, conventions, accessibility, and where the authoritative API reference lives.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Design systems and Accessibility. It works with TypeScript. The repository describes itself as: ranui — a Web Components UI library — plus ranuts utilities. Hand-built frontend infrastructure. The licence is MIT.

When your agent uses it

  • Building UI with the ranui web-component library (elements like <r-button
  • Its fluent DOM builder (ranui/builder — Div/View/Span/signal/createEffect/EventManager)

Example prompts

  • “/ranui”

What it can do on your machine

Read from SKILL.md and the folder at commit a73eadb. 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:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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

Ranui loads about 2k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 736 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~2k

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 chaxus/ran at commit a73eadb, republished under its MIT licence (© chaxus). 736 words, ~1,982 tokens.

Download SKILL.mdSave it as .claude/skills/ranui/SKILL.md (or your agent's skills folder).
name
ranui
description
Use when building UI with the ranui web-component library (elements like `<r-button>`, `<r-modal>`, `<r-select>`, `<r-input>`, `<r-message>`) or its fluent DOM builder (`ranui/builder` — Div/View/Span/signal/createEffect/EventManager). Covers the import map, the full element inventory, conventions, accessibility, and where the authoritative API reference lives.

ranui — web component library

Framework-agnostic Web Components (Custom Elements + Shadow DOM). Works in React, Vue, Svelte, Solid, or plain JS. Each element is <r-*> and is used like native HTML. Styling crosses the shadow boundary via CSS variables, ::part(), or the per-instance sheet attribute (escape hatch).

Authoritative reference (read these for exact APIs — don't guess)

When ranui is installed in a project, its docs ship inside the package:

  • node_modules/ranui/docs/COMPONENTS.md — generated per-element API: every element's attributes, typed properties, events (with detail shape), slots, and ::part() names. This is the source of truth for props/events. Regenerated in the source repo via npm run doc:api.
  • node_modules/ranui/docs/DESIGN.md — design system rules (color states, spacing, motion, accessibility §7, pre-ship checklist).
  • node_modules/ranui/docs/style-tokens-public.md — the CSS variable (theming token) catalog.

In the source repo (packages/ranui) there is also a deep CLAUDE.md (architecture, builder internals, LESS conventions, testing) — not shipped in the npm package.

Import map

Per-component, tree-shakeable side-effect imports register the custom element:

ts
import 'ranui/button';   // then use <r-button>
import 'ranui/modal';
import 'ranui/select';
import 'ranui/input';
import 'ranui/message';  // also exposes an imperative message API
import 'ranui/checkbox';

Available element subpaths: button icon image input message skeleton tab tabpane radar modal select progress player popover dropdown content loading colorpicker math checkbox card router route link.

The fluent DOM builder + reactivity (no custom-element registration):

ts
import { Div, View, Span, Label, ButtonBuilder, signal, createEffect, EventManager, Style } from 'ranui/builder';

SSR helpers: import { defineSSR } from 'ranui/ssr-registry' (source) / ranui/ssr, ranui/ssr-stream. Types: ranui/typings.

Elements at a glance

  • Forms: r-input, r-checkbox, r-select (+ r-option, r-dropdown-item), r-colorpicker. These are form-associated custom elements (attachInternals() + ElementInternals.setFormValue()) — their values are collected by new FormData(form) when they're real descendants of a native <form>, same as any native field — no wrapper component required. Use serializeForm(form) (from ranui) to turn a submit into a plain object.
  • Feedback/overlay: r-message (toasts), r-modal, r-popover, r-loading, r-skeleton, r-progress.
  • Layout/content: r-card, r-section, r-tab/r-tabs, r-icon, r-img, r-link, r-math, r-player, r-radar.
  • Routing: r-router, r-route, r-link (history/hash SPA routing).
  • Streaming transcript: r-conversation — renders an append-only event log. Register each kind of content as a view (match/start/update fold state, mount/patch render it) before the first push; it throws afterwards. Bottom-follow is on by default and does not fight the reader; pinnedchange drives a "jump to latest" button. Use <r-markdown> as the prose row — its mode="streaming" already closes half-streamed markdown. Projection and cadence: ranuts/conversation.
  • Tool calls: r-tool-card — set call / result / status from a declared intent (generic / terminal / diff), never markup. Views must be pure functions of the call's arguments, because they are recomputed on replay; an unrecognised card degrades to generic instead of throwing.
  • Chain of thought: r-reasoning — expands while streaming is set, collapses when it clears, and stops following once the reader opens or closes it themselves (setting open from script counts). Feed content from ranuts/stream's reasoning-delta blocks.
  • Attachments: r-attachments — holds the files staged with a message, previews them, validates, and owns its object URLs (revoked on detach/clear/disconnect). It does not collect files: call add(files) from paste, drop or a picker. Removal is detach(id), because remove() already means "take yourself out of the document". Rejections are reported, never silent.
  • Dictation: r-voice-button — a microphone button over ranuts' createSpeechRecognizer. It reports the whole capture so far on each voiceresult (interim results are revised), so remember the text already in the box at voicestart and concatenate once. It never sends, hides itself where the API is absent, and only denied/failed are worth surfacing — noSpeech/aborted are routine.
Show full SKILL.md (214 more words)Show less

Builder + reactivity (from ranui/builder)

  • Div()/View('r-x')/Span()/... — chainable: .class(), .attr(), .part(), .role(), .text(), .children(...), .on(event, handler), .build().
  • signal(initial) → [getter, setter]; createEffect(fn) re-runs fn when the signals it reads change (returns a disposer).
  • EventManager — .on(target, type, handler) with .abort() to remove all listeners at once (use in disconnectedCallback).

Usage example

Declarative — use elements like native HTML (after importing the subpath):

html
<r-select value="a">
  <r-option value="a">Apple</r-option>
  <r-option value="b">Banana</r-option>
</r-select>
<r-input label="Email" name="email"></r-input>

Imperative — create, configure, and wire events (event detail shapes are in COMPONENTS.md, e.g. r-select change → { value, label }):

ts
import 'ranui/select';
import message from 'ranui/message';

const sel = document.createElement('r-select');
sel.setAttribute('value', 'a');
sel.addEventListener('change', (e) => console.log((e as CustomEvent).detail.value));
document.body.append(sel);

message.success('Saved'); // imperative toast API: info | success | warning | error | toast

Builder + reactivity — compose DOM with signals (great for framework-free views):

ts
import { Div, ButtonBuilder, signal, createEffect } from 'ranui/builder';

const [count, setCount] = signal(0);
const label = Div().build();
createEffect(() => { label.textContent = `Count: ${count()}`; }); // re-runs on change
const btn = ButtonBuilder().text('inc').on('click', () => setCount(count() + 1)).build();
document.body.append(label, btn);

Accessibility (already built in — rely on it, don't re-implement)

  • r-message toasts announce via an aria-live region (errors = assertive alert).
  • r-checkbox/r-input/r-select are form-associated and labelled; checkbox is keyboard-toggleable (Space/Enter) with role=checkbox/aria-checked.
  • r-tabs follows the WAI-ARIA tabs pattern (roles + roving tabindex + arrow keys).
  • r-colorpicker sliders are role=slider with arrow-key adjustment; the swatch opens via Enter/Space.
  • All components honour prefers-reduced-motion.

For custom UI you build, follow DESIGN.md §7 (keyboard nav, visible focus, ARIA).

Conventions & gotchas

  • Register elements with defineSSR('r-name', Component), not customElements.define directly (keeps SSR working).
  • Shadow DOM isolates styles: external <label for> / aria-labelledby do NOT cross into a component's shadow root — use the component's own label attribute/slot.
  • Component CSS uses CSS variables with dark-safe fallbacks; theme via tokens, not by reaching into shadow internals.
  • Prefer subpath imports (ranui/button), never ranui/dist/... or internal @/....

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

Files

Just SKILL.md in plugins/ranui/skills/ranui of chaxus/ran.

Open the folder on GitHubat commit a73eadb

Compare with similar skills

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

Ranui compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ranui this skillchaxus/ran271—~2kAutomated safety check: PassMIT
Connect Component To Figmadequelabs/cauldron129—~2kAutomated safety check: PassMPL-2.0
Monochromevaneenige/monochrome-ui132—~2.3kAutomated safety check: PassMIT
Components BuildAsymmetric-al/core381—~2.1kAutomated safety check: PassMIT
Ss Learnbitjaru/styleseed972—~1.3kAutomated safety check: PassMIT
UI/UX Design System AdvisorGalaxy-Dawn/claude-scholar5.7k1 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Connect Component To Figma

    dequelabs/cauldron

    Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component.

    129 GitHub stars~2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Monochrome

    vaneenige/monochrome-ui

    Build accessible UI with monochrome, the framework-agnostic UI library for agents.

    132 GitHub stars~2.3k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Components Build

    Asymmetric-al/core

    Build modern, composable, and accessible React UI components following the components.build specification.

    381 GitHub stars~2.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Ss Learn

    bitjaru/styleseed

    Capture a human-approved UI design lesson as a privacy-minimized local StyleSeed candidate, review it, and prepare an opt-in share package without transmitting project code, prompts, screenshots, or…

    972 GitHub stars~1.3k tokensUpdated 7 days ago
    Frontend & DesignAuto-check passed
  • UI/UX Design System Advisor

    Galaxy-Dawn/claude-scholar

    Turns a vague UI request into a concrete design system with style, palette, typography and layout guidance from a search script, plus stack-specific implementation advice.

    5.7k GitHub starsUsed in 1 repo~1.1k tokens
    Frontend & DesignAuto-check passed
  • Building With Lobe UI

    lobehub/lobe-ui

    Build UI with the LobeHub design ecosystem — @lobehub/ui (plus its base-ui, chat, mobile, awesome, brand, mdx, i18n namespaces), @lobehub/icons, @lobehub/charts, @lobehub/fluent-emoji and…

    2.2k GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed

More from chaxus/ran

  • Ranuts

    chaxus/ran

    A skill your agent uses when working with the ranuts utility library — DOM/BOM/string/object/number/color/time helpers and reactivity from ranuts/utils (e.g.

    271 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • A skill your agent uses when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical…

    271 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Ranui

What does Ranui do?

A skill your agent uses when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder —…. Ranui is an agent skill from chaxus/ran. Use when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder — Div/View/Span/signal/createEffect/EventManager).

When should I use Ranui?

Ranui fits situations like: building UI with the ranui web-component library (elements like <r-button; its fluent DOM builder (ranui/builder — Div/View/Span/signal/createEffect/EventManager).

How do I install Ranui in Claude Code?

Run `npx skills add chaxus/ran --skill ranui -a claude-code`. Or copy the skill folder (plugins/ranui/skills/ranui in chaxus/ran) into .claude/skills/ranui in your project. Claude Code loads it when a task matches its description.

How do I install Ranui in Codex?

Run `npx skills add chaxus/ran --skill ranui -a codex`. Or copy the skill folder (plugins/ranui/skills/ranui in chaxus/ran) into .agents/skills/ranui in your project. Codex loads it when a task matches its description.

Can I use Ranui 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 chaxus/ran --skill ranui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ranui, .gemini/skills/ranui, .github/skills/ranui and .opencode/skills/ranui in your project.

What does Ranui need to run?

Going by SKILL.md and its folder, Ranui needs the command-line tools its instructions call (npm).

Does Ranui access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ranui 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 Ranui use?

Ranui 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 Ranui use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ranui?

Skills that share tags, products or a category with Ranui: Connect Component To Figma (dequelabs/cauldron, 129 stars), Monochrome (vaneenige/monochrome-ui, 132 stars), Components Build (Asymmetric-al/core, 381 stars) and Ss Learn (bitjaru/styleseed, 972 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ranui?

chaxus (a GitHub user) maintains it in chaxus/ran, which has 271 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: chaxus/ran on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.