ds-guard

ds-guard is a skill for Claude Code from jerseycheese/agent-skills. It costs 111 tokens per session (1,811 once invoked), scanned B, 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. Also seen: reads .claude/ paths.

Part of the workflow-skills plugin — 31 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 31 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 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,811 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00111 $0.01811
Opus 5 $0.00056 $0.00905
Sonnet 5 $0.00022 $0.00362
Haiku 4.5 $0.00011 $0.00181

Measured 9d ago against content hash 55d93f18c693, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

ds-guard scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

A `PostToolUse` hook (`~/.claude/hooks/ds-guard-trigger.py`, wired in `~/.claude/settings.json`) now fires deterministically on every styling-file edit and injects a reminder, so the trigger no longer depends on this des
skills/ds-guard/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 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.

A PostToolUse hook (~/.claude/hooks/ds-guard-trigger.py, wired in ~/.claude/settings.json) now fires deterministically on every styling-file edit and injects a reminder, so the trigger no longer depends on this description matching. 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.

Step 2 — Discover the living style guide (canon, if one exists)

Look for a living style guide — a page that renders the real production components as the reference, so it can't drift from the app. Projects also call it a pattern library, component catalog, design-system page, showcase, or Storybook. Do NOT assume one exists. Common locations: src/app/design-system/, src/pages/ds/, src/app/ds*/, /design-system*, storybook stories/ dirs.

If a living style guide exists, treat it as canon:

  • Any component pattern, spacing, color usage, or variant shown there takes precedence over what the diff introduces.
  • A diff that introduces a new pattern absent from it → flag it (add it to the living style guide first, or reuse an existing pattern).
  • A diff that contradicts it (e.g. a button style differing from the canon button) → violation.

Read the full file on GitHub · 116 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 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 (1 stars, last pushed 8d ago), licensed MIT. It adds 111 tokens to every session and 1,811 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

ui-ux-design

Create production-grade frontend interfaces with strong UX and visual craft. Use when building web components, pages, dashboards, forms, landing pages, modals, or any UI. Use when user says 'build a form', 'create a dashboard', 'design a component', 'make a landing page', or asks for UI/UX work. Use even when the user…

arvindand/agent-skills · 98 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

Jamkris/everything-gemini-code · 41 tokens

openclaw-color-palette

Design-grade color processing suite — generate harmonious palettes from any seed color, check WCAG 2.1 AA/AAA contrast accessibility, convert between hex/RGB/HSL/HSV/CMYK, simulate 8 color blindness types, and extract dominant colors from images. Use when: (1) user says 'generate a color palette' or 'give me a color…

yedanyagamiai-cmd/openclaw-mcp-servers · 207 tokens

design-system

Generate and audit visual design systems for consistency.

Jamkris/everything-gemini-code · 11 tokens

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).

Jamkris/everything-gemini-code · 47 tokens

web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

trinhhaox/ag-kit · 44 tokens