codebase-aware-ui-prompts
БесплатноБез исполняемых скриптовНе проверенTransform product requirements into precise, architecture-preserving UI implementation prompts for Cursor, Claude Code, v0, Lovable, and Stitch without…
от sickn33★ 50 670 звёзд на GitHubОб этом скилле
Codebase-Aware UI Implementation Prompts
Transform feature requests and visual requirements into precise, architecture-preserving implementation briefs for AI coding agents (Cursor, Claude Code, Antigravity CLI, GitHub Copilot) and UI generators (v0.dev, Lovable, Bolt.new, Google Stitch).
This skill enforces strict codebase discovery, token reuse, dependency preservation, component-applicable interaction states, and five-tier verification to prevent AI code generation from introducing duplicate libraries, hardcoded hex colors, and broken accessibility patterns.
1. Concrete Division of Labor (Skill Boundaries)
To prevent duplication and context bloat across agent interactions, adhere strictly to these ownership boundaries:
| Domain Area | Codebase-Aware UI Prompts (This Skill) | UI/UX Pro Max (ui-ux-pro-max) |
Design System (design-system) |
Cinematic UI/UX (cinematic-ui-ux) |
|---|---|---|---|---|
| Primary Mission | Transforms feature requests into architecture-preserving prompts & implementation briefs. | Reference catalog of 50+ styles, 96 palettes, 57 font pairings, and 99 UX heuristics. | Mechanical rules for token architecture, FOUT prevention, and loading order. | Production GSAP timelines, Lenis smooth scroll, canvas frame scrubbing, route transitions. |
| Existing Codebases | Audits installed packages, forces reuse of @/components/ui/* and existing CSS variables. |
Look up optimal aesthetic style for a domain. | Defines 3-tier token hierarchy from scratch. | Animates existing components with physics and gesture mechanics. |
| Prompt Engineering | Platform-specific contracts (Cursor, v0, Lovable, Stitch) with applicable state matrices. | None; reference lookup. | None; CSS guidelines. | Illustrative Playwright E2E motion test fixtures. |
| Interaction States | Calibrated matrix defining which of the 8 states apply to which component types. | General UX guidelines on touch targets and hover states. | Surface elevation tokens (base, raised, overlay). | Decorator pause controller and reduced-motion branches. |
| Dependency Guard | Forbids installing competing packages or hardcoding hex colors. | Recommends libraries based on technology stack. | Forbids arbitrary hex colors in CSS tokens. | Coordinates Lenis with ScrollTrigger ticker authority. |
2. The Five Core Preservation Invariants
When prompting an AI agent to build a feature inside an existing codebase, enforce these non-negotiable constraints:
- Zero New Competing Dependencies: Never install a package if an equivalent already exists in
package.json(e.g., do not addframer-motionifmotionortailwindcss-animateis present; do not addlucide-reactif@radix-ui/react-iconsis present). - Token Inheritance Over Hex Values: Never allow hardcoded hex colors (
bg-[#0B0F19]). All visual styles must inherit existing semantic CSS variables or theme classes (bg-background,bg-card,text-card-foreground,border-border,text-primary). - Component Composition Over Duplication: Never re-scaffold a basic primitive. If
button.tsxordialog.tsxexists in@/components/ui/, the prompt must instruct the agent to import and compose it. - Synthetic Data Disclosure: All mock metrics, user names, and test records must carry explicit
isMock: trueproperties or[MOCK_DATA]labels to prevent placeholder data from masquerading as verified live telemetry. - Non-Destructive File Scope: Confine code creation to dedicated feature directories (e.g.,
@/components/features/[feature-name]/[component].tsx). Prohibit unauthorized overwrites of root configs (package.json,tailwind.config.*,app/layout.tsx).
3. Seven-Stage Codebase Discovery Protocol
Before writing an implementation prompt or generating UI code, inspect these seven structural dimensions:
- Framework & Runtime: Detect Next.js App Router (requires
'use client'for hooks), Pages Router, Vite/SPA, or Astro. - Component Foundation: Detect existing primitives: shadcn/ui with Radix UI vs modern Base UI (
@base-ui/react), Mantine, or custom primitives. - Styling Engine: Detect Tailwind CSS v3 (
tailwind.config.*) vs Tailwind CSS v4 (@themein CSS), CSS Modules, or CSS-in-JS. - Iconography System: Detect installed icon library (
lucide-react,@radix-ui/react-icons,@heroicons/react). - Data & State Boundaries: Detect Server Actions, TanStack Query, SWR, or local React state.
- Form & Validation: Detect
react-hook-form+zodvs native form elements. - Testing & Quality Tooling: Detect Playwright, Vitest, Jest, and existing accessibility test configurations.
See references/codebase-discovery-protocol.md for detailed detection heuristics and the JSON audit output schema.
4. Platform-Specific Prompt Contracts
Select the exact contract matching the execution environment:
Установить codebase-aware-ui-prompts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл codebase-aware-ui-prompts?
Transform product requirements into precise, architecture-preserving UI implementation prompts for Cursor, Claude Code, v0, Lovable, and Stitch without duplicating packages or breaking design tokens.
Как установить скилл codebase-aware-ui-prompts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codebase-aware-ui-prompts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic