tribunal-kit 1.0.0 β 2.4.2
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/.shared/ui-ux-pro-max/README.md +3 -3
- package/.agent/ARCHITECTURE.md +205 -10
- package/.agent/GEMINI.md +37 -7
- package/.agent/agents/accessibility-reviewer.md +134 -0
- package/.agent/agents/ai-code-reviewer.md +129 -0
- package/.agent/agents/frontend-specialist.md +3 -0
- package/.agent/agents/game-developer.md +21 -21
- package/.agent/agents/logic-reviewer.md +12 -0
- package/.agent/agents/mobile-reviewer.md +79 -0
- package/.agent/agents/orchestrator.md +56 -26
- package/.agent/agents/performance-reviewer.md +36 -0
- package/.agent/agents/supervisor-agent.md +156 -0
- package/.agent/agents/swarm-worker-contracts.md +166 -0
- package/.agent/agents/swarm-worker-registry.md +92 -0
- package/.agent/rules/GEMINI.md +134 -5
- package/.agent/scripts/bundle_analyzer.py +259 -0
- package/.agent/scripts/dependency_analyzer.py +247 -0
- package/.agent/scripts/lint_runner.py +188 -0
- package/.agent/scripts/patch_skills_meta.py +177 -0
- package/.agent/scripts/patch_skills_output.py +285 -0
- package/.agent/scripts/schema_validator.py +279 -0
- package/.agent/scripts/security_scan.py +224 -0
- package/.agent/scripts/session_manager.py +144 -3
- package/.agent/scripts/skill_integrator.py +234 -0
- package/.agent/scripts/strengthen_skills.py +220 -0
- package/.agent/scripts/swarm_dispatcher.py +317 -0
- package/.agent/scripts/test_runner.py +192 -0
- package/.agent/scripts/test_swarm_dispatcher.py +163 -0
- package/.agent/skills/agent-organizer/SKILL.md +132 -0
- package/.agent/skills/agentic-patterns/SKILL.md +335 -0
- package/.agent/skills/api-patterns/SKILL.md +226 -50
- package/.agent/skills/app-builder/SKILL.md +215 -52
- package/.agent/skills/architecture/SKILL.md +176 -31
- package/.agent/skills/bash-linux/SKILL.md +150 -134
- package/.agent/skills/behavioral-modes/SKILL.md +152 -160
- package/.agent/skills/brainstorming/SKILL.md +148 -101
- package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
- package/.agent/skills/clean-code/SKILL.md +139 -134
- package/.agent/skills/code-review-checklist/SKILL.md +177 -80
- package/.agent/skills/config-validator/SKILL.md +165 -0
- package/.agent/skills/csharp-developer/SKILL.md +107 -0
- package/.agent/skills/database-design/SKILL.md +252 -29
- package/.agent/skills/deployment-procedures/SKILL.md +122 -175
- package/.agent/skills/devops-engineer/SKILL.md +134 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
- package/.agent/skills/documentation-templates/SKILL.md +175 -121
- package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
- package/.agent/skills/edge-computing/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +76 -0
- package/.agent/skills/frontend-design/color-system.md +18 -0
- package/.agent/skills/frontend-design/typography-system.md +18 -0
- package/.agent/skills/game-development/SKILL.md +69 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
- package/.agent/skills/github-operations/SKILL.md +354 -0
- package/.agent/skills/i18n-localization/SKILL.md +158 -96
- package/.agent/skills/intelligent-routing/SKILL.md +89 -285
- package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
- package/.agent/skills/lint-and-validate/SKILL.md +229 -27
- package/.agent/skills/llm-engineering/SKILL.md +258 -0
- package/.agent/skills/local-first/SKILL.md +203 -0
- package/.agent/skills/mcp-builder/SKILL.md +159 -111
- package/.agent/skills/mobile-design/SKILL.md +102 -282
- package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
- package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
- package/.agent/skills/observability/SKILL.md +285 -0
- package/.agent/skills/parallel-agents/SKILL.md +124 -118
- package/.agent/skills/performance-profiling/SKILL.md +143 -89
- package/.agent/skills/plan-writing/SKILL.md +133 -97
- package/.agent/skills/platform-engineer/SKILL.md +135 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -104
- package/.agent/skills/python-patterns/SKILL.md +149 -361
- package/.agent/skills/python-pro/SKILL.md +114 -0
- package/.agent/skills/react-specialist/SKILL.md +107 -0
- package/.agent/skills/readme-builder/SKILL.md +270 -0
- package/.agent/skills/realtime-patterns/SKILL.md +296 -0
- package/.agent/skills/red-team-tactics/SKILL.md +136 -134
- package/.agent/skills/rust-pro/SKILL.md +237 -173
- package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
- package/.agent/skills/server-management/SKILL.md +155 -104
- package/.agent/skills/sql-pro/SKILL.md +104 -0
- package/.agent/skills/systematic-debugging/SKILL.md +156 -79
- package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
- package/.agent/skills/tdd-workflow/SKILL.md +148 -88
- package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -114
- package/.agent/skills/trend-researcher/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
- package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
- package/.agent/skills/vue-expert/SKILL.md +118 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
- package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
- package/.agent/skills/webapp-testing/SKILL.md +171 -122
- package/.agent/skills/whimsy-injector/SKILL.md +349 -0
- package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
- package/.agent/workflows/api-tester.md +279 -0
- package/.agent/workflows/audit.md +168 -0
- package/.agent/workflows/brainstorm.md +65 -19
- package/.agent/workflows/changelog.md +144 -0
- package/.agent/workflows/create.md +67 -14
- package/.agent/workflows/debug.md +122 -30
- package/.agent/workflows/deploy.md +82 -31
- package/.agent/workflows/enhance.md +59 -27
- package/.agent/workflows/fix.md +143 -0
- package/.agent/workflows/generate.md +84 -20
- package/.agent/workflows/migrate.md +163 -0
- package/.agent/workflows/orchestrate.md +66 -17
- package/.agent/workflows/performance-benchmarker.md +305 -0
- package/.agent/workflows/plan.md +76 -33
- package/.agent/workflows/preview.md +73 -17
- package/.agent/workflows/refactor.md +153 -0
- package/.agent/workflows/review-ai.md +140 -0
- package/.agent/workflows/review.md +83 -16
- package/.agent/workflows/session.md +154 -0
- package/.agent/workflows/status.md +74 -18
- package/.agent/workflows/strengthen-skills.md +99 -0
- package/.agent/workflows/swarm.md +194 -0
- package/.agent/workflows/test.md +80 -31
- package/.agent/workflows/tribunal-backend.md +55 -13
- package/.agent/workflows/tribunal-database.md +62 -18
- package/.agent/workflows/tribunal-frontend.md +58 -12
- package/.agent/workflows/tribunal-full.md +70 -11
- package/.agent/workflows/tribunal-mobile.md +123 -0
- package/.agent/workflows/tribunal-performance.md +152 -0
- package/.agent/workflows/ui-ux-pro-max.md +100 -82
- package/README.md +117 -62
- package/bin/tribunal-kit.js +542 -288
- package/package.json +10 -6
|
@@ -1,178 +1,205 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: testing-patterns
|
|
3
3
|
description: Testing patterns and principles. Unit, integration, mocking strategies.
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
last-updated: 2026-03-12
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
5
8
|
---
|
|
6
9
|
|
|
7
10
|
# Testing Patterns
|
|
8
11
|
|
|
9
|
-
>
|
|
12
|
+
> Tests don't prove code works. They make it safe to change.
|
|
13
|
+
> A codebase without tests is a codebase you're afraid to touch.
|
|
10
14
|
|
|
11
15
|
---
|
|
12
16
|
|
|
13
|
-
##
|
|
17
|
+
## Test Pyramid
|
|
18
|
+
|
|
19
|
+
Write tests at the right level. Most tests should be unit tests. Fewer integration tests. Fewest E2E tests.
|
|
14
20
|
|
|
15
21
|
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Functions, classes
|
|
22
|
+
/\
|
|
23
|
+
/E2E\ Fewest β expensive to write and run
|
|
24
|
+
/------\
|
|
25
|
+
/Integr. \ Some β verify component interactions
|
|
26
|
+
/----------\
|
|
27
|
+
/ Unit Tests \ Most β fast, isolated, focused
|
|
28
|
+
/--------------\
|
|
24
29
|
```
|
|
25
30
|
|
|
31
|
+
**Why this shape:**
|
|
32
|
+
- Unit tests run in milliseconds β you can have thousands
|
|
33
|
+
- E2E tests take seconds β you want dozens, not hundreds
|
|
34
|
+
- Inverting the pyramid = slow CI, fragile test suite, low confidence
|
|
35
|
+
|
|
26
36
|
---
|
|
27
37
|
|
|
28
|
-
##
|
|
38
|
+
## AAA Pattern
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
|------|---------|
|
|
32
|
-
| **Arrange** | Set up test data |
|
|
33
|
-
| **Act** | Execute code under test |
|
|
34
|
-
| **Assert** | Verify outcome |
|
|
40
|
+
Every test follows this structure:
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
```ts
|
|
43
|
+
it('should return 401 when token is expired', async () => {
|
|
44
|
+
// Arrange β set up the scenario
|
|
45
|
+
const expiredToken = generateToken({ expiresIn: '-1s' });
|
|
46
|
+
const request = buildRequest({ authorization: `Bearer ${expiredToken}` });
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
// Act β do the thing being tested
|
|
49
|
+
const response = await authMiddleware(request);
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
// Assert β verify the outcome
|
|
52
|
+
expect(response.status).toBe(401);
|
|
53
|
+
expect(response.body.error).toBe('Token expired');
|
|
54
|
+
});
|
|
55
|
+
```
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
|------|----------|-------|
|
|
44
|
-
| **Unit** | Pure functions, logic | Fast (<50ms) |
|
|
45
|
-
| **Integration** | API, DB, services | Medium |
|
|
46
|
-
| **E2E** | Critical user flows | Slow |
|
|
57
|
+
Never combine Arrange and Assert. Never skip Arrange by relying on test state from a previous test.
|
|
47
58
|
|
|
48
59
|
---
|
|
49
60
|
|
|
50
|
-
##
|
|
61
|
+
## Unit Tests
|
|
62
|
+
|
|
63
|
+
Unit tests test one unit of logic in isolation. Everything external is replaced with a controlled substitute.
|
|
51
64
|
|
|
52
|
-
|
|
65
|
+
```ts
|
|
66
|
+
// Test the function's logic β not the database, not the network
|
|
67
|
+
it('should hash the password before saving', async () => {
|
|
68
|
+
const mockSave = vi.fn().mockResolvedValue({ id: '1' });
|
|
69
|
+
const userRepo = { save: mockSave };
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|-----------|---------|
|
|
56
|
-
| Fast | < 100ms each |
|
|
57
|
-
| Isolated | No external deps |
|
|
58
|
-
| Repeatable | Same result always |
|
|
59
|
-
| Self-checking | No manual verification |
|
|
60
|
-
| Timely | Written with code |
|
|
71
|
+
await createUser({ email: 'a@b.com', password: 'secret' }, userRepo);
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
const savedUser = mockSave.mock.calls[0][0];
|
|
74
|
+
expect(savedUser.password).not.toBe('secret'); // was hashed
|
|
75
|
+
expect(savedUser.password).toMatch(/^\$2b\$/); // bcrypt format
|
|
76
|
+
});
|
|
77
|
+
```
|
|
63
78
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
**Rules for unit tests:**
|
|
80
|
+
- One assertion per concept (multiple `expect` calls are fine if they verify the same behavior)
|
|
81
|
+
- No network calls, no file system, no real database
|
|
82
|
+
- Tests are order-independent β they don't rely on state from other tests
|
|
83
|
+
- Test names describe behavior: `should X when Y` or `returns X given Y`
|
|
69
84
|
|
|
70
85
|
---
|
|
71
86
|
|
|
72
|
-
##
|
|
87
|
+
## Integration Tests
|
|
73
88
|
|
|
74
|
-
|
|
89
|
+
Integration tests verify that two or more components work together correctly.
|
|
75
90
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
```ts
|
|
92
|
+
// Tests the real database interaction
|
|
93
|
+
it('should save and retrieve a user', async () => {
|
|
94
|
+
const user = await UserService.create({ email: 'test@test.com', name: 'Test' });
|
|
95
|
+
const found = await UserService.findById(user.id);
|
|
81
96
|
|
|
82
|
-
|
|
97
|
+
expect(found.email).toBe('test@test.com');
|
|
98
|
+
});
|
|
99
|
+
```
|
|
83
100
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
| After Each | Clean up |
|
|
89
|
-
| After All | Disconnect |
|
|
101
|
+
**Integration test rules:**
|
|
102
|
+
- Use a real test database β not a mock
|
|
103
|
+
- Clean up data before or after each test (use transactions that rollback, or seed scripts)
|
|
104
|
+
- Slower than unit tests β run on CI but not on every file save
|
|
90
105
|
|
|
91
106
|
---
|
|
92
107
|
|
|
93
|
-
##
|
|
108
|
+
## Mocking Principles
|
|
94
109
|
|
|
95
|
-
|
|
110
|
+
Mocks replace external dependencies. Use them accurately.
|
|
96
111
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Database (unit) | Simple dependencies |
|
|
101
|
-
| Time/random | Pure functions |
|
|
102
|
-
| Network | In-memory stores |
|
|
112
|
+
```ts
|
|
113
|
+
// β Mock that returns nothing useful
|
|
114
|
+
vi.mock('./mailer', () => ({ send: vi.fn() }));
|
|
103
115
|
|
|
104
|
-
|
|
116
|
+
// β
Mock that reflects real behavior
|
|
117
|
+
vi.mock('./mailer', () => ({
|
|
118
|
+
send: vi.fn().mockResolvedValue({ messageId: 'mock-id-123' }),
|
|
119
|
+
}));
|
|
120
|
+
```
|
|
105
121
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
| Fake | Simplified implementation |
|
|
122
|
+
**What to mock:**
|
|
123
|
+
- External HTTP calls (payment gateways, third-party APIs)
|
|
124
|
+
- Time (`Date.now()`, `new Date()`) when time-dependent
|
|
125
|
+
- File system in unit tests
|
|
126
|
+
- Email/SMS sending
|
|
112
127
|
|
|
113
|
-
|
|
128
|
+
**What not to mock:**
|
|
129
|
+
- Your own business logic
|
|
130
|
+
- The function being tested
|
|
131
|
+
- Simple pure utility functions
|
|
114
132
|
|
|
115
|
-
|
|
133
|
+
---
|
|
116
134
|
|
|
117
|
-
|
|
135
|
+
## Test Coverage
|
|
118
136
|
|
|
119
|
-
|
|
120
|
-
|---------|---------|
|
|
121
|
-
| Should behavior | "should return error when..." |
|
|
122
|
-
| When condition | "when user not found..." |
|
|
123
|
-
| Given-when-then | "given X, when Y, then Z" |
|
|
137
|
+
Coverage measures which lines are executed during tests. 100% coverage does not mean the code is correct.
|
|
124
138
|
|
|
125
|
-
|
|
139
|
+
**Useful coverage:**
|
|
140
|
+
- `> 80%` for business logic modules
|
|
141
|
+
- Focus on statement + branch coverage (not just line coverage)
|
|
142
|
+
- Low coverage on infrastructure/config files is acceptable
|
|
126
143
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
| beforeEach | Common setup |
|
|
144
|
+
**Coverage anti-patterns:**
|
|
145
|
+
- Tests written solely to increase coverage numbers
|
|
146
|
+
- Asserting that mocks were called instead of asserting real outcomes
|
|
147
|
+
- Tautology tests: `expect(result).toBe(result)`
|
|
132
148
|
|
|
133
149
|
---
|
|
134
150
|
|
|
135
|
-
##
|
|
151
|
+
## Scripts
|
|
136
152
|
|
|
137
|
-
|
|
153
|
+
| Script | Purpose | Run With |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| `scripts/test_runner.py` | Runs test suite and reports results | `python scripts/test_runner.py <project_path>` |
|
|
138
156
|
|
|
139
|
-
|
|
140
|
-
|----------|-----|
|
|
141
|
-
| Factories | Generate test data |
|
|
142
|
-
| Fixtures | Predefined datasets |
|
|
143
|
-
| Builders | Fluent object creation |
|
|
157
|
+
---
|
|
144
158
|
|
|
145
|
-
|
|
159
|
+
## Output Format
|
|
146
160
|
|
|
147
|
-
|
|
148
|
-
- Randomize non-essential values (faker)
|
|
149
|
-
- Share common fixtures
|
|
150
|
-
- Keep data minimal
|
|
161
|
+
When this skill produces or reviews code, structure your output as follows:
|
|
151
162
|
|
|
152
|
-
|
|
163
|
+
```
|
|
164
|
+
βββ Testing Patterns Report ββββββββββββββββββββββββ
|
|
165
|
+
Skill: Testing Patterns
|
|
166
|
+
Language: [detected language / framework]
|
|
167
|
+
Scope: [N files Β· N functions]
|
|
168
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
169
|
+
β
Passed: [checks that passed, or "All clean"]
|
|
170
|
+
β οΈ Warnings: [non-blocking issues, or "None"]
|
|
171
|
+
β Blocked: [blocking issues requiring fix, or "None"]
|
|
172
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
173
|
+
VBC status: PENDING β VERIFIED
|
|
174
|
+
Evidence: [test output / lint pass / compile success]
|
|
175
|
+
```
|
|
153
176
|
|
|
154
|
-
|
|
177
|
+
**VBC (Verification-Before-Completion) is mandatory.**
|
|
178
|
+
Do not mark status as VERIFIED until concrete terminal evidence is provided.
|
|
155
179
|
|
|
156
|
-
| Practice | Why |
|
|
157
|
-
|----------|-----|
|
|
158
|
-
| One assert per test | Clear failure reason |
|
|
159
|
-
| Independent tests | No order dependency |
|
|
160
|
-
| Fast tests | Run frequently |
|
|
161
|
-
| Descriptive names | Self-documenting |
|
|
162
|
-
| Clean up | Avoid side effects |
|
|
163
180
|
|
|
164
181
|
---
|
|
165
182
|
|
|
166
|
-
##
|
|
183
|
+
## ποΈ Tribunal Integration (Anti-Hallucination)
|
|
167
184
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
| Test implementation | Test behavior |
|
|
171
|
-
| Duplicate test code | Use factories |
|
|
172
|
-
| Complex test setup | Simplify or split |
|
|
173
|
-
| Ignore flaky tests | Fix root cause |
|
|
174
|
-
| Skip cleanup | Reset state |
|
|
185
|
+
**Slash command: `/test`**
|
|
186
|
+
**Active reviewers: `logic` Β· `test-coverage-reviewer`**
|
|
175
187
|
|
|
176
|
-
|
|
188
|
+
### β Forbidden AI Tropes in Testing
|
|
177
189
|
|
|
178
|
-
|
|
190
|
+
1. **Tautological Tests** β writing `expect(x).toBe(x)` or testing that a mock returns what it was mocked to return, ignoring actual behavior.
|
|
191
|
+
2. **Missing the "Arrange" Step** β relying on test state leftover from a previous `it()` block.
|
|
192
|
+
3. **Over-mocking** β mocking the system under test or mocking out so much that the test is completely useless.
|
|
193
|
+
4. **Assertions in loops** β writing loops with dynamic assertions instead of explicit, readable test cases.
|
|
194
|
+
5. **Ignoring Async Failures** β forgetting to `await` the assertions or the function under test, leading to false positives.
|
|
195
|
+
|
|
196
|
+
### β
Pre-Flight Self-Audit
|
|
197
|
+
|
|
198
|
+
Review these questions before generating test code:
|
|
199
|
+
```
|
|
200
|
+
β
Does each test explicitly follow the Arrange-Act-Assert (AAA) pattern?
|
|
201
|
+
β
Are external dependencies (DBs, Networks) isolated efficiently using proper mocks?
|
|
202
|
+
β
Is the test asserting verifying behavioral OUTCOMES rather than internal implementation details?
|
|
203
|
+
β
Did I properly `await` asynchronous operations to prevent false positives?
|
|
204
|
+
β
Are test names readable and descriptive of the tested behavior?
|
|
205
|
+
```
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trend-researcher
|
|
3
|
+
description: Creative muse and design trend analyzer for modern web/mobile interfaces.
|
|
4
|
+
skills:
|
|
5
|
+
- frontend-design
|
|
6
|
+
- web-design-guidelines
|
|
7
|
+
- seo-fundamentals
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
last-updated: 2026-03-12
|
|
10
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Trend Researcher Skill
|
|
14
|
+
|
|
15
|
+
You are a creative muse and design trend analyst. Your purpose is to bridge the gap between "generic UI" and "stunning, intentional design" by grounding aesthetic decisions in real-world trends, documented design systems, and measurable user impact.
|
|
16
|
+
|
|
17
|
+
## When to Activate
|
|
18
|
+
|
|
19
|
+
- When asked to "brainstorm for design", "find inspiration", or "select a style guide".
|
|
20
|
+
- During `/ui-ux-pro-max` or `/create` workflows when a visual direction hasn't been set.
|
|
21
|
+
- Before any frontend build to establish a Design Token foundation.
|
|
22
|
+
- When paired with `ui-ux-researcher` for a full "Design Intelligence" pass.
|
|
23
|
+
|
|
24
|
+
## Core Capabilities
|
|
25
|
+
|
|
26
|
+
### 1. Trend Identification & Classification
|
|
27
|
+
|
|
28
|
+
Leverage `search_web` to scan top design aggregators and classify trends by maturity:
|
|
29
|
+
|
|
30
|
+
| Maturity | Description | Examples (2025β2026) | Risk |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| **Established** | Widely adopted, safe to use | Bento Grids, Glassmorphism, Dark Mode | Low |
|
|
33
|
+
| **Rising** | Gaining traction, differentiating | Claymorphism, Spatial UI, Kinetic Typography | Medium |
|
|
34
|
+
| **Experimental** | Cutting-edge, high differentiation | Generative Art Backgrounds, 3D Morphing Cards, AI-Responsive Layouts | High |
|
|
35
|
+
| **Declining** | Overused, losing impact | Flat Minimalism, Neumorphism, Full-bleed hero images | Avoid unless justified |
|
|
36
|
+
|
|
37
|
+
**Banned ClichΓ©s (Unless Explicitly Requested):**
|
|
38
|
+
- β Purple/violet gradients as primary AI branding
|
|
39
|
+
- β Generic mesh gradient backgrounds
|
|
40
|
+
- β Standard "left text / right image" hero layouts without creative justification
|
|
41
|
+
- β "Futuristic" dark themes with neon accents (overused since 2023)
|
|
42
|
+
|
|
43
|
+
### 2. Palette Generation Protocol
|
|
44
|
+
|
|
45
|
+
Generate harmonized color palettes using HSL for precise control:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Primary β The brand's identity color (used sparingly: CTAs, key icons)
|
|
49
|
+
Surface β Background tones (light: hsl(0, 0%, 98%), dark: hsl(220, 20%, 10%))
|
|
50
|
+
Accent β Complementary pop color (split-complementary for sophistication)
|
|
51
|
+
Neutral β Text and border hierarchy (at least 4 shades)
|
|
52
|
+
Semantic β Success (green), Warning (amber), Error (red), Info (blue)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Rules:**
|
|
56
|
+
- Always provide both light and dark mode variants.
|
|
57
|
+
- Contrast ratios must meet WCAG 2.2 AA (4.5:1 normal text, 3:1 large text).
|
|
58
|
+
- Generate a test swatch block showing all colors in context.
|
|
59
|
+
|
|
60
|
+
### 3. Typography Pairing Engine
|
|
61
|
+
|
|
62
|
+
Recommend Google Font pairings based on personality:
|
|
63
|
+
|
|
64
|
+
| Personality | Heading Font | Body Font | Usage |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| **Elevated Minimalist** | Playfair Display | Inter | Luxury, editorial |
|
|
67
|
+
| **Modern Tech** | Space Grotesk | DM Sans | SaaS, dashboards |
|
|
68
|
+
| **Friendly Product** | Outfit | Source Sans 3 | Consumer apps |
|
|
69
|
+
| **Bold Creative** | Clash Display | Satoshi | Portfolios, agencies |
|
|
70
|
+
| **Corporate Trust** | Plus Jakarta Sans | Noto Sans | Enterprise, fintech |
|
|
71
|
+
| **Editorial Long-form** | Fraunces | Literata | Blogs, magazines |
|
|
72
|
+
|
|
73
|
+
**Scale:** Always recommend a modular scale (Major Third 1.25 or Perfect Fourth 1.333).
|
|
74
|
+
|
|
75
|
+
### 4. Layout Pattern Library
|
|
76
|
+
|
|
77
|
+
Translate trends into structured layout decisions:
|
|
78
|
+
|
|
79
|
+
| Pattern | When to Use | CSS Approach |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| **Bento Grid** | Dashboards, landing page feature sections | `grid-template-areas` with varied spans |
|
|
82
|
+
| **Asymmetric Split** | Hero sections, about pages | 60/40 or 70/30 grid columns |
|
|
83
|
+
| **Full-bleed Cards** | Mobile-first content lists | `width: 100vw` with negative margin |
|
|
84
|
+
| **Stacked Sections** | Long-form landing pages | `scroll-snap-type: y mandatory` |
|
|
85
|
+
| **Sidebar + Canvas** | App layouts, admin panels | `grid-template-columns: 240px 1fr` |
|
|
86
|
+
| **Overlapping Layers** | Creative portfolios, editorials | Negative margins + z-index layering |
|
|
87
|
+
|
|
88
|
+
### 5. Motion & Interaction Direction
|
|
89
|
+
|
|
90
|
+
Pair with `whimsy-injector` for implementation. Here, define the *intention*:
|
|
91
|
+
|
|
92
|
+
| Intent | Motion Type | Duration | Easing |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| **Guide attention** | Subtle pulse / scale on CTA | 200ms | ease-out |
|
|
95
|
+
| **Show hierarchy** | Staggered entrance on scroll | 300ms per item, 50ms stagger | cubic-bezier(0.4, 0, 0.2, 1) |
|
|
96
|
+
| **Confirm action** | Checkmark draw / color flash | 150ms | ease-in-out |
|
|
97
|
+
| **Create depth** | Parallax on scroll | Continuous | linear (scroll-driven) |
|
|
98
|
+
|
|
99
|
+
## Interaction Protocol
|
|
100
|
+
|
|
101
|
+
### Phase 1: Discovery
|
|
102
|
+
```
|
|
103
|
+
1. Ask: "What is the product type?" (SaaS, e-commerce, portfolio, etc.)
|
|
104
|
+
2. Ask: "Who is the target audience?" (developers, consumers, enterprise)
|
|
105
|
+
3. Ask: "What 3 words should users associate with this brand?"
|
|
106
|
+
4. Search for industry-specific trends using search_web.
|
|
107
|
+
5. Cross-reference with `frontend-design` and `web-design-guidelines` skills.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Phase 2: Muse Report
|
|
111
|
+
Provide a structured "Design Muse" report:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
βββ Design Muse Report βββββββββββββββββββ
|
|
115
|
+
|
|
116
|
+
Direction: [Trend Name] (e.g., "Soft Brutalism with Warmth")
|
|
117
|
+
Maturity: [Established / Rising / Experimental]
|
|
118
|
+
|
|
119
|
+
βββ Color System βββββββββββββββββββββββββ
|
|
120
|
+
Primary: hsl(220, 80%, 55%) β #3366CC
|
|
121
|
+
Surface: hsl(220, 15%, 97%) β #F5F6F8
|
|
122
|
+
Accent: hsl(35, 90%, 60%) β #E8A030
|
|
123
|
+
Neutral: hsl(220, 10%, 40%) β #5C6370
|
|
124
|
+
|
|
125
|
+
βββ Typography βββββββββββββββββββββββββββ
|
|
126
|
+
Heading: Space Grotesk (700) β Scale: 1.333
|
|
127
|
+
Body: DM Sans (400/500) β Base: 16px / 1.6 line-height
|
|
128
|
+
|
|
129
|
+
βββ Layout Direction βββββββββββββββββββββ
|
|
130
|
+
Pattern: Bento Grid with Asymmetric Hero
|
|
131
|
+
Grid: 8px base unit
|
|
132
|
+
Radius: 12px outer / 8px inner
|
|
133
|
+
Depth: Soft shadows, no hard borders
|
|
134
|
+
|
|
135
|
+
βββ Motion Intent ββββββββββββββββββββββββ
|
|
136
|
+
Entrance: Staggered fade-up (300ms, 50ms stagger)
|
|
137
|
+
Hover: Subtle lift + shadow expansion
|
|
138
|
+
Scroll: Section snap with parallax accents
|
|
139
|
+
|
|
140
|
+
βββ References βββββββββββββββββββββββββββ
|
|
141
|
+
[1] [Real URL from search β Dribbble/Awwwards/Mobbin]
|
|
142
|
+
[2] [Real URL from search]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Phase 3: Application
|
|
146
|
+
When implementing designs:
|
|
147
|
+
- Generate CSS custom properties from the palette.
|
|
148
|
+
- Create a `design-tokens.css` or inject into `index.css`.
|
|
149
|
+
- Pass motion intent to `whimsy-injector` for implementation.
|
|
150
|
+
- Validate accessibility with `ui-ux-researcher`.
|
|
151
|
+
|
|
152
|
+
## Cross-Skill Integration
|
|
153
|
+
|
|
154
|
+
| Paired Skill | Integration Point |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `ui-ux-researcher` | Validate palette contrast + cognitive load after applying trend |
|
|
157
|
+
| `whimsy-injector` | Pass motion intent β receive implementation snippets |
|
|
158
|
+
| `frontend-design` | Use as reference for component-level styling |
|
|
159
|
+
| `web-design-guidelines` | Ensure trend suggestions comply with established guidelines |
|
|
160
|
+
| `seo-fundamentals` | Verify that trend choices don't harm Core Web Vitals |
|
|
161
|
+
|
|
162
|
+
## Anti-Hallucination Guard
|
|
163
|
+
|
|
164
|
+
- **Never suggest a design trend without a real-world reference** β cite Dribbble shots, Awwwards winners, or published design systems.
|
|
165
|
+
- **Banned clichΓ©s are enforced** β do not suggest purple/violet AI gradients or mesh backgrounds without explicit user request.
|
|
166
|
+
- **Always verify fonts** are available on Google Fonts or system defaults before recommending.
|
|
167
|
+
- **Color contrast must be calculated**, not assumed β use the formula or a known tool.
|
|
168
|
+
- **No fictional design systems** β only reference Material Design, Apple HIG, Ant Design, Radix, Shadcn, or other documented systems.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Output Format
|
|
173
|
+
|
|
174
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
βββ Trend Researcher Recommendation ββββββββββββββββ
|
|
178
|
+
Decision: [what was chosen / proposed]
|
|
179
|
+
Rationale: [why β one concise line]
|
|
180
|
+
Trade-offs: [what is consciously accepted]
|
|
181
|
+
Next action: [concrete next step for the user]
|
|
182
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
183
|
+
Pre-Flight: β
All checks passed
|
|
184
|
+
or β [blocking item that must be resolved first]
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## π€ LLM-Specific Traps
|
|
192
|
+
|
|
193
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
194
|
+
|
|
195
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
196
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
197
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
198
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
199
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## ποΈ Tribunal Integration (Anti-Hallucination)
|
|
204
|
+
|
|
205
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
206
|
+
**Active reviewers: `logic-reviewer` Β· `security-auditor`**
|
|
207
|
+
|
|
208
|
+
### β Forbidden AI Tropes
|
|
209
|
+
|
|
210
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
211
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
212
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
213
|
+
|
|
214
|
+
### β
Pre-Flight Self-Audit
|
|
215
|
+
|
|
216
|
+
Review these questions before confirming output:
|
|
217
|
+
```
|
|
218
|
+
β
Did I rely ONLY on real, verified tools and methods?
|
|
219
|
+
β
Is this solution appropriately scoped to the user's constraints?
|
|
220
|
+
β
Did I handle potential failure modes and edge cases?
|
|
221
|
+
β
Have I avoided generic boilerplate that doesn't add value?
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### π Verification-Before-Completion (VBC) Protocol
|
|
225
|
+
|
|
226
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
227
|
+
- β **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
228
|
+
- β
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-pro-max
|
|
3
|
+
description: Plan and implement cutting-edge advanced UI/UX. Create distinctive, production-grade frontend interfaces with high design quality that avoid generic AI aesthetics.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-03-12
|
|
6
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# UI/UX Pro Max: Peak Performance Frontend Aesthetics
|
|
10
|
+
|
|
11
|
+
This skill guides the creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
Use this skill when the user asks to build web components, pages, or applications and expects creative, polished code that avoids generic AI aesthetics.
|
|
15
|
+
|
|
16
|
+
## Design Thinking
|
|
17
|
+
|
|
18
|
+
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
19
|
+
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
20
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. These are inspirationβdesign one that is true to the direction.
|
|
21
|
+
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
22
|
+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
23
|
+
|
|
24
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
25
|
+
|
|
26
|
+
Then implement working code (HTML/CSS/JS, React, Vue, Tailwind, etc.) that is:
|
|
27
|
+
- Production-grade and functional
|
|
28
|
+
- Visually striking and memorable
|
|
29
|
+
- Cohesive with a clear aesthetic point-of-view
|
|
30
|
+
- Meticulously refined in every detail
|
|
31
|
+
|
|
32
|
+
## Frontend Aesthetics Guidelines
|
|
33
|
+
|
|
34
|
+
Focus on:
|
|
35
|
+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
36
|
+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
37
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
38
|
+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
39
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
40
|
+
|
|
41
|
+
**NEVER** use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
42
|
+
|
|
43
|
+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
44
|
+
|
|
45
|
+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
46
|
+
|
|
47
|
+
Remember: Claude (and any AI agent using this skill) is capable of extraordinary creative work. Don't hold back; show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
53
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
βββ Ui Ux Pro Max Recommendation ββββββββββββββββ
|
|
57
|
+
Decision: [what was chosen / proposed]
|
|
58
|
+
Rationale: [why β one concise line]
|
|
59
|
+
Trade-offs: [what is consciously accepted]
|
|
60
|
+
Next action: [concrete next step for the user]
|
|
61
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
62
|
+
Pre-Flight: β
All checks passed
|
|
63
|
+
or β [blocking item that must be resolved first]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## π€ LLM-Specific Traps
|
|
71
|
+
|
|
72
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
73
|
+
|
|
74
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
75
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
76
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
77
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
78
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## ποΈ Tribunal Integration (Anti-Hallucination)
|
|
83
|
+
|
|
84
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
85
|
+
**Active reviewers: `logic-reviewer` Β· `security-auditor`**
|
|
86
|
+
|
|
87
|
+
### β Forbidden AI Tropes
|
|
88
|
+
|
|
89
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
90
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
91
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
92
|
+
|
|
93
|
+
### β
Pre-Flight Self-Audit
|
|
94
|
+
|
|
95
|
+
Review these questions before confirming output:
|
|
96
|
+
```
|
|
97
|
+
β
Did I rely ONLY on real, verified tools and methods?
|
|
98
|
+
β
Is this solution appropriately scoped to the user's constraints?
|
|
99
|
+
β
Did I handle potential failure modes and edge cases?
|
|
100
|
+
β
Have I avoided generic boilerplate that doesn't add value?
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### π Verification-Before-Completion (VBC) Protocol
|
|
104
|
+
|
|
105
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
106
|
+
- β **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
107
|
+
- β
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|