Shade use primitives

A coding rule for Shade, a user-interface component library, that replaces layout-only div elements with named layout components.

In plain words
What is it for?
It is for updating TSX files that use Shade so rows, columns, grids, containers, spacing, and text use the library’s primitives.
Why use it?
It makes the purpose of a layout clearer than a string of flex, grid, and spacing classes.

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/tryghost/ghost/shade-use-primitives
Any agent
npx skills add TryGhost/Ghost --skill shade-use-primitives
Clone the repo
git clone --depth 1 https://github.com/TryGhost/Ghost

Made for: Claude Code, Codex.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 826 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.00054 $0.00826
Opus 5 $0.00027 $0.00413
Sonnet 5 $0.00011 $0.00165
Haiku 4.5 $0.00005 $0.00083

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

Security

Grade A, and why

Shade use primitives 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/shade-use-primitives/SKILL.md · 79 lines

How it starts

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

Shade — use primitives, not flex divs

A <div> whose className is only flex / grid / gap / items-* / justify-* utilities is a primitive call site. Use a Shade primitive instead so layouts read by intent, not by class string.

import {Stack, Inline, Box, Grid, Container, Text} from '@tryghost/shade/primitives';

Picking the primitive

You need Use Element
Column of children Stack flex-col
Row of children Inline flex-row (with optional wrap, as)
Padding / radius around content Box div with padding, radius props
Two-dimensional layout Grid display: grid
Width-constrained shell Container max-width wrapper
Text with size/tone/weight Text as, size, tone, weight

Use the semantic gap scale, not raw numbers

gap="md" reads as intent and resolves to the shared spacing scale. Mapping:

Step Tailwind Use for
none gap-0 flush
xs gap-1 inline icons-to-text
sm gap-2 dense lists, badges
md gap-3 default row/column spacing
lg gap-5 section spacing
xl gap-6 between major blocks
2xl gap-8 page-level rhythm

The same scale applies to Box padding (padding="md"p-3).

Correct

<Box padding="lg" radius="md" className="border border-border-default">
    <Inline align="center" gap="md" justify="between">
        <Stack gap="xs">
            <Text weight="semibold">Email notifications</Text>
            <Text size="sm" tone="secondary">Get notified about engagement.</Text>
        </Stack>
        <Switch />
    </Inline>
</Box>

Read the full file on GitHub · 79 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 · 79 lines · 54 tokens per session scan A fde83145cc68

Subscribe to this mod's changes

Shade use primitives is a skill published in the GitHub repository TryGhost/Ghost (55,095 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 826 once invoked, about $0.0003 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

seo-review

Perform a focused SEO audit on JavaScript concept pages to maximize search visibility, featured snippet optimization, and ranking potential.

leonardomso/33-js-concepts · 25 tokens

test-writer

Generate comprehensive Vitest tests for code examples in JavaScript concept documentation pages, following project conventions and referencing source lines.

leonardomso/33-js-concepts · 26 tokens

fact-check

Verify technical accuracy of JavaScript concept pages by checking code examples, MDN/ECMAScript compliance, and external resources to prevent misinformation.

leonardomso/33-js-concepts · 30 tokens

debug-task

Diagnose and fix moon tasks that are broken, misconfigured, or behaving unexpectedly. Use this skill when a moon task is failing, not running, skipped, hanging, producing stale or wrong output, cached when it shouldn't be, re-running every time when it should be cached, or when outputs are empty or missing after a…

moonrepo/moon · 231 tokens

featurevisor

Author, query, and integrate Featurevisor — Git-based feature flags, A/B experiments, and remote config. Use whenever the user mentions Featurevisor, works in a project containing featurevisor.config.js, edits files under attributes/, segments/, features/, variables/, groups/, schemas/, targets/, sets/, or tests/…

featurevisor/featurevisor · 266 tokens

javascriptcore-garbage-collector

JSC GC reference for Bun. Use for use-after-free, JS object leaks, "collected too early", or when touching WriteBarrier, visitChildren, visitAdditionalChildren, JSRef, JSC::Strong/Weak, hasPendingActivity, ensureStillAlive, addOpaqueRoot, reportExtraMemoryAllocated, IsoSubspace, HeapAnalyzer, finalize.

oven-sh/bun · 80 tokens