frameworks — Claude Code rule: what it does, how to install
frameworks directs Claude Code to generate production UI code for React with Tailwind v4, Next.js 15, and SwiftUI 6 without placeholders.
MIT ★ 3,216 updated 2026-10-20
/plugin marketplace add plugin87/ux-ui-agent-skills
/plugin install ux-ui-agent-skills@ux-ui-agent-skillsWhat frameworks does
This rule defines exact code patterns across specific frontend stacks. For React, it enforces TypeScript, forwardRef, cva, and utility helpers alongside Tailwind v4 @theme properties. Next.js 15 workflows keep Server Components by default, pushing "use client" directives down to leaf nodes while relying on Server Actions for data mutations. For Apple platforms, SwiftUI 6 setups receive extensions for tokens, button styles, and Dynamic Type sizing via @ScaledMetric.
The instruction enforces zero truncation. Emitting placeholders such as // ... rest unchanged is explicitly banned: the agent must return complete files. If your project uses a stack outside the primary trio, the rule mandates creating an on-demand adapter following frameworks/adapter-protocol.md.
Hardcoded values are prohibited. Every component must reference design tokens and account for responsive breakpoints, dark mode, and accessibility modifiers.
What it helps with
- Build accessible React components using cva and Tailwind v4 theme variables
- Structure Next.js 15 App Router pages with Server Actions and leaf client components
- Implement SwiftUI 6 views with Dynamic Type support and design token extensions
- Prevent truncated files and placeholder comments in generated code
Example prompts for the agent
- Build a modal dialog component in React and Tailwind using cva and forwardRef
- Create a user settings route in Next.js 15 with Server Actions
- Implement a SwiftUI 6 profile screen with tokens and @ScaledMetric
How to install frameworks
1Plugin marketplace
/plugin marketplace add plugin87/ux-ui-agent-skills/plugin install ux-ui-agent-skills@ux-ui-agent-skills2Manually: put the files in place
.claude/rules/frameworks.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/frameworks.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/frameworks.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/frameworks.mdManually: put the files in place
.clinerules/frameworks.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about frameworks
How to install frameworks in Claude Code?
Run /plugin marketplace add plugin87/ux-ui-agent-skills in Claude Code, followed by /plugin install ux-ui-agent-skills@ux-ui-agent-skills. You can also place the rule file directly into .claude/rules/frameworks.md.
What does the frameworks rule do?
It forces Claude Code to follow strict guidelines when writing React, Next.js 15, and SwiftUI 6 code. It ensures that components use design tokens, include accessibility attributes, and arrive fully written without omissions.
How does it handle unsupported frameworks?
When generating code for another stack, the agent must consult frameworks/adapter-protocol.md and produce an adapter on demand rather than improvising unstandardized code.
Source text
frameworks.md · MIT
# Rule: Framework output Loaded when generating code for a specific stack. Split out of `CLAUDE.md` so it loads only when the work calls for it. The headings below are unchanged, so any pointer to them still resolves. --- ## Framework Output Formats ### React + Tailwind (primary web framework) - TypeScript + `forwardRef` + `cva` (class-variance-authority) + `cn()` utility - Tokens mapped to Tailwind v4 `@theme` CSS custom properties - Component pattern: `components/ui/[name].tsx` - Reference: `frameworks/react-tailwind.md` ### Next.js 15 (full-stack web) - App Router with route groups, layouts, loading/error boundaries - Server Components by default; `"use client"` pushed to leaf components - `next/font` for font loading, `next/image` for images - Server Actions for mutations - Reference: `frameworks/nextjs.md` ### SwiftUI 6 (Apple platforms) - Tokens → Asset Catalogs + `Color.DS` / `Font.DS` / `Spacing` extensions - `ButtonStyle`, `ViewModifier` for component styling - `@ScaledMetric` for Dynamic Type, `@Environment(\.accessibilityReduceMotion)` for motion - `#if os()` for platform adaptation - Reference: `frameworks/swiftui.md` ### Output Rules When generating code for any framework: 1. **Use design tokens**: Never hardcode colors, sizes, or spacing. Always reference token values. 2. **Include accessibility**: Every interactive element gets ARIA attributes or a11y modifiers. 3. **Handle all states**: Default, hover, focus, disabled, loading, error. 4. **Support dark mode**: Use semantic color tokens that auto-switch. 5. **Responsive**: Mobile-first, breakpoint-aware. 6. **Copy-paste ready**: Code should work with minimal adaptation. 7. **Any framework**: Use `frameworks/adapter-protocol.md` for targets without a dedicated file; generate an adapter on demand. 8. **Output completeness**: A partial output is a broken output. Deliver full files, never placeholders (`// ... rest unchanged`). If asked for N components/screens, deliver all N. Split at clean boundaries only when length forces it, and continue to completion. (See `workflows/redesign-audit.md`.)
© Thientan Soparat · MIT · plugin87/ux-ui-agent-skills