frontend-shadcn-svelte
Guidelines for frontend development in the Currents SvelteKit app — visual identity, component usage, and shadcn-svelte conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidelines for frontend development in the Currents SvelteKit app — visual identity, component usage, and shadcn-svelte conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | frontend-shadcn-svelte |
| description | Guidelines for frontend development in the Currents SvelteKit app — visual identity, component usage, and shadcn-svelte conventions. |
Currents is a visual discovery app (Pinterest alternative). The UI should feel:
hsl(var(--background)), hsl(var(--foreground)), hsl(var(--muted)), hsl(var(--primary)), etc. See the Theming docs for the full token list.flex, grid, gap, p-*, m-*, w-*, h-*, etc. For color/appearance, always prefer CSS variables over Tailwind color classes (e.g. text-foreground not text-gray-900).npx shadcn-svelte@latest add <component>. Do not hand-roll what shadcn-svelte already provides.src/lib/components/ui/ (managed by the CLI). Do not edit them directly — override via CSS variables or wrapper components.src/lib/components/ alongside the ui/ folder.svelte MCP server to look up component APIs and Svelte patterns:
list-sections — browse the docs structureget-documentation — fetch a specific doc pagesvelte-autofixer — catch and fix Svelte 5 issues after writing a componentplayground-link — share a repro if debuggingsvelte-autofixer to confirm there are no rune/syntax issues.You can verify rendered UI (layout, alignment, sizing, screenshots) in a real browser. Playwright and a cached Chromium are already available on this machine via the npx cache — no npm install is needed, and do not add Playwright to package.json just for a check.
Workflow:
npm run dev (reads frontend/.env, serves on http://localhost:5173). The top bar / search UI renders even if the appview backend is down, so most chrome can be checked without the full stack.npx --no-install playwright --version. Find the cached module path with find ~/.npm/_npx -path '*playwright/index.js'..mjs script in /tmp and import the cached module by absolute path (ESM ignores NODE_PATH, and the package isn't resolvable from the project):
import pw from '/Users/<you>/.npm/_npx/<hash>/node_modules/playwright/index.js';
const { chromium } = pw;
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
await page.goto('http://localhost:5173/explore', { waitUntil: 'domcontentloaded' });
// measure: const box = await page.locator('[data-slot=select-trigger]').first().boundingBox();
// screenshot: await page.locator('header').first().screenshot({ path: '/tmp/out.png' });
await browser.close();
boundingBox() returns {x, y, width, height} — ideal for asserting alignment/equal heights. Screenshot to /tmp/*.png and read it back to eyeball the result.width >= 768 viewport to hit the md: breakpoint (the desktop search bar is hidden below it).pkill -f "vite dev") and remove the /tmp script + screenshots when done.Full docs are available as LLM-readable markdown. Reference these when implementing or debugging:
Core
Components
Component docs follow the pattern https://shadcn-svelte.com/docs/components/<name>.md (kebab-case).
Migration & dark mode