मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)29k · #9361

mastra-frontend

यह क्या करती है

यह स्किल बताती है कि Mastra playground डिज़ाइन सिस्टम से यूज़र इंटरफ़ेस कैसे बनाएँ। यह एजेंट को अपने रंग और आकार बनाने की जगह मौजूदा कॉम्पोनेंट और लेआउट टूल इस्तेमाल करने का मार्गदर्शन देती है।

कब इस्तेमाल करें

  • ✓जब आप Mastra ऐप के लिए कोई पेज या कॉम्पोनेंट बना रहे हों।
  • ✓जब आप Mastra डिज़ाइन सिस्टम से मेल खाने वाला एक जैसा रूप चाहें।
  • ✓जब आप Mastra डिज़ाइन कॉम्पोनेंट इस्तेमाल करने वाले ऐप में लेआउट या स्टाइलिंग जोड़ रहे हों।

Skill का लिंक

https://github.com/mastra-ai/mastra/blob/main/.claude/skills/mastra-frontend/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mastra-ai/mastra/blob/main/.claude/skills/mastra-frontend/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Mastra ऐप के लिए मौजूदा डिज़ाइन सिस्टम कॉम्पोनेंट से सेटिंग्स पेज बनाइए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट पहले काम के लिए उपयुक्त मौजूदा कॉम्पोनेंट खोजता है, फिर उन्हें लेआउट टूल से व्यवस्थित करता है। वह हाथ से लिखे रंग और फ़ॉन्ट से बचता है, क्योंकि लुक डिज़ाइन सिस्टम देता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Building Frontend Interfaces

Every Mastra application UI is assembled from the @mastra/playground-ui design system. Building a screen is composition work: pick existing components, arrange them with layout utilities, and let the design system provide the look. Writing colors, font sizes, shadows, or radii by hand means you have left the happy path. Changing the design system itself (tokens, ds/ components, variants) is a separate, explicitly-approved task. For Tailwind v4 mechanics (renames, dynamic utilities, CSS-first APIs), read the tailwind-v4 skill.

The boundary: look vs layout

  • Look — colors, typography, radius, shadows, borders, internal padding — belongs to the design system. Consumers never restyle it.
  • Layout — positioning, flex/grid placement, gap-*, margins, size constraints (w-*, max-w-*, min-h-*, shrink-0) — belongs to the consumer, through Tailwind utilities on your own wrappers and, when needed, directly on DS components.

className on a DS component is fine for layout (<DialogContent size="xl" className="h-[80vh]">, where size picks the width and the class only pins the height) and forbidden for look (<Button className="bg-red-500 text-xs">). If a component's look doesn't fit, use its variants and props; if none fit, escalate for a new variant instead of overriding.

Find what exists — never guess, never rebuild

  • Components: browse packages/playground-ui/src/ds/components/ (primitives) and src/domains/ (feature components). Check the exports and existing usage before building anything new.
  • Tokens: read the @theme blocks under packages/playground-ui/theme/ (colors, status, data-viz, surfaces, typography, scale, motion), all imported by packages/playground-ui/theme.css, which holds the semantic aliases. The namespace tells you the generated utility: --color-x → bg-x/text-x/border-x, --spacing-x → p-x/gap-x/h-x, --text-x → text-x, --shadow-x → shadow-x, --radius-x → rounded-x. Token names drift — confirm them in the file, never use them from memory.

Choosing a class value

Pick the highest rung that fits; each step down needs a reason:

  1. DS component or variant — the look you need probably already exists.
  2. Generated theme utility from theme.css.
  3. Dynamic v4 utility when the value maps to the spacing scale (min-w-100, size-6, grid-cols-15).
  4. Local CSS custom property consumed via shorthand, for runtime values scoped to one component (bg-(--row-bg), text-(color:--agent-color-fg)).
  5. Square-bracket arbitrary value only for a justified one-off (max-h-[calc(100dvh-3rem)]).

