.claude/skills/klytos-design-system/SKILL.md
Design principles, color philosophy, component composition patterns, and rules for maintaining visual consistency across the Klytos admin panel. Reference this BEFORE writing any HTML/CSS in admin pages. Covers design tokens, color usage, layout rules, button hierarchy, form patterns, badges, responsive design, CSS architecture, and checklist for new admin pages.
npx skillsauth add joseconti/klytos klytos-design-systemInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
#1a1a1a, #262626, #333333), NOT cold navy/slate.--klytos-space-lg (1.5rem) for section padding.#3a3a3a dark, #e0e0e0 light), never heavy.--klytos-accent blue. Status colors (green/yellow/red) for feedback only.--klytos-font-sans).| Token | Use for |
|-------|---------|
| --klytos-bg | Page background |
| --klytos-bg-elevated | Cards, modals, dropdowns (things that "float") |
| --klytos-bg-sunken | Inset areas: code blocks, inputs, nested containers |
| --klytos-surface | Panel/card backgrounds within the main area |
| --klytos-surface-hover | Hover state for any surface |
| --klytos-border | Standard borders (cards, inputs, tables) |
| --klytos-border-subtle | Very light separators (table rows, internal dividers) |
| --klytos-text | Primary text |
| --klytos-text-secondary | Labels, help text, secondary info |
| --klytos-text-tertiary | Placeholders, disabled text, timestamps |
| --klytos-accent | Links, active tabs, primary buttons, toggle ON |
| --klytos-accent-subtle | Tinted backgrounds for accent (active sidebar item, selected row) |
| --klytos-success / -subtle / -text | Success state feedback |
| --klytos-warning / -subtle / -text | Warning state feedback |
| --klytos-error / -subtle / -text | Error state feedback, destructive buttons |
#2563eb, rgb(...)) — always use var(--klytos-*) tokensstyle="color:..." — use utility classes (.text-muted, .text-error) or component CSS--admin-* or --chat-* in new code — those are backward-compat aliases onlyrgba() for subtle backgrounds — use the -subtle token variants instead<div class="card">
<div class="card-header">
<h3>Section Title</h3>
<span class="text-muted text-sm">Description</span>
</div>
<div class="form-group">
<label>Field Label</label>
<input type="text" class="form-control">
<p class="form-help">Help text here</p>
</div>
<!-- Toggle setting (Claude-style) -->
<div class="flex-between mb-2">
<div>
<strong>Feature Name</strong>
<p class="text-muted text-sm">Description of this feature</p>
</div>
<label class="toggle-switch">
<input type="checkbox" name="feature" value="1">
<span class="toggle-track"></span>
</label>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Items</h3>
<button class="btn btn-primary btn-sm">Add New</button>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>Item name</td>
<td><span class="badge-status badge-active">Active</span></td>
<td>
<button class="btn btn-ghost btn-sm">Edit</button>
<button class="btn btn-ghost btn-sm text-error">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Connections</h3>
<button class="btn btn-outline btn-sm">Explore</button>
</div>
<ul class="connector-list">
<li class="connector-list-item">
<div class="connector-icon"><img src="icon.svg" alt=""></div>
<div class="connector-info">
<div class="connector-name">Service Name</div>
<div class="connector-detail">https://example.com</div>
</div>
<span class="connector-status">Connected</span>
<button class="btn btn-outline btn-sm">Configure</button>
</li>
</ul>
</div>
<div class="stats-grid">
<div class="stat-card">
<div class="stat-label">Total Pages</div>
<div class="stat-value">42</div>
<div class="stat-detail">3 published today</div>
</div>
</div>
<div class="selection-cards cols-2">
<label class="selection-card">
<input type="radio" name="choice" value="a" checked>
<div class="selection-card-body">
<span class="selection-card-title">Option A</span>
<span class="selection-card-desc">Description of option A</span>
</div>
</label>
<label class="selection-card">
<input type="radio" name="choice" value="b">
<div class="selection-card-body">
<span class="selection-card-title">Option B</span>
<span class="selection-card-desc">Description of option B</span>
</div>
</label>
</div>
Variants: .cols-2, .cols-3 for grid columns. .selection-card-body.horizontal for side-by-side layout. .selection-card-body.centered for icon-centered cards (like the importer). JS in footer.php auto-highlights on change.
<div class="alert alert-success">Settings saved successfully.</div>
<div class="alert alert-warning">This action requires confirmation.</div>
<div class="alert alert-error">An error occurred.</div>
<div class="modal-overlay" id="my-modal">
<div class="modal">
<h3>Confirm Action</h3>
<p class="text-muted">Are you sure?</p>
<div class="flex-end flex-gap mt-3">
<button class="btn btn-outline" onclick="closeModal()">Cancel</button>
<button class="btn btn-danger">Delete</button>
</div>
</div>
</div>
header.php → sidebar.php → content → footer.phpadmin-main (padded 1.5rem). No max-width by default..card for any content block. Don't use bare <div> with inline bg/border..grid-2, .grid-3, .grid-2-1 classes. All collapse to 1-column on mobile..mb-2, .mt-1, .flex-gap) instead of inline style="margin:..."..flex-center, .flex-between, .flex-end instead of inline flex styles.| Priority | Class | Use for |
|----------|-------|---------|
| Primary | .btn .btn-primary | Main action per page (Save, Create, Publish) |
| Outline | .btn .btn-outline | Secondary actions (Cancel, Back, Configure) |
| Ghost | .btn .btn-ghost | Tertiary actions, table row actions (Edit, View) |
| Danger | .btn .btn-danger | Destructive actions (Delete, Remove) |
| Icon | .btn .btn-icon | Icon-only buttons (close, settings, hamburger) |
Use .btn-sm for buttons inside tables, cards, or compact areas.
.form-group with a <label> and optional .form-help.form-control for all inputs, selects, and textareas.toggle-switch for boolean on/off settings (preferred over checkboxes)<span style="color:var(--klytos-error);">*</span> inside the label.form-control gets --klytos-bg-sunken background automaticallyUse .badge-status + variant class for all status indicators:
| State | Class | Color |
|-------|-------|-------|
| Active/Published | .badge-active / .badge-published | Green |
| Draft/Inactive | .badge-draft / .badge-inactive | Gray / Red |
| Warning/In Progress | .badge-premium / .badge-in_progress | Yellow |
| Error/Urgent | .badge-urgent | Red |
| Info/Open | .badge-open / .badge-medium | Blue |
installer/admin/assets/css/
├── klytos-tokens.css ← Design tokens (EDIT HERE to change colors globally)
├── klytos-base.css ← Reset, body, layout (admin-layout, topbar, admin-main)
├── klytos-components.css ← All reusable components (buttons, cards, forms, etc.)
├── klytos-sidebar.css ← Admin sidebar navigation
├── klytos-utilities.css ← Utility classes (grid, flex, spacing, text)
├── ai-chat.css ← AI chat page (uses --chat-* mapped to --klytos-*)
├── klytos-editor.css ← Gutenberg editor overrides + dark mode
├── klytos-logs.css ← Log viewer page
└── klytos-plugins.css ← Plugin management page
klytos-components.cssklytos-utilities.cssklytos-{page}.css, load via admin.stylesheets filter--klytos-* tokens<style> blocks or style="" attributesAlways include a fallback when using tokens, for resilience:
color: var(--klytos-text, #e8e8e8);
klytos_apply_filters('admin.stylesheets', []) — add CSS URLs to loadklytos_do_action('admin.head', $cspNonce) — inject <style> with nonce (last resort)klytos_do_action('admin.head_meta', $cspNonce) — add meta tagsheader.php / sidebar.php / footer.php template structure--klytos-* tokens (no hardcoded hex).card, .btn, .form-group, etc. component classesstyle="" (use utility classes instead)<script> tags have nonce="<?= klytos_esc_attr($cspNonce) ?>"admin.{page}.before, admin.{page}.afterklytos_csrf_field() and klytos_verify_csrf()installer/admin/assets/css/klytos-tokens.cssinstaller/admin/assets/css/klytos-components.cssinstaller/admin/assets/css/klytos-base.cssinstaller/admin/assets/css/klytos-sidebar.cssinstaller/admin/assets/css/klytos-utilities.cssinstaller/admin/templates/header.phpdevelopment
Guide for working with dates, times, and timezones in Klytos CMS. Use when formatting dates, converting timezones, scheduling actions with timestamps, displaying local time, working with UTC storage, building timezone selectors, or using any klytos_date/klytos_gmdate/klytos_timezone functions.
tools
Guide for developing and extending the Klytos web terminal. Use when modifying terminal commands, adding terminal commands from plugins, fixing terminal bugs, extending the pseudo-terminal, working with TerminalExecutor class, registering custom permissions, adding custom category labels, or managing terminal UI and security.
development
--- name: klytos-site-builder description: Guide for building a complete website from scratch with Klytos CMS. Use when creating a new site, configuring a site after installation, setting up design/content/SEO/navigation, or when the user pastes the post-install prompt. Covers 9 phases: discovery, design reference, global config, theme, content structure, templates, content creation, additional features, and launch. --- # Klytos Site Builder ## Overview The Site Builder is a conversational AI
development
Use when creating or editing page content in Klytos CMS. Ensures every page has proper SEO structure, HTML semantics, meta tags, structured data, accessibility for maximum search engine visibility. Apply when writing page titles, descriptions, content, headings, images, internal links, JSON-LD schema, or following the SEO checklist before publishing pages.