ds-guard

ds-guard is a skill for Claude Code from jerseycheese/agent-skills. It costs 76 tokens per session (1,935 once invoked), scanned A, original, MIT.

A design-system checking skill that reviews styling changes in CSS, JavaScript, and TypeScript UI files. A design system is the project’s shared set of colors, spacing, typography, and other visual rules.

In plain words
What is it for?
Use it after editing visual styles, components, classes, inline styles, or design tokens to check the changes against the project’s approved style rules.
Why use it?
It catches hard-coded or inconsistent styling choices before they spread through the interface.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event.

Part of the workflow-skills plugin — 35 skills shipped together

Good fit Use it after editing visual styles, components, classes, inline styles, or design tokens to check the changes against the project’s approved style rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerseycheese/agent-skills/ds-guard
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 jerseycheese/agent-skills --skill ds-guard
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 35 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 ds-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerseycheese/agent-skills/ds-guard/github.svg)](https://agentmods.dev/skills/jerseycheese/agent-skills/ds-guard)
Your own site
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/ds-guard"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/ds-guard/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 ds-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/ds-guard"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/ds-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,935 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.00076 $0.01935
Opus 5.5 $0.00030 $0.00774
Sonnet 5.5 $0.00015 $0.00387
Haiku 4.5 $0.00008 $0.00194

Measured 9d ago against content hash 880a56022ce6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ds-guard 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 9d 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/ds-guard/SKILL.md · 135 lines

How it starts

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

When to invoke (auto-trigger)

Invoke this skill automatically whenever:

  • Any .css file is edited
  • A .tsx / .jsx file is edited and the diff contains className, style=, or CSS custom properties
  • A new component is created
  • A new CSS class is introduced

Do NOT wait for the user to ask. Run as part of the normal post-edit flow for any styling change.

The trigger depends on this description matching. To make the reminder deterministic, you can add your own PostToolUse hook in settings.json; this repo does not ship one. The hook has to print JSON with hookSpecificOutput.additionalContext: plain text on stdout only shows in the transcript view and never reaches the model. It fires after every Edit, Write, or MultiEdit, not just styling edits, so the reminder still leaves it to the model to decide whether the edit touched styling. Minimal example:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PostToolUse\", \"additionalContext\": \"If this edit touched styling (.css, className, style=), run the ds-guard skill.\"}}'"
          }
        ]
      }
    ]
  }
}

Effort gating: at high/xhigh/max run the full audit against the token inventory and showcase (Steps 1+); at lower effort a quick spot-check of the diff's hardcoded values is enough.

DS Guard — Design System Enforcement

Purpose

Audit a diff or set of files to ensure every styling decision goes through the project's design system token layer. Catch violations before they land.

Step 1 — Discover the token inventory

Find the project's token source files:

  • Look for src/lib/theme/themes/*.css, tokens.css, design-tokens.*, or similar
  • Extract all defined --* custom property names
  • Note the token namespaces in use (e.g. --color-*, --space-*, --font-*, --radius-*)

If no token files are found, ask the user where the design system is defined before proceeding.

Read the full file on GitHub · 135 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. 9d ago Changed · +20 lines scan B → A 880a56022ce6
  2. 21d ago Changed · -1 lines · -35 tokens per session bbaaf98a09c4
  3. 2mo ago First seen · 116 lines · 111 tokens per session scan B 55d93f18c693

Subscribe to this mod's changes

ds-guard is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 1,935 once invoked, about $0.0003 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

ds-guard compared with skills from other repositories

ds-guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ds-guardjerseycheese/agent-skillsSkill4yesterdayMITA76Claude Code
omh-frontendrlaope/oh-my-hermesSkill5.2kyesterdayMITA76Claude Code, Codex
omh-visual-qarlaope/oh-my-hermesSkill5.2kyesterdayMITA70Claude Code, Codex
design-craftWrongStack/WrongStackSkill404yesterdayMITA98Claude Code
design-critiqueWrongStack/WrongStackSkill404yesterdayMITA95Claude Code, Codex
color-palette-generatorAlpacaLabsLLC/skills-for-architectsSkill4023d agoMITA41Claude Code
design-systemjuspay/xyne-spacesSkill826yesterdayApache-2.0A30Claude Code, Codex