component-composition

component-composition is a skill for Claude Code, Codex from SAP/fundamental-styles. It costs 23 tokens per session (5,576 once invoked), scanned A, original, Apache-2.0.

Guidance for combining components from fundamental-styles, a CSS component library. It explains required wrapper elements, nesting rules, parent-child relationships, and common structures.

In plain words
What is it for?
Use it when combining components, adding required wrappers, checking nesting, or fixing a component that does not work because its structure is wrong.
Why use it?
It helps explain why a component may look or behave incorrectly when its required surrounding elements or hierarchy are missing. It reduces guesswork when assembling several components.

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/sap/fundamental-styles/component-composition
Any agent
npx skills add SAP/fundamental-styles --skill component-composition
Clone the repo
git clone --depth 1 https://github.com/SAP/fundamental-styles

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 component-composition

README.md
[![agentmods](https://agentmods.dev/badge/skills/sap/fundamental-styles/component-composition.svg)](https://agentmods.dev/skills/sap/fundamental-styles/component-composition)
Your own site
<a href="https://agentmods.dev/skills/sap/fundamental-styles/component-composition"><img src="https://agentmods.dev/badge/skills/sap/fundamental-styles/component-composition.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,576 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.00023 $0.05576
Opus 5 $0.00012 $0.02788
Sonnet 5 $0.00005 $0.01115
Haiku 4.5 $0.00002 $0.00558

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

Security

Grade A, and why

component-composition 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 3d 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.

skills/component-composition/SKILL.md · 807 lines

How it starts

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

Component Composition

This skill explains how to combine fundamental-styles components correctly, including required wrappers, nesting rules, and common composition patterns.

When to Use This Skill

Use this skill when:

  • The user asks "How do I combine [component A] with [component B]?"
  • The user needs to understand component structure and nesting
  • The user asks about required wrapper elements
  • The user's component isn't working due to incorrect composition
  • The user asks "Why do I need this wrapper element?"
  • The user wants to understand parent-child relationships between components

Core Composition Principles

1. Always Include Required Wrappers

Many components require specific wrapper elements to function correctly:

<!-- ❌ Wrong - missing wrapper -->
<label class="fd-form-label">Name</label>
<input class="fd-input" />

<!-- ✅ Correct - wrapped in form-item -->
<div class="fd-form-item">
    <label class="fd-form-label">Name</label>
    <input class="fd-input" />
</div>

2. Follow the Component Hierarchy

Each component has a specific structure - don't skip levels:

<!-- ❌ Wrong - missing table__row -->
<table class="fd-table">
    <tbody class="fd-table__body">
        <td class="fd-table__cell">Data</td>
    </tbody>
</table>

<!-- ✅ Correct - proper hierarchy -->
<table class="fd-table">
    <tbody class="fd-table__body">
        <tr class="fd-table__row">
            <td class="fd-table__cell">Data</td>
        </tr>
    </tbody>
</table>

3. Understand Block Independence

Each component (block) is independent. Nesting blocks doesn't create a hierarchy:

<!-- Both are independent blocks, not parent-child -->
<button class="fd-button">
    <i class="sap-icon--edit"></i>
</button>

.fd-button and .sap-icon--edit are two separate blocks living together, not a parent-child BEM relationship.


Common Composition Patterns

Form Item Composition

Components: Form Item + Form Label + Input + Form Message

Read the full file on GitHub · 807 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. 3d ago First seen · 807 lines · 23 tokens per session scan A c94616312e7f

Subscribe to this mod's changes

component-composition is a skill published in the GitHub repository SAP/fundamental-styles (232 stars, last pushed 5d ago), licensed Apache-2.0. It adds 23 tokens to every session and 5,576 once invoked, about $0.0001 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

frontend-v2-theming

Theming, design tokens, colors, and visual language in the RomM v2 frontend. Use when styling v2 components, picking colors, adding/using CSS variables, working with light/dark themes, or whenever you'd reach for a hex/rgba literal. Covers the token pipeline (src/v2/tokens/index.ts → build:tokens → tokens.css), the…

rommapp/romm · 114 tokens

core-web-vitals

Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".

vmDeshpande/ai-agent-automation · 65 tokens

conductor-motion

Generate hand-crafted web animation patterns as self-contained HTML: typewriter/rotator effects, progress bar simulations, file review state machines, staggered reveals, terminal status displays, Lottie orchestration, scroll-driven sequences. Behavioral animations that simulate live software. Triggers on typewriter…

tdimino/claude-code-minoan · 84 tokens

grainient

Recreate grainient.supply's 16 dark-mode visual effects as single-file HTML pages: WebGL shader gradients, vignette overlays, 9-layer box shadows, smooth scroll, spring animations, hover-zoom, ticker marquees, glassmorphism, 3D card flips, bento grids, gradient CTAs. Dark-mode-first with lime green (#C2F13C) accent.…

tdimino/claude-code-minoan · 110 tokens

gemini-forge

Generate frontend code drafts using Gemini 3.1 Pro's one-shot UI generation. Use when building React components, HTML/CSS pages, SVG animations, or converting screenshots to code. Produces fast, cheap drafts (7.5x cheaper than Opus) that Claude reviews and refines. Supports design system context loading (1M token…

tdimino/claude-code-minoan · 124 tokens

impeccable

Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states.…

waynesutton/markdown-site · 189 tokens