webui-code

webui-code is a skill for Claude Code, Codex from chromium/chromium. It costs 33 tokens per session (788 once invoked), scanned A, original, BSD-3-Clause.

A coding guide for Chrome WebUI, the browser's web-based interface, built with Lit, a TypeScript library for web components. It covers architecture, styling, safety rules, and use of Chrome's existing interface components.

In plain words
What is it for?
Use it when creating or reviewing Chrome WebUI components, including their TypeScript, HTML templates, CSS, naming, layout, and component choices.
Why use it?
It helps prevent code that conflicts with Chromium's WebUI rules or Chrome's design system. It also reduces the need to create duplicate components when suitable ones already exist.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 ui/webui/resources/tools/stylelint.py --config ui/webui/resources/tools/stylelint.config_base.mjs --in_folder <relative_folder_path> --in_files <file_na.

Good fit Use it when creating or reviewing Chrome WebUI components, including their TypeScript, HTML templates, CSS, naming, layout, and component choices.

Compare 6 skills from other repositories ↓
About the project

Chromium is an open-source web browser project and the official GitHub mirror of its source code. It is used to build and maintain software for browsing the web, with documentation and code for products such as Chrome and Android WebView.

chromium/chromium · 25,489 stars · on GitHub · chromium.googlesource.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/chromium/chromium
agentmods
npx agentmods add skills/chromium/chromium/webui-code

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 webui-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/chromium/chromium/webui-code/github.svg)](https://agentmods.dev/skills/chromium/chromium/webui-code)
Your own site
<a href="https://agentmods.dev/skills/chromium/chromium/webui-code"><img src="https://agentmods.dev/badge/skills/chromium/chromium/webui-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webui-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/chromium/chromium/webui-code"><img src="https://agentmods.dev/badge/skills/chromium/chromium/webui-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 788 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00033 $0.00788
Opus 5.5 $0.00013 $0.00315
Sonnet 5.5 $0.00007 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 2mo ago against content hash 2f8387813bba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

webui-code 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 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/component_name.html.ts, assets/component_name.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

agents/projects/chrome-design-system/skills/webui-code/SKILL.md · 81 lines

How it starts

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

WebUI: Coding Guidelines

General WebUI Guidelines

  • Adhere to the official Chromium WebUI documentation. Read and follow the guidelines in these files:
  • Adhering to the Chrome Design System. Reference component specs for relevant components using the chrome-components skill. Ensure code follows the guidelines for each component.
  • As much as possible, prefer leverage existing WebUI components rather than creating new, bespoke components. Components are located under ui/webui/resources/cr_elements/ and ui/webui/resources/cr_components/.

Component Implementation

When implementing a new component, create these files.

File 1: <component_name>.ts

The main TypeScript file defining the element class. It must:

  1. Extend CrLitElement.
  2. Expose the static is getter (returning the kebab-case tag name).
  3. Load the CSS and HTML template wrappers:
    import { getCss } from './<component_name>.css.js';
    import { getHtml } from './<component_name>.html.js';
    

Example Boilerplate: component_name.ts

File 2: <component_name>.html.ts

The HTML template containing the Lit markup.

  1. Must wrap the template in html literal.
  2. Must use slot elements correctly (e.g. slot="title", slot="body", slot="footer").

Example Boilerplate: component_name.html.ts

File 3: <component_name>.css

Stylesheet guidelines:

  • Lit Compilation Metadata Headers: It must contain the Lit compilation metadata headers importing shared variables so that the build system can wrap it into a Lit stylesheet module.
  • Chromium Stylelint Rules: It must follow the style lint rules for Chromium WebUI (//src/ui/webui/resources/tools/stylelint.config_base.mjs).
  • Lint feedback loop: Run Chromium's stylelint script (below) and fix errors. Repeat until there are no more errors.
    python3 ui/webui/resources/tools/stylelint.py --config ui/webui/resources/tools/stylelint.config_base.mjs --in_folder <relative_folder_path> --in_files <file_name>.css --out_file /tmp/stylelint.out
    
  • Token Fallback Chaining: Always declare Material 3 dynamic tokens using Chromium's shared fallback variables (var(--color-sys-<token>, var(--cr-fallback-color-<token>))):
    /* Preferred: Dynamic Material 3 token with Chromium fallback */
    background-color: var(--color-sys-surface2, var(--cr-fallback-color-surface2));
    
    /* Anti-pattern: Hardcoded hex fallbacks */
    background-color: var(--color-sys-surface2, #f3f6fc);
    

Read the full file on GitHub · 81 lines

Files

What ships with it

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

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. 2mo ago First seen · 81 lines · 33 tokens per session scan A 2f8387813bba

Subscribe to this mod's changes

webui-code is a skill published in the GitHub repository chromium/chromium (25,489 stars, last pushed today), licensed BSD-3-Clause. It adds 33 tokens to every session and 788 once invoked, about $0.0001 per session on Opus 5.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-09-12.

Related

webui-code compared with skills from other repositories

webui-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
webui-codechromium/chromiumSkill25ktodayBSD-3-ClauseA33Claude Code, Codex
page-screenshotsdieter-medium/bidi2pdfSkill58yesterdayMITA74Claude Code
pagousegianlucamazza/pagouseSkill024d agoMITA62Claude Code, Codex
anti-slop-designsickn33/agentic-awesome-skillsSkill51ktodayMITA34Claude Code
chakra-ui-builderchakra-ui/chakra-uiSkill41ktodayMITA214Claude Code, Codex
baseline-uivercel-labs/open-agentsSkill5.9kyesterdayMITA48Claude Code, Codex
open-design-setupcompozy/compozySkill2.9ktodayMITA67Claude Code, Codex