design-system-context

design-system-context is a skill for Claude Code, Codex from HermeticOrmus/LibreUIUX-Claude-Code. It costs 31 tokens per session (4,267 once invoked), scanned A, original, MIT.

A design-system context skill for keeping interface rules available to an AI while it creates user interfaces. Design systems define shared colors, spacing, typography, components, and usage rules.

In plain words
What is it for?
Use it to load design tokens, save decisions between sessions, manage design-system variants, and keep generated interfaces consistent.
Why use it?
It helps preserve design decisions across conversations without loading every design detail into the AI at once.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/hermeticormus/libreuiux-claude-code/design-system-context
Any agent
npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill design-system-context
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code

Made for: Claude Code, Codex.

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 design-system-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/libreuiux-claude-code/design-system-context.svg)](https://agentmods.dev/skills/hermeticormus/libreuiux-claude-code/design-system-context)
Your own site
<a href="https://agentmods.dev/skills/hermeticormus/libreuiux-claude-code/design-system-context"><img src="https://agentmods.dev/badge/skills/hermeticormus/libreuiux-claude-code/design-system-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,267 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.1 $0.00031 $0.04267
Opus 5 $0.00015 $0.02133
Sonnet 5 $0.00006 $0.00853
Haiku 4.5 $0.00003 $0.00427

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

Security

Grade A, and why

design-system-context 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.

plugins/context-management/skills/design-system-context/SKILL.md · 656 lines

How it starts

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

Design System Context Management

Master the art of managing design system context for LLM-driven UI development. This skill covers strategies for loading design tokens, persisting decisions, and optimizing context window usage.


When to Use This Skill

  • Loading design tokens into LLM context efficiently
  • Persisting design decisions across sessions
  • Optimizing context window for large design systems
  • Managing multiple design system variants
  • Building context-aware UI generation pipelines
  • Maintaining consistency across agent conversations

The Context Challenge

Design systems contain vast amounts of information:

  • Design tokens: Colors, spacing, typography, shadows, etc.
  • Component specs: 50-200+ components with variants
  • Usage guidelines: Do's, don'ts, examples
  • Brand guidelines: Voice, imagery, personality

The Problem: Context windows are finite. Loading everything wastes tokens and degrades performance.

The Solution: Strategic context management - load what's needed, when it's needed.


Context Architecture

Layered Context Model

Organize design system context in layers of specificity:

Layer 4: Task-Specific Context (highest priority)
         ↑
Layer 3: Component Context
         ↑
Layer 2: Design Token Context
         ↑
Layer 1: Brand/System Context (foundation)

Implementation:

class DesignSystemContext:
    """
    Layered context management for design systems.
    """

    def __init__(self, system_name: str):
        self.layers = {
            "brand": self.load_brand_context(),      # ~500 tokens
            "tokens": self.load_design_tokens(),     # ~2000 tokens
            "components": {},                         # On-demand
            "task": {},                               # Per-request
        }

    def load_brand_context(self) -> dict:
        """
        Layer 1: Foundational brand context.
        Always loaded, rarely changes.
        """
        return {
            "brand_name": "Acme Corp",
            "brand_voice": "Professional, approachable, confident",
            "core_values": ["Simplicity", "Trust", "Innovation"],
            "color_philosophy": "Blue conveys trust, accent sparingly",
            "typography_philosophy": "Clean sans-serif, generous line-height",
        }

    def load_design_tokens(self) -> dict:
        """
        Layer 2: Design tokens.
        Loaded per session, reference frequently.
        """
        return {
            "colors": {
                "primary": {"50": "#EEF2FF", "500": "#6366F1", "900": "#312E81"},
                "gray": {"50": "#F9FAFB", "500": "#6B7280", "900": "#111827"},
                "success": "#10B981",
                "warning": "#F59E0B",
                "error": "#EF4444",
            },
            "spacing": {
                "0": "0", "1": "0.25rem", "2": "0.5rem",
                "4": "1rem", "6": "1.5rem", "8": "2rem",
            },
            "typography": {
                "font_family": "Inter, system-ui, sans-serif",
                "sizes": {"xs": "0.75rem", "sm": "0.875rem", "base": "1rem"},
                "weights": {"normal": 400, "medium": 500, "bold": 700},
            },
            "radius": {"sm": "0.25rem", "md": "0.375rem", "lg": "0.5rem"},
            "shadows": {
                "sm": "0 1px 2px rgba(0,0,0,0.05)",
                "md": "0 4px 6px rgba(0,0,0,0.1)",
            },
        }

    def load_component_context(self, component_name: str) -> dict:
        """
        Layer 3: Component-specific context.
        Loaded on-demand when working on specific components.
        """
        component_docs = self.fetch_component_docs(component_name)
        return {
            "specification": component_docs.spec,
            "variants": component_docs.variants,
            "props": component_docs.props,
            "examples": component_docs.examples[:3],  # Limit examples
            "related_components": component_docs.related[:5],
        }

    def set_task_context(self, task: dict) -> None:
        """
        Layer 4: Task-specific context.
        Fresh per request, highest priority.
        """
        self.layers["task"] = {
            "objective": task.get("objective"),
            "constraints": task.get("constraints", []),
            "preferences": task.get("preferences", {}),
            "previous_decisions": task.get("decisions", []),
        }

Read the full file on GitHub · 656 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 · 656 lines · 31 tokens per session scan A 3b8eb157c879

Subscribe to this mod's changes

design-system-context is a skill published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (101 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 4,267 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-09-03.

Related

Other skills, from other repositories

research-wiki

Persistent research knowledge base that accumulates papers, ideas, experiments, claims, and their relationships across the entire research lifecycle. Inspired by Karpathy's LLM Wiki pattern. Use when user says "知识库", "research wiki", "add paper", "wiki query", "查知识库", or wants to build/query a persistent field map.

wanshuiyin/Auto-claude-code-research-in-sleep · 73 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

mnemon

Persistent memory for MiniMax Code. Recall durable context, store important facts and decisions, and link related memories with the mnemon CLI.

mnemon-dev/mnemon · 30 tokens

Vizra ADK Memory System

Implement persistent memory, session context, and vector memory (RAG) for AI agents.

vizra-ai/vizra-adk · 24 tokens

session-memory

Persist and recall findings across skill runs within and between sessions, building a cumulative knowledge base of what has been discovered about a design system. This is the cross-skill memory layer — it saves what was found, when, and by which skill, so future runs can compare, correlate, and avoid repeating work.…

murphytrueman/design-system-ops · 161 tokens

alive:session-history

Revive sessions (quick or heavy), browse, and search — 'what happened recently?', 'find the session where we discussed X', 'revive yesterday's session'. For single-session recall and multi-session browsing. If the human needs to merge multiple sessions into one working context or detect conflicts between parallel…

alivecontext/alive · 76 tokens