components

A command for building shared interface components in a CSS file and making a temporary page that shows each component in eight states, such as hover, focus, disabled, loading, and error.

In plain words
What is it for?
Use it when creating or updating buttons, forms, or other shared interface pieces. The preview helps inspect normal, interactive, disabled, loading, and error states together.
Why use it?
It keeps reusable visual patterns in one place and makes it easier to check how they look and behave in different situations.

Command for Codex

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 commands/alwkala/tidyfactor-design/components
Clone the repo
git clone --depth 1 https://github.com/alwkala/tidyfactor-design

Made for: Codex.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 527 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.00000 $0.00527
Opus 5 $0.00000 $0.00264
Sonnet 5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00053

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

Security

Grade A, and why

components 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 2d 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.

.agents/skills/tidyfactor-design/references/commands/components.md · 47 lines

How it starts

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

Command: components — The Shared Component Library & 8-State Demo Wrapper

Runtime entry point for authoring shared component classes in components.css and generating an 8-state demo preview.

Purpose

The mechanism that makes the consistency guarantee real: one place where every reusable visual pattern lives. When building a standalone component, this command authors components.css AND generates a temporary 8-state preview wrapper (<Component>.preview.html) rendering all interactive states.

8-State Component Matrix & Demo Wrapper (<Component>.preview.html)

When a component is created or updated, generate <Component>.preview.html rendering all 8 interactive states vertically stacked:

┌──── Component — 8 states ────────────────────────┐
│ default       [ Component default state   ]    │
│ hover         [ Component hover state     ]    │  ← .is-hover
│ focus         [ Component focus state     ]    │  ← .is-focus
│ active        [ Component active state    ]    │  ← .is-active
│ disabled      [ Component disabled state  ]    │  ← disabled / aria-disabled
│ loading       [ Component loading state   ]    │  ← data-state="loading"
│ error         [ Component error state     ]    │  ← data-state="error"
│ success       [ Component success state   ]    │  ... data-state="success"
└────────────────────────────────────────────────┘

What it does

  1. Confirm cssFoundation from brand.json and read matching foundation file.
  2. Author reusable class in design-system/components.css referencing tokens in tokens.css.
  3. Support all 8 states in CSS using both pseudo-classes and preview helper classes (.is-hover, .is-focus, .is-active).
  4. Generate <Component>.preview.html for single-file visual validation.
  5. Never duplicate an existing component under a new name—extend with a modifier class (.card--compact, .btn--accent).

Output Convention

design-system/
├── components.css              ← Reusable component styling with 8-state support
└── Button.preview.html         ← 8-state vertical demo preview wrapper

Read the full file on GitHub · 47 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. 2d ago First seen · 47 lines · 0 tokens per session scan A 307c8e05ae31

Subscribe to this mod's changes

components is a command published in the GitHub repository alwkala/tidyfactor-design (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 527 tokens. 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-31.