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.
git clone --depth 1 https://github.com/thematters/matters-webWrote 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/rules/thematters/matters-web/ui-component-convention)<a href="https://agentmods.dev/rules/thematters/matters-web/ui-component-convention"><img src="https://agentmods.dev/badge/rules/thematters/matters-web/ui-component-convention/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.
<a href="https://agentmods.dev/rules/thematters/matters-web/ui-component-convention"><img src="https://agentmods.dev/badge/rules/thematters/matters-web/ui-component-convention.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00008 | $0.00386 |
| Opus 5.5 | $0.00003 | $0.00154 |
| Sonnet 5.5 | $0.00002 | $0.00077 |
| Haiku 4.5 | $0.00001 | $0.00039 |
Grade A, and why
ui-component-convention 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 3mo 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.
What it actually says
UI Components Convention
Matters Web uses a standardized approach for UI components with consistent patterns for props, styling, and variations.
Here we use src/components/Button as an example:
Type Definitions
- Props are strongly typed with explicit, restricted values
- Component variations use union types (e.g.,
ButtonWidth,ButtonColor) - Core props are exported for reuse while internal types remain private
- Uses TypeScript's
Extractto define subsets of broader types
Styling Approach
- Uses CSS Modules with classNames utility for conditional styling
- Follows a pattern of
{property}{Value}for class names (e.g.,textGreen,borderRed) - Handles dynamic styles through prop-based conditions
- Provides active/hover states via separate props (e.g.,
textActiveColor) - Uses CSS variables from the global theme
Component Structure
- Accepts standardized size and spacing parameters
- Supports multiple rendering options (button, link, anchor, span)
- Implements forwardRef for ref forwarding
- Provides comprehensive documentation with usage examples
- Uses a consistent structure for container and content
Best Practices
- Centralize shared prop types in the component file
- Use descriptive prop names that indicate purpose
- Document component behavior using JSDoc comments
- Include usage examples for complex components
- Handle accessibility considerations (focus states, keyboard navigation)
- Ensure all interactive elements have appropriate event handlers
When Creating UI Components
- Start by defining clear prop interfaces with TypeScript
- Create a dedicated styles.module.css with the same structure as the component
- Follow naming conventions established in existing components
- Use classNames for conditional class application
- Include comprehensive JSDoc documentation
- Ensure consistent behavior across rendering contexts
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.
- 3mo ago First seen · 52 lines · 8 tokens per session scan A 4468a66612f1
ui-component-convention is a cursor rule published in the GitHub repository thematters/matters-web (85 stars, last pushed 7d ago), licensed Apache-2.0. It adds 8 tokens to every session and 386 once invoked, about $0.0000 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-08-30.
ui-component-convention compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ui-component-conventionthematters/matters-web | Cursor rule | 85 | 7d ago | Apache-2.0 | A | 8 | Cursor |
| external-scaleOcean-Industries-Concept-Lab/openbridge-webcomponents | Cursor rule | 114 | today | none | A | 0 | Cursor |
| codex-premium-website-skillsTheGoat395/Codex-Skills | Cursor rule | 140 | 1mo ago | MIT | A | 0 | Cursor |
| mobile-first-uiunstackedapps/opensuitemcp | Cursor rule | 34 | 1mo ago | none | A | 510 | Cursor |
| ui-motion-workflowpowehi-eu/ui-motion-workflow | Cursor rule | 6 | 4mo ago | MIT | A | 0 | Cursor |
| frontend-design-directionOriolshhh/runware-image-mcp | Cursor rule | 0 | 4mo ago | MIT | A | 17 | Cursor |
| 7-day-nextjs-web-design-cursormattcsnyder/7-day-mobile-and-web-design-skill | Cursor rule | 2 | 6mo ago | none | A | 16 | Cursor |