Best for
- Starting a new consumer project (initial capture, run once early)
- After 2+ design tasks in the same project (update to capture what was decided)
- When a subsequent design task produces inconsistent results (audit and reconcile)
event4u-app/agent-config/src/skills/design-system-capture/SKILL.md
Write and maintain DESIGN.md + PRODUCT.md — captures visual decisions and interaction patterns so design tasks stay consistent across sessions without re-scanning past work.
Decision brief
Solves "design amnesia" — the failure mode where every AI design task re-invents visual patterns (radius, shadows, motion, spacing) and interaction patterns (destructive-action handling, optimistic UI, filter persistence) because the agent has no cross-task memory of decisions a…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/design-system-capture"Inspect the Agent Skill "design-system-capture" from https://github.com/event4u-app/agent-config/blob/a36d4658de87e81bda8299dc3a01b9b9ce583af5/src/skills/design-system-capture/SKILL.md at commit a36d4658de87e81bda8299dc3a01b9b9ce583af5. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Primary action: [token name]
1. Check if DESIGN.md and PRODUCT.md already exist in the project root. 2. If they exist: read both → skip to Step 3 (Update). 3. If they don't exist: run existing-ui-audit (if not already done for this session) to inventory existing components, tokens, and conventions → proceed…
1. Check if DESIGN.md and PRODUCT.md already exist in the project root. 2. If they exist: read both → skip to Step 3 (Update). 3. If they don't exist: run existing-ui-audit (if not already done for this session) to inventory existing components, tokens, and conventions → proceed…
1. Extract visual decisions from the audit (state.uiaudit): dominant radius values, shadow patterns, spacing conventions, motion patterns. Fill the DESIGN.md template above with the observed values. Mark un-observed sections as TBD. 2. Extract interaction decisions from the code…
1. Read existing DESIGN.md and PRODUCT.md. 2. Identify any decisions made in recent tasks that aren't yet captured (e.g., a modal was built with 12px radius — add that to DESIGN.md). 3. Correct any TBDs that are now resolved. 4. Update the "Last updated" date. 5. Output a diff s…
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 100/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Solves "design amnesia" — the failure mode where every AI design task re-invents visual patterns (radius, shadows, motion, spacing) and interaction patterns (destructive-action handling, optimistic UI, filter persistence) because the agent has no cross-task memory of decisions already made.
Boundary:
brand-to-tokensextracts primitives (colors, font families → DTCG tokens).existing-ui-auditinventories what exists. This skill captures usage decisions: "we use 8px radius for elevated surfaces", "all destructive actions require typed confirmation". They are complementary, not redundant.Gated by
tokens.rich_skillsin.agent-settings.yml(defaulton). Ifoff, skip rich context loading and work from brief alone.
DESIGN.md and PRODUCT.md serve as the project's design memory. To write useful capture documents and to read/apply them effectively, the agent needs full templates with worked examples showing what a well-structured DESIGN.md and PRODUCT.md look like in practice. A condensed version that says "write down your design decisions" produces documents too vague to be useful. The worked examples teach agents both the vocabulary (elevation, motion strategy, destructive-action policy) and the specificity level that makes these documents actionable across tasks.
DESIGN.md — visual-system decisionsCaptures the visual usage decisions (not token primitives) that agents
should apply consistently across all UI tasks in this project. Unlike
.tokens.json (which records what a color value IS), DESIGN.md records
how and when to use it.
Format:
# DESIGN.md — [Project name] visual system
> AI-readable project design memory. Update after each design decision.
> Last updated: [date]
## Design philosophy
One sentence: [density/formality/complexity philosophy]
## Owned components
| Component | Status | Story file | Registry item |
|---|---|---|---|
| [Name] | stable \| experimental \| deprecated | [path to *.stories.tsx] | [registry item name, or —] |
Example: "Information-dense dashboard; optimize for power users, not casual exploration."
## Owned components — filled from the tree, never from memory
The § Owned components table is populated by **globbing `*.stories.tsx`** (and, when a
Storybook manifest is reachable, reading it — see
[`storybook-workshop`](../storybook-workshop/SKILL.md) § MCP path). One row per component
the project owns: its name, its status, its story file, and its registry item where the
library publishes one.
**Never write a row from memory.** A remembered component is exactly the row a reader will
trust and a `ui-component-architect` run will then skip re-checking — an inventory that is
wrong in the direction of "we already have this" causes the duplicate it exists to prevent.
A component with no story file gets a row with an empty story cell, not an omission: absent
from the table reads as "does not exist".
`deprecated` rows stay in the table. Deleting one loses the only durable record that the
component should not be reached for again.
## Visual system
### Elevation and radius
- Elevated surfaces (modals, sheets, dropdowns): [X]px radius, [shadow-spec]
- Inline elements (cards, chips): [X]px radius
- Buttons: [X]px radius
### Shadows
- Elevated: [box-shadow value]
- Floating (tooltips, popovers): [box-shadow value]
- None (flat cards): [confirm]
### Motion
- Overlays and modals: [spring / easing spec + duration]
- Micro-interactions (button feedback, toggles): [duration + easing]
- Page transitions: [strategy or "none"]
### Spacing
- Base unit: [X]px
- Card padding: [spec]
- Section gap: [spec]
- Tight grouping: [spec]
### Color usage
- Primary action: [token name]
- Destructive: [token name]
- Surface hierarchy: [primary bg → secondary bg → elevated bg]
## Taste Dials
Three 1–10 dials that tune generation. Absent = unset (design-intelligence
infers from the brief via its Dial Inference Table). One-line rationale each.
- Variance: [1–10] — [why; 1 = perfectly symmetric, 10 = expressive/asymmetric]
- Motion: [1–10] — [why; 1 = static, 10 = cinematic]
- Density: [1–10] — [why; 1 = airy, 10 = packed/data-dense]
## Consistency Locks
Within-project invariants (derived from the confirmed system). A value outside
a declared Lock is off-system; the anti-slop detector flags it (rebuttable).
- Theme Lock: [single | light+dark via prefers-color-scheme] — no mid-surface inversion
- Colour Lock: [one accent family] — [the accent hue]
- Shape Lock: [one corner-radius scale] — [the radius set, e.g. 6/12/16px]
## Stack and conventions
- CSS approach: [Tailwind / CSS modules / styled-components / etc.]
- Component primitives: [shadcn / Radix / Headless UI / custom]
- Icon system: [Phosphor / Heroicons / Lucide / etc.]
PRODUCT.md — cross-feature interaction patternsCaptures interaction decisions that should be consistent across features. Unlike a feature spec (which describes one feature), PRODUCT.md captures patterns that apply everywhere.
Format:
# PRODUCT.md — [Project name] interaction patterns
> AI-readable cross-feature pattern memory. Update when a new pattern is established.
> Last updated: [date]
## Destructive actions
Policy: [typed confirmation ("DELETE") / dialog with verb button / undo toast / etc.]
Example: "All destructive actions require the user to type 'DELETE' or the resource name."
## Mutation feedback
Policy: [optimistic UI + inline undo / loading spinner / success toast / etc.]
Undo window: [N seconds, or "not applicable"]
Example: "Optimistic UI for all mutations; inline undo toast for 5 seconds, then commit."
## Filter and sort persistence
Policy: [URL params / localStorage / session / not persisted]
Restore on load: [yes / no]
## Empty states
Approach: [illustration + CTA / text only / skeleton / etc.]
Example: "Illustration + primary CTA for empty lists; text-only for zero-search-results."
## Error handling
Approach: [inline field errors / toast / error boundary / etc.]
Network errors: [retry + message / fail fast / etc.]
## Navigation and routing
Pattern: [SPA / MPA / hybrid / etc.]
Active state: [how active nav items are marked]
## Mental model
One sentence: [how the product conceptualizes itself to the user]
Example: "Dashboard = control panel for power users, not an exploration space."
DESIGN.md and PRODUCT.md already exist in the project root.existing-ui-audit (if not already done for this session) to inventory existing components, tokens, and conventions → proceed to Step 2.state.ui_audit): dominant
radius values, shadow patterns, spacing conventions, motion patterns.
Fill the DESIGN.md template above with the observed values. Mark
un-observed sections as TBD.TBD.DESIGN.md and PRODUCT.md to the project root.DESIGN.md and PRODUCT.md.A consumer can reverse-engineer an existing site/repo's look-and-feel with any external
static-extraction tool and hand the result to this skill as a design-system.json
artifact. We own the import contract, not the crawler. The artifact is observed, not
authoritative: never write it in silently, and a conflict with a registered brand value is
flagged rather than applied (brand-source-of-truth).
Import contract, the /design-system:import supply path, the five-step procedure and the
two source shapes — read only when an import is requested:
references/import-procedure.md. Full schema:
references/design-system-json.md.
When DESIGN.md or PRODUCT.md is present in the project root:
design-intelligence and fe-design: read DESIGN.md at the
start of any design task — use the captured decisions as project
constraints that override corpus suggestions.ui-component-architect: read DESIGN.md for radius/shadow/motion
conventions before proposing any new component.existing-ui-audit: when a full audit is impractical (large project),
read DESIGN.md as a proxy for "what this project's conventions are".The boundary from brand-to-tokens:
.tokens.json carries primitive values (gray-700 = #374151)When handing a design to implementation, emit a README a developer can build
from without the mockup open. Template only — no vendored values (tokens
come from the consumer's .tokens.json / DESIGN.md):
# <Feature> — implementation handoff
Fidelity: <hi-fi = pixel-recreate the mockup | lo-fi = apply the codebase's
existing design system, mockup is directional only>
## Screens
- <screen>: components used + each component's states (default/hover/active/
disabled/empty/error/loading)
## Interactions
- <interaction>: trigger → result, duration + easing (name the token, not a ms
literal)
## Tokens
- Color / type / spacing / radius: reference DESIGN.md / .tokens.json — do not
inline hex or px
## Done means
- Implementable from this README alone; every state and interaction named.
Fidelity declaration is load-bearing: hi-fi vs lo-fi tells the dev whether to recreate the mockup pixel-for-pixel or apply the existing system — the single most common handoff ambiguity.
When the goal is to extract this repo's design system as a reusable package
artifact (not just DESIGN.md prose), the extraction meets this floor — the
handoff shape emitted alongside design-system.json
(import contract).
What to capture FROM a running project: sources first, SSR fetch second, rendered snapshot only with consumer tooling; record the git SHA. Rationale: snapshot preference order.
DESIGN.md/PRODUCT.md before writing; carry
all existing decisions forward and only add/correct. Losing prior
captured history is worse than capturing nothing..tokens.json. It captures usage decisions ("8px radius on elevated
surfaces"), not primitive values ("gray-700 = #374151"). The
distinction is what makes DESIGN.md actionable..tokens.json — it captures decisions,
not token definitions.On create:
DESIGN.md to the project root with the extracted visual decisions.PRODUCT.md to the project root with the extracted interaction patterns.On update:
Frequently asked questions
Solves "design amnesia" — the failure mode where every AI design task re-invents visual patterns (radius, shadows, motion, spacing) and interaction patterns (destructive-action handling, optimistic UI, filter persistence) because the agent has no cross-task memory of decisions a…
The source record exposes this install command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/design-system-capture". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
coreyhaines31/marketingskills
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o
prowler-cloud/prowler
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre