css-subgrid

css-subgrid is a skill for Claude Code from fubits1/svelte-skills. It costs 46 tokens per session (1,161 once invoked), scanned A, original, MIT.

A CSS layout technique called subgrid that lets repeated cards share the same internal row sizes. CSS is the language used to style web pages.

In plain words
What is it for?
Use it for responsive card grids, tile layouts, and other repeated components whose inner content must line up across neighboring items.
Why use it?
It keeps icons, labels, prices, and buttons aligned across cards even when their text has different lengths, without fixed heights or layout hacks.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the frontend plugin — 13 skills shipped together

Good fit Use it for responsive card grids, tile layouts, and other repeated components whose inner content must line up across neighboring items.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fubits1/svelte-skills/css-subgrid
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.

Any agent
npx skills add fubits1/svelte-skills --skill css-subgrid
Clone the repo
git clone --depth 1 https://github.com/fubits1/svelte-skills

Made for: Claude Code.

Or install frontend, the plugin that ships this one along with the rest of its 13 skills.

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 css-subgrid

README.md
[![agentmods](https://agentmods.dev/badge/skills/fubits1/svelte-skills/css-subgrid.svg)](https://agentmods.dev/skills/fubits1/svelte-skills/css-subgrid)
Your own site
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/css-subgrid"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/css-subgrid.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,161 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.00046 $0.01161
Opus 5 $0.00023 $0.00580
Sonnet 5 $0.00009 $0.00232
Haiku 4.5 $0.00005 $0.00116

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

Security

Grade A, and why

css-subgrid 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 8d 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.

plugins/frontend/skills/css-subgrid/SKILL.md · 124 lines

How it starts

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

CSS Subgrid for Card Layouts

Overview

CSS Subgrid lets grid children inherit parent track sizing, so inner content (icons, labels, prices, CTAs) aligns across sibling cards without fixed heights or hacks.

When to Use

  • Repeated card/tile components where inner elements must align horizontally across cards
  • Icon + label grids where icons should share a row track
  • Any layout where variable-length content in one card shouldn't break alignment with siblings

When NOT to use:

  • Single-column layouts (no siblings to align with)
  • Cards with identical fixed content heights (subgrid adds no value)

Core Pattern

/* Parent: responsive wrapping grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 200px));
  justify-content: center;
  gap: 1rem;
}

/* Child: spans N rows and inherits parent row tracks */
.card {
  display: grid;
  grid-row: span 2; /* one per content section: icon + label = 2 */
  grid-template-rows: subgrid;
  justify-items: center;
  align-content: center;
  gap: 0.5rem;
}

How it works

  1. Parent defines columns with auto-fill + minmax() for responsive wrapping
  2. Parent does NOT need explicit grid-template-rows: implicit auto rows are created
  3. Child uses grid-row: span N (N = number of content sections per card)
  4. Child uses grid-template-rows: subgrid to inherit parent row tracks
  5. All cards in the same visual row share track heights, so content aligns

Key Decisions

Column sizing: minmax(min, max) NOT minmax(min, 1fr)

Using 1fr as max stretches cards to fill available space, cards become too wide and look bad:

/* BAD: cards stretch to fill row */
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));

/* GOOD: cards stay compact, max 200px */
grid-template-columns: repeat(auto-fill, minmax(140px, 200px));

Use justify-content: center on the parent to center the grid tracks.

auto-fill vs auto-fit

  • auto-fill: creates as many tracks as fit, empty tracks remain (grid stays compact)
  • auto-fit: collapses empty tracks, items stretch to fill (can cause unwanted stretching with 1fr)

Read the full file on GitHub · 124 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. 8d ago First seen · 124 lines · 46 tokens per session scan A 2b78e38ee191

Subscribe to this mod's changes

css-subgrid is a skill published in the GitHub repository fubits1/svelte-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,161 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 50 tokens

frontend-visual-qa

Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…

daymade/claude-code-skills · 145 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

waitlist-page

A simple waitlist page for collecting email addresses from people interested in a new product or early-access release.

nexu-io/html-anything · 25 tokens

animation-principles

Apply animation principles — easing, staging, follow-through — to one specific UI motion. Use when tuning how an animation feels. For product-wide duration and easing tokens use motion-system (design-systems); for a full interaction spec use micro-interaction-spec.

Owl-Listener/designer-skills · 59 tokens