tribunal-kit 2.4.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/agents/accessibility-reviewer.md +220 -134
- package/.agent/agents/ai-code-reviewer.md +233 -129
- package/.agent/agents/backend-specialist.md +238 -178
- package/.agent/agents/code-archaeologist.md +181 -119
- package/.agent/agents/database-architect.md +207 -164
- package/.agent/agents/debugger.md +218 -151
- package/.agent/agents/dependency-reviewer.md +136 -55
- package/.agent/agents/devops-engineer.md +238 -175
- package/.agent/agents/documentation-writer.md +221 -137
- package/.agent/agents/explorer-agent.md +180 -142
- package/.agent/agents/frontend-reviewer.md +194 -80
- package/.agent/agents/frontend-specialist.md +237 -188
- package/.agent/agents/game-developer.md +52 -184
- package/.agent/agents/logic-reviewer.md +149 -78
- package/.agent/agents/mobile-developer.md +223 -152
- package/.agent/agents/mobile-reviewer.md +195 -79
- package/.agent/agents/orchestrator.md +211 -170
- package/.agent/agents/penetration-tester.md +174 -131
- package/.agent/agents/performance-optimizer.md +203 -139
- package/.agent/agents/performance-reviewer.md +211 -108
- package/.agent/agents/product-manager.md +162 -108
- package/.agent/agents/project-planner.md +162 -142
- package/.agent/agents/qa-automation-engineer.md +242 -138
- package/.agent/agents/security-auditor.md +194 -170
- package/.agent/agents/seo-specialist.md +213 -132
- package/.agent/agents/sql-reviewer.md +194 -73
- package/.agent/agents/supervisor-agent.md +203 -156
- package/.agent/agents/test-coverage-reviewer.md +193 -81
- package/.agent/agents/type-safety-reviewer.md +208 -65
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/skills/agent-organizer/SKILL.md +126 -132
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +155 -66
- package/.agent/skills/api-patterns/SKILL.md +289 -257
- package/.agent/skills/api-security-auditor/SKILL.md +172 -70
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
- package/.agent/skills/appflow-wireframe/SKILL.md +107 -100
- package/.agent/skills/architecture/SKILL.md +331 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +168 -67
- package/.agent/skills/bash-linux/SKILL.md +154 -215
- package/.agent/skills/brainstorming/SKILL.md +104 -210
- package/.agent/skills/building-native-ui/SKILL.md +169 -70
- package/.agent/skills/clean-code/SKILL.md +360 -206
- package/.agent/skills/config-validator/SKILL.md +141 -165
- package/.agent/skills/csharp-developer/SKILL.md +528 -107
- package/.agent/skills/database-design/SKILL.md +455 -275
- package/.agent/skills/deployment-procedures/SKILL.md +145 -188
- package/.agent/skills/devops-engineer/SKILL.md +332 -134
- package/.agent/skills/devops-incident-responder/SKILL.md +113 -98
- package/.agent/skills/edge-computing/SKILL.md +157 -213
- package/.agent/skills/extract-design-system/SKILL.md +129 -69
- package/.agent/skills/framer-motion-expert/SKILL.md +939 -0
- package/.agent/skills/game-design-expert/SKILL.md +105 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +122 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +124 -215
- package/.agent/skills/github-operations/SKILL.md +314 -354
- package/.agent/skills/gsap-expert/SKILL.md +901 -0
- package/.agent/skills/i18n-localization/SKILL.md +138 -216
- package/.agent/skills/intelligent-routing/SKILL.md +127 -139
- package/.agent/skills/llm-engineering/SKILL.md +357 -258
- package/.agent/skills/local-first/SKILL.md +154 -203
- package/.agent/skills/mcp-builder/SKILL.md +118 -224
- package/.agent/skills/nextjs-react-expert/SKILL.md +783 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +559 -280
- package/.agent/skills/observability/SKILL.md +330 -285
- package/.agent/skills/parallel-agents/SKILL.md +122 -181
- package/.agent/skills/performance-profiling/SKILL.md +254 -197
- package/.agent/skills/plan-writing/SKILL.md +118 -188
- package/.agent/skills/platform-engineer/SKILL.md +123 -135
- package/.agent/skills/playwright-best-practices/SKILL.md +157 -76
- package/.agent/skills/powershell-windows/SKILL.md +146 -230
- package/.agent/skills/python-pro/SKILL.md +879 -114
- package/.agent/skills/react-specialist/SKILL.md +931 -108
- package/.agent/skills/realtime-patterns/SKILL.md +304 -296
- package/.agent/skills/rust-pro/SKILL.md +701 -240
- package/.agent/skills/seo-fundamentals/SKILL.md +154 -181
- package/.agent/skills/server-management/SKILL.md +190 -212
- package/.agent/skills/shadcn-ui-expert/SKILL.md +201 -68
- package/.agent/skills/sql-pro/SKILL.md +633 -104
- package/.agent/skills/swiftui-expert/SKILL.md +171 -70
- package/.agent/skills/systematic-debugging/SKILL.md +118 -186
- package/.agent/skills/tailwind-patterns/SKILL.md +576 -232
- package/.agent/skills/tdd-workflow/SKILL.md +137 -209
- package/.agent/skills/testing-patterns/SKILL.md +573 -205
- package/.agent/skills/vue-expert/SKILL.md +964 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +269 -316
- package/.agent/skills/web-accessibility-auditor/SKILL.md +188 -71
- package/.agent/skills/webapp-testing/SKILL.md +145 -236
- package/.agent/workflows/api-tester.md +151 -279
- package/.agent/workflows/audit.md +138 -168
- package/.agent/workflows/brainstorm.md +110 -146
- package/.agent/workflows/changelog.md +112 -144
- package/.agent/workflows/create.md +124 -139
- package/.agent/workflows/debug.md +189 -196
- package/.agent/workflows/deploy.md +189 -153
- package/.agent/workflows/enhance.md +151 -139
- package/.agent/workflows/fix.md +135 -143
- package/.agent/workflows/generate.md +157 -164
- package/.agent/workflows/migrate.md +160 -163
- package/.agent/workflows/orchestrate.md +168 -151
- package/.agent/workflows/performance-benchmarker.md +123 -305
- package/.agent/workflows/plan.md +173 -151
- package/.agent/workflows/preview.md +80 -137
- package/.agent/workflows/refactor.md +183 -153
- package/.agent/workflows/review-ai.md +129 -140
- package/.agent/workflows/review.md +116 -155
- package/.agent/workflows/session.md +94 -154
- package/.agent/workflows/status.md +79 -125
- package/.agent/workflows/strengthen-skills.md +139 -99
- package/.agent/workflows/swarm.md +179 -194
- package/.agent/workflows/test.md +211 -166
- package/.agent/workflows/tribunal-backend.md +113 -111
- package/.agent/workflows/tribunal-database.md +115 -132
- package/.agent/workflows/tribunal-frontend.md +118 -115
- package/.agent/workflows/tribunal-full.md +133 -136
- package/.agent/workflows/tribunal-mobile.md +119 -123
- package/.agent/workflows/tribunal-performance.md +133 -152
- package/.agent/workflows/ui-ux-pro-max.md +143 -171
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -236
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
|
@@ -1,73 +1,206 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shadcn-ui-expert
|
|
3
|
-
description:
|
|
3
|
+
description: shadcn/ui mastery. Installation, customization via tailwind.config, component extraction, state management with Radix Primitives, theme variables (CSS custom properties), dark mode implementations, and overriding default designs. Use when building or modifying shadcn/ui components in React/Next.js projects.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
7
|
-
applies-to-model: claude-3-7-sonnet
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-02
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
10
|
+
# shadcn/ui Expert — Component Architecture Mastery
|
|
11
|
+
|
|
12
|
+
> shadcn/ui is NOT a component library. It is a collection of re-usable components that you copy and paste into your apps.
|
|
13
|
+
> You own the code. You own the styling. You own the accessibility.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Core Architecture
|
|
18
|
+
|
|
19
|
+
shadcn/ui leverages two layers:
|
|
20
|
+
1. **Radix UI Primitives**: Headless, fully accessible functionality (Focus management, ARIA, Keyboard nav).
|
|
21
|
+
2. **Tailwind CSS**: The styling layer mapped over the headless components.
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// ❌ BAD: Re-inventing the wheel for accessibility
|
|
25
|
+
const Select = ({ options }) => {
|
|
26
|
+
const [open, setOpen] = useState(false)
|
|
27
|
+
return <div onClick={() => setOpen(!open)}>...</div> // Breaks keyboard/screen readers
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ✅ GOOD: Using shadcn (Radix under the hood)
|
|
31
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
|
32
|
+
|
|
33
|
+
export function MySelect() {
|
|
34
|
+
return (
|
|
35
|
+
<Select>
|
|
36
|
+
<SelectTrigger className="w-[180px]">
|
|
37
|
+
<SelectValue placeholder="Theme" />
|
|
38
|
+
</SelectTrigger>
|
|
39
|
+
<SelectContent>
|
|
40
|
+
<SelectItem value="light">Light</SelectItem>
|
|
41
|
+
<SelectItem value="dark">Dark</SelectItem>
|
|
42
|
+
</SelectContent>
|
|
43
|
+
</Select>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2. Component Modification (You Own The Code)
|
|
51
|
+
|
|
52
|
+
Do not treat `components/ui/*` as an immutable black box. You are *supposed* to modify them.
|
|
53
|
+
|
|
54
|
+
### Adding Variants via `cva` (Class Variance Authority)
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
58
|
+
|
|
59
|
+
// Adding a new "ghost-rounded" variant to the Button component
|
|
60
|
+
const buttonVariants = cva(
|
|
61
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors...",
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
variant: {
|
|
65
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
66
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
67
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
68
|
+
// YOUR CUSTOM VARIANT:
|
|
69
|
+
"ghost-rounded": "bg-transparent hover:bg-accent hover:text-accent-foreground rounded-full px-6",
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
default: "h-9 px-4 py-2",
|
|
73
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
74
|
+
lg: "h-10 rounded-md px-8",
|
|
75
|
+
icon: "h-9 w-9",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
variant: "default",
|
|
80
|
+
size: "default",
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 3. Theming & Dark Mode (CSS Variables)
|
|
89
|
+
|
|
90
|
+
shadcn/ui manages themes explicitly through CSS custom properties (variables), not Tailwind config hardcoding.
|
|
91
|
+
|
|
92
|
+
```css
|
|
93
|
+
/* app/globals.css */
|
|
94
|
+
@layer base {
|
|
95
|
+
:root {
|
|
96
|
+
--background: 0 0% 100%;
|
|
97
|
+
--foreground: 222.2 84% 4.9%;
|
|
98
|
+
--card: 0 0% 100%;
|
|
99
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
100
|
+
--primary: 221.2 83.2% 53.3%;
|
|
101
|
+
--primary-foreground: 210 40% 98%;
|
|
102
|
+
/* ... */
|
|
103
|
+
--radius: 0.5rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.dark {
|
|
107
|
+
--background: 222.2 84% 4.9%;
|
|
108
|
+
--foreground: 210 40% 98%;
|
|
109
|
+
--card: 222.2 84% 4.9%;
|
|
110
|
+
--primary: 217.2 91.2% 59.8%;
|
|
111
|
+
/* ... */
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Implementation with Tailwind v4 CSS-first configuration:
|
|
117
|
+
```css
|
|
118
|
+
/* Note how standard colors map directly to the CSS vars */
|
|
119
|
+
@theme {
|
|
120
|
+
--color-background: hsl(var(--background));
|
|
121
|
+
--color-foreground: hsl(var(--foreground));
|
|
122
|
+
--color-primary: hsl(var(--primary));
|
|
123
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
124
|
+
--radius-lg: var(--radius);
|
|
125
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
126
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 4. Using the `cn` Utility
|
|
133
|
+
|
|
134
|
+
The `cn` utility combines `clsx` (conditional classes) and `tailwind-merge` (fixing class conflicts).
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
import { clsx, type ClassValue } from "clsx"
|
|
138
|
+
import { twMerge } from "tailwind-merge"
|
|
139
|
+
|
|
140
|
+
export function cn(...inputs: ClassValue[]) {
|
|
141
|
+
return twMerge(clsx(inputs))
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ❌ BAD: String concatenation breeds conflicts
|
|
145
|
+
// hover:bg-blue-500 will fail if className contains hover:bg-red-500 earlier
|
|
146
|
+
const className = `px-4 py-2 bg-blue-500 hover:bg-blue-600 ${props.className}`
|
|
147
|
+
|
|
148
|
+
// ✅ GOOD: cn resolves conflicts correctly
|
|
149
|
+
const className = cn("px-4 py-2 bg-blue-500 hover:bg-blue-600", props.className)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 5. Next.js App Router Integration
|
|
155
|
+
|
|
156
|
+
### Modals / Dialogs inside Server Components
|
|
157
|
+
Radix primitives (Dialog, Select, etc.) utilize React context and side effects. They must be Client Components.
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
// ❌ BAD: Server Component trying to use a shadcn Dialog directly with state
|
|
161
|
+
export default function Page() {
|
|
162
|
+
const [open, setOpen] = useState(false); // ERROR
|
|
163
|
+
return <Dialog open={open}>...</Dialog>
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ✅ GOOD: Extract the interactive part to a Client Component
|
|
167
|
+
import { MyDialogComponent } from "./MyDialogComponent" // "use client" inside
|
|
168
|
+
|
|
169
|
+
export default async function Page() {
|
|
170
|
+
const data = await fetchDb(); // Server Component fetches data
|
|
171
|
+
return <MyDialogComponent data={data} /> // Passes data to interactive client component
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 🤖 LLM-Specific Traps (shadcn/ui)
|
|
178
|
+
|
|
179
|
+
1. **Treating it like an NPM Package:** AI asks to run `npm install shadcn-ui`. It's `npx shadcn@latest add [component]`. Components live in your tree (`components/ui`), not in `node_modules`.
|
|
180
|
+
2. **Missing the `cn` utility:** AI writes generic template literals for className overrides, guaranteeing Tailwind specificity conflicts. Always import and wrap overrides in `cn()`.
|
|
181
|
+
3. **Hardcoding Colors:** AI writes `bg-blue-500` inside standard components. shadcn demands semantic variables: `bg-primary`, `bg-accent`, `text-muted-foreground`.
|
|
182
|
+
4. **Server Component Conflicts:** AI inserts interactive shadcn components (Dialog, Tabs, Accordion) directly into Next.js Server Components without creating a `"use client"` wrapper boundary.
|
|
183
|
+
5. **Radix Primitive Ignorance:** AI attempts to pass `onClick` or `onChange` to headless wrapper elements like `<Select>` instead of `<SelectValue>` or tracking state properly via the `onValueChange` prop of the root component.
|
|
184
|
+
6. **Forgetting `asChild`:** When wrapping existing buttons or links in shadcn Triggers, AI forgets the `asChild` prop, resulting in invalid HTML (e.g., `<button><button>click</button></button>`).
|
|
185
|
+
7. **Modifying `node_modules/@radix-ui`:** AI tries to fix Radix a11y bugs by editing node_modules. Modify your local wrappers in `components/ui`, never Radix internals.
|
|
186
|
+
8. **Broken Form Integration:** AI tries to manually string together standard React state with shadcn inputs. You MUST use `<Form>`, `<FormField>`, `<FormItem>`, and `react-hook-form` logic for proper shadcn forms.
|
|
187
|
+
9. **Tailwind Class Order:** AI doesn't understand that `tailwind-merge` resolves conflicts from left to right. Overriding classes must be passed at the *end* of the `cn()` arguments.
|
|
188
|
+
10. **Theme Variable Format:** AI writes `--primary: #3b82f6`. shadcn/ui CSS custom properties are strictly HSL scalar values WITHOUT the `hsl()` wrapper inside the root definition: `--primary: 221.2 83.2% 53.3%;`.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 🏛️ Tribunal Integration
|
|
193
|
+
|
|
194
|
+
### ✅ Pre-Flight Self-Audit
|
|
195
|
+
```
|
|
196
|
+
✅ Are interactive shadcn components safely inside "use client" boundaries?
|
|
197
|
+
✅ Are classes merged dynamically using the `cn()` utility?
|
|
198
|
+
✅ Are colors utilizing standard semantic vars (`bg-primary`) rather than hardcoded colors?
|
|
199
|
+
✅ Did I remember the `asChild` prop when wrapping links/buttons in Triggers?
|
|
200
|
+
✅ Are forms correctly using `react-hook-form` via the `<Form>` and `<FormField>` components?
|
|
201
|
+
✅ Are CSS theme root variables using raw HSL scalar values?
|
|
202
|
+
✅ Am I modifying the local `components/ui/*` files if new variants are needed?
|
|
203
|
+
✅ Have I respected Radix a11y primitives (not inventing my own onClick focus handling)?
|
|
204
|
+
✅ Are component variants properly declared using `cva`?
|
|
205
|
+
✅ Did I pass user-supplied `className` props at the END of the `cn()` function to allow overrides?
|
|
206
|
+
```
|