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/github.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/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 css-subgrid

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00018 $0.00464
Sonnet 5.5 $0.00009 $0.00232
Haiku 4.5 $0.00005 $0.00116

Measured 2mo ago against content hash 2b78e38ee191, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 12d ago), licensed MIT. It adds 46 tokens to every session and 1,161 once invoked, about $0.0002 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-31.

Related

css-subgrid compared with skills from other repositories

css-subgrid next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
css-subgridfubits1/svelte-skillsSkill1012d agoMITA46Claude Code
anti-slop-designsickn33/agentic-awesome-skillsSkill49kyesterdayMITA34Claude Code
chakra-ui-builderchakra-ui/chakra-uiSkill41kyesterdayMITA214Claude Code, Codex
visual-ralphYeachan-Heo/oh-my-codexSkill34k4d agoMITA52Codex
open-design-setupcompozy/compozySkill2.8kyesterdayMITA67Claude Code, Codex
edit-sitemicrosoft/power-platform-skillsSkill1.1kyesterdayMITA104Claude Code
frontend-visual-qadaymade/claude-code-skillsSkill1.5kyesterdayMITA125Claude Code, Codex