Theme contract

  • theme.css variables are API: adding one generates utilities for every consumer. Never modify theme.css, its layers in packages/playground-ui/theme/, or packages/playground-ui/src/ds/tokens/*.ts without explicit approval. To request a token: document the use case, explain why a local CSS custom property is not enough, and wait for the design team.
  • Runtime-only or single-component values get a plain CSS custom property (which generates no utility) consumed via bg-(--var) — not a new @theme token.
  • When JavaScript needs a theme value, read the CSS variable (var(--color-surface4), getComputedStyle) — never resolveConfig or JS token imports for styling.

Wiring

  • packages/playground-ui/components.css is the design system's stylesheet uncompiled: theme.css, the dark variant (@custom-variant dark (&:is(.dark *))), custom utilities, base styles and keyframes. src/index.css is @import 'tailwindcss' plus that file, for the library build. An app with its own Tailwind build imports components.css and sources.css into its sheet instead of style.css.
  • The palette defaults to dark in :root; html.light flips the semantic variables. Theming is automatic through semantic tokens — never write dark: color overrides on semantic tokens; reserve dark: for rare structural differences.
  • Build conditional or merged class strings with cn() — exported from @mastra/playground-ui for consumers, src/lib/utils.ts inside the package. Its twMerge is extended with the DS scales (src/lib/tw-merge-config.ts), so DS utilities like text-body-sm merge correctly; importing twMerge from tailwind-merge directly mis-merges them.
  • Code inside packages/playground-ui outside ds/ (for example src/domains/) is itself a consumer of the ds/
अक्सर पूछे जाने वाले सवाल

क्या मैं रंग बदल सकता हूँ?

किसी स्क्रीन में सीधे नहीं। लुक और अनुभव डिज़ाइन सिस्टम से आता है, और उसमें बदलाव एक अलग काम है।

अगर कोई कॉम्पोनेंट फ़िट न हो तो?

स्किल मौजूदा लुक को ओवरराइड करने की जगह नया वेरिएंट माँगने की सलाह देती है।

क्या यह Tailwind स्टाइलिंग कवर करती है?

हाँ। यह अपने रैपर पर स्पेसिंग और आकार के लिए Tailwind यूटिलिटी इस्तेमाल करती है।

जानकारी

लेखक का मूल विवरण

How to build Mastra frontend interfaces with the @mastra/playground-ui design system. This skill should be used when creating or modifying any application UI — pages, components, styling, or tokens — in this repo or in an external consumer of the design system. The docs site has its own styling and is out of scope.

repo: mastra-ai/mastra

लोकप्रियता

GitHub स्टार
29k
रैंकिंग में स्थान
#9361
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

debugging-difficult-bugs

29k

यह आपके एजेंट को कठिन बग ढूंढने में मदद करती है, असली प्रोग्राम के रनटाइम लॉग से, केवल टेस्ट देखकर अंदाज़ा लगाने की जगह।

कोडिंगटेस्टिंग

pr-explainer

29k

यह आपके एजेंट को पुल रिक्वेस्ट को एक साफ़, स्व-निहित HTML पेज में बदलने में मदद करती है, जो रिव्यूअर को बदलाव समझाए।

कोडिंगसामान्य कोडिंग

pr-splitter

29k

यह आपके एजेंट को एक बड़ी, उलझी पुल रिक्वेस्ट को छोटी, रिव्यू योग्य पुल रिक्वेस्ट में बांटने में मदद करती है, मूल काम सुरक्षित रखते हुए।

कोडिंगसामान्य कोडिंग

ralph-plan

29k

यह आपके एजेंट को कुछ छोटी बातचीत से एक केंद्रित, व्यवस्थित टास्क कमांड की योजना बनाने में मदद करती है, ताकि काम के साफ़ चरण और जांच हों।

AI और एजेंटप्रॉम्प्ट और LLM

मिलती-जुलती skills