New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@monoes/monodesign

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monoes/monodesign

Frontend design intelligence for AI agents — design tokens, antipattern detection, and the monodesign skill

latest
npmnpm
Version
1.2.20
Version published
Maintainers
1
Created
Source

@monoes/monodesign

@monoes/monodesign

npm version license node

Frontend design intelligence for AI agents — OKLCH design tokens, a 51-rule AI-slop antipattern detector, and the /monodesign agent skill for Claude Code and Gemini agy.

Part of the Monomind ecosystem. v1.2.4 · Apache-2.0

Install

npm install @monoes/monodesign

What's Inside

ModuleExport pathPurpose
Design tokens (TS)@monoes/monodesignTyped constants for font, spacing, color, motion
Design tokens (CSS)@monoes/monodesign/tokensCSS custom properties (tokens.css)
Detection engine@monoes/monodesign/engineNode-side 51-rule antipattern detector
Browser bundle@monoes/monodesign/engine/browserBrowser-compatible detector (no Node deps)

Design Tokens

Source: src/tokens.ts + src/tokens.css

All color tokens are in OKLCH — no hex colors in the token system.

Token Categories

CategoryKey Values
TypographyFonts: 'Cormorant Garamond' (display), 'Instrument Sans' (body), 'Space Grotesk' (mono). Scale: xs (12px) → 7xl (72px). Line-heights: 1.2–2.0
Spacing8px base grid: --space-1 (4px) → --space-30 (120px)
ColorNeutrals: ink/charcoal/ash/mist/cream/paper/white. Accent: Editorial Magenta oklch(60% 0.25 350) with 9-stop tonal ramp
MotionExpo-out primary cubic-bezier(0.16,1,0.3,1), plus quint, in-out, in. Durations: 0s → 1.2s
Shadowssm/md/lg/accent. Max 0.15 alpha.
Radiusnone(0) → sm(4px) → md(8px) → lg(12px) → xl(16px) → full(9999px)
Z-indexNamed scale: below(−1) → base(0) → raised(1) → overlay(10) → modal(20) → toast(30) → top(40)

CSS Usage

/* Import CSS custom properties */
@import '@monoes/monodesign/tokens';

.hero {
  font-family: var(--font-display);
  color: var(--color-ink);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-default) var(--easing-expo-out);
}

TypeScript Usage

import { fontFamily, fontSize, spacing, easing, duration, color, accentScale, shadow, radius } from '@monoes/monodesign';

console.log(color.accent);    // oklch(60% 0.25 350)
console.log(spacing[8]);      // 32px
console.log(radius.lg);       // 12px

Antipattern Detection (51 Rules)

Source: cli/engine/registry/antipatterns.mjs — 564 lines, 51 entries.

Rule Categories

slop (21 rules) — AI-generation tells that make UIs feel generic:

side-tab, border-accent-on-rounded, overused-font, single-font, flat-type-hierarchy, gradient-text, ai-color-palette, cream-palette, nested-cards, monotonous-spacing, bounce-easing, dark-glow, icon-tile-stack, italic-serif-display, hero-eyebrow-chip, repeated-section-kickers, numbered-section-markers, em-dash-overuse, marketing-buzzword, aphoristic-cadence, oversized-h1, extreme-negative-tracking, broken-image

quality (24 rules) — Accessibility and design principle violations:

gray-on-color, low-contrast, layout-transition, line-length, cramped-padding, body-text-viewport-edge, tight-leading, skipped-heading, justified-text, tiny-text, all-caps-body, wide-tracking, text-overflow, clipped-overflow-container, design-system-font, design-system-color, design-system-radius, design-system-font-size, missing-focus-visible, small-touch-target, hover-only-affordance, image-missing-dimensions, dark-scheme-contrast-blindspot

Provider-gated (4 advisory rules, opt-in via --gpt/--gemini): gpt-thin-border-wide-shadow, repeating-stripes-gradient, codex-grid-background, theater-slop-phrase

Detection Engines

EngineMethodOptional dep
regexSource text / CSS-in-JS scannone
static-htmlHTMLparser2 static DOM parsenone
browserPuppeteer live-page scanpuppeteer (optional)
visualVisual contrast analysis@monoes/monobrowse (optional)

Auto-Fix

cli/engine/fix/fixers.mjs implements safe per-rule codemods. --dry-run prints unified diffs. --rule <id,...> narrows the fix to specific rule IDs.

OKLCH Palette Seed Library

Source: packages/@monomind/cli/src/commands/design-palette.ts#SEEDS, with the seed data in design-palette-seeds-1.ts and design-palette-seeds-2.ts

  • 129 hand-curated seeds spanning the full hue wheel (0°–360°)
  • Each seed: { id, oklch: [L, C, H], mood: string, strategy: string }
  • Hue-zone weighting: inverse-frequency across 30° buckets — equal probability for all hue regions regardless of seed density
  • Env var override: MONODESIGN_PALETTE_SEED

The /monodesign Agent Skill

Source: skill/SKILL.src.md · v2.0.0 · Apache-2.0

Triggers: /monodesign, /design, /frontend-design, plus 40+ natural-language triggers.

24 Skill Commands

CategoryCommands
Buildcraft, shape, init, document, extract, components, images, palette
Evaluatecritique, audit, research, detect
Refinepolish, bolder, quieter, distill, harden, onboard
Enhanceanimate, colorize, typeset, layout, delight, overdrive
Fixclarify, adapt, optimize
Iteratelive
Managementpin, unpin, hooks

Sub-Agents

Agent fileRole
skill/agents/monodesign-asset-producer.mdImage/asset generation
skill/agents/monodesign-manual-edit-applier.mdAccepts live manual edits during live sessions

Hooks Integration

When enabled (.monodesign/config.json), antipattern detection runs automatically after UI file edits:

{
  "hook": {
    "enabled": true,
    "limits": { "maxFindings": 5, "maxChars": 8000 }
  }
}

Manage via monomind design ignores or /monodesign hooks <on|off|status|ignore-rule|ignore-file|ignore-value|reset>.

CLI Subcommands (monomind design)

CommandPurpose
monomind design detect [-t <path>] [--json]Scan HTML/CSS for antipatterns
monomind design fix [-t <path>] [--dry-run] [--json] [--rule <ids>]Auto-fix with safe codemods
monomind design ignores <list|add-rule|add-file|add-value|remove-rule>Manage detector ignores
monomind design palette [--id <id>] [--from <key>] [--random] [--json]Pick OKLCH brand seed

Design System Consistency

Source: cli/engine/design-system.mjs — 815 lines

Parses DESIGN.md / .monodesign/design.json to enforce consistency rules (design-system-font, design-system-color, design-system-radius, design-system-font-size). The skill writes DESIGN.md; the detector reads it for drift detection.

Search order: DESIGN.md → .agents/context/DESIGN.md → docs/DESIGN.md.

Package Exports

{
  ".":                   "./src/index.ts",
  "./tokens":            "./src/tokens.css",
  "./engine":            "./cli/engine/detect-antipatterns.mjs",
  "./engine/browser":    "./cli/engine/detect-antipatterns-browser.js"
}

Dependencies: css-select, css-tree, domutils, fflate, htmlparser2, marked
Optional: @monoes/monobrowse (browser detection), puppeteer (live URL scanning)

License

Apache-2.0

Keywords

design-system

FAQs

Package last updated on 27 Sep 2026

Related posts