zhuge-workflow 0.1.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.
Files changed (80) hide show
  1. package/dist/index.js +801 -0
  2. package/dist/index.js.map +1 -0
  3. package/package.json +61 -0
  4. package/templates/claude/CLAUDE-ccg.md +258 -0
  5. package/templates/claude/CLAUDE.md +106 -0
  6. package/templates/claude/commands/ccg/_context.md +152 -0
  7. package/templates/claude/commands/ccg/spec-impl.md +161 -0
  8. package/templates/claude/commands/ccg/spec-plan-trellis.md +239 -0
  9. package/templates/claude/commands/ccg/spec-plan.md +225 -0
  10. package/templates/claude/commands/ccg/spec-research.md +113 -0
  11. package/templates/claude/commands/ccg/spec-review.md +127 -0
  12. package/templates/claude/commands/developer/brainstorm.md +5 -0
  13. package/templates/claude/commands/developer/design-checklist.md +81 -0
  14. package/templates/claude/commands/developer/design-doc.md +188 -0
  15. package/templates/claude/commands/developer/requirement-doc.md +150 -0
  16. package/templates/claude/commands/developer/requirement-interrogate.md +71 -0
  17. package/templates/claude/commands/developer/status.md +55 -0
  18. package/templates/claude/rules/bash-style.md +46 -0
  19. package/templates/claude/rules/claude-code-defensive.md +99 -0
  20. package/templates/claude/rules/doc-sync.md +49 -0
  21. package/templates/claude/rules/ops-safety.md +32 -0
  22. package/templates/claude/skills/bash-style/SKILL.md +244 -0
  23. package/templates/claude/skills/brainstorming/SKILL.md +48 -0
  24. package/templates/claude/skills/dotnet-dev/SKILL.md +250 -0
  25. package/templates/claude/skills/dotnet-dev/references/dotnet-style.md +991 -0
  26. package/templates/claude/skills/mcp-builder/LICENSE.txt +202 -0
  27. package/templates/claude/skills/mcp-builder/SKILL.md +328 -0
  28. package/templates/claude/skills/mcp-builder/reference/evaluation.md +602 -0
  29. package/templates/claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  30. package/templates/claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  31. package/templates/claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  32. package/templates/claude/skills/mcp-builder/scripts/connections.py +151 -0
  33. package/templates/claude/skills/mcp-builder/scripts/evaluation.py +373 -0
  34. package/templates/claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  35. package/templates/claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  36. package/templates/claude/skills/ops-safety/SKILL.md +130 -0
  37. package/templates/claude/skills/python-dev/SKILL.md +281 -0
  38. package/templates/claude/skills/skill-creator/LICENSE.txt +202 -0
  39. package/templates/claude/skills/skill-creator/SKILL.md +209 -0
  40. package/templates/claude/skills/skill-creator/scripts/init_skill.py +303 -0
  41. package/templates/claude/skills/skill-creator/scripts/package_skill.py +110 -0
  42. package/templates/claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  43. package/templates/claude/skills/sqlserver-executor/SKILL.md +201 -0
  44. package/templates/claude/skills/sqlserver-executor/assets/config-example.json +26 -0
  45. package/templates/claude/skills/sqlserver-executor/config.json +12 -0
  46. package/templates/claude/skills/sqlserver-executor/scripts/sql_executor.py +404 -0
  47. package/templates/claude/skills/ui-ux-pro-max/SKILL.md +228 -0
  48. package/templates/claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
  49. package/templates/claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
  50. package/templates/claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
  51. package/templates/claude/skills/ui-ux-pro-max/data/products.csv +97 -0
  52. package/templates/claude/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  53. package/templates/claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  54. package/templates/claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  55. package/templates/claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  56. package/templates/claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  57. package/templates/claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  58. package/templates/claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  59. package/templates/claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  60. package/templates/claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  61. package/templates/claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  62. package/templates/claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  63. package/templates/claude/skills/ui-ux-pro-max/data/styles.csv +59 -0
  64. package/templates/claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
  65. package/templates/claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  66. package/templates/claude/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  67. package/templates/claude/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  68. package/templates/claude/skills/ui-ux-pro-max/scripts/core.py +238 -0
  69. package/templates/claude/skills/ui-ux-pro-max/scripts/search.py +61 -0
  70. package/templates/claude/skills/webapp-testing/LICENSE.txt +202 -0
  71. package/templates/claude/skills/webapp-testing/SKILL.md +96 -0
  72. package/templates/claude/skills/webapp-testing/examples/console_logging.py +35 -0
  73. package/templates/claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  74. package/templates/claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  75. package/templates/claude/skills/webapp-testing/scripts/with_server.py +106 -0
  76. package/templates/init/claude-agents/ccg-impl.md +199 -0
  77. package/templates/init/claude-agents/ccg-review.md +146 -0
  78. package/templates/init/claude-agents/dispatch.md +253 -0
  79. package/templates/init/claude-hooks/inject-subagent-context.py +964 -0
  80. package/templates/init/trellis-scripts/task.sh +1326 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "default": "dev",
3
+ "connections": {
4
+ "dev": {
5
+ "server": "10.1.173.233",
6
+ "database": "UFTData416475_210001",
7
+ "user": "sa",
8
+ "password": "123",
9
+ "port": 1433
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,404 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SQL Server 执行器 - 支持除 DELETE 外的所有 SQL 操作
4
+ 使用 pymssql 连接 SQL Server 数据库
5
+ 支持 JSON 配置文件配置数据库连接信息
6
+ """
7
+
8
+ import argparse
9
+ import json
10
+ import os
11
+ import re
12
+ import sys
13
+ from typing import Optional, Dict, Any
14
+
15
+ try:
16
+ import pymssql
17
+ except ImportError:
18
+ print("错误: 需要安装 pymssql 库")
19
+ print("请执行: pip install pymssql")
20
+ sys.exit(1)
21
+
22
+
23
+ # 获取脚本所在目录
24
+ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
25
+ SKILL_DIR = os.path.dirname(SCRIPT_DIR)
26
+
27
+ # 默认配置文件路径(优先从技能目录读取)
28
+ DEFAULT_CONFIG_PATHS = [
29
+ os.path.join(SKILL_DIR, "config.json"),
30
+ os.path.expanduser("~/.sqlserver-executor.json"),
31
+ os.path.expanduser("~/.config/sqlserver-executor/config.json"),
32
+ "./sqlserver-config.json"
33
+ ]
34
+
35
+
36
+ def load_config(config_path: Optional[str] = None) -> Dict[str, Any]:
37
+ """
38
+ 加载配置文件
39
+
40
+ Args:
41
+ config_path: 指定的配置文件路径,为 None 时搜索默认路径
42
+
43
+ Returns:
44
+ 配置字典,未找到时返回空字典
45
+ """
46
+ if config_path:
47
+ if os.path.exists(config_path):
48
+ with open(config_path, 'r', encoding='utf-8') as f:
49
+ return json.load(f)
50
+ else:
51
+ print(f"警告: 指定的配置文件不存在 - {config_path}")
52
+ return {}
53
+
54
+ # 搜索默认路径
55
+ for path in DEFAULT_CONFIG_PATHS:
56
+ if os.path.exists(path):
57
+ with open(path, 'r', encoding='utf-8') as f:
58
+ return json.load(f)
59
+
60
+ return {}
61
+
62
+
63
+ def get_connection_config(config: Dict[str, Any], profile: Optional[str] = None) -> Dict[str, Any]:
64
+ """
65
+ 获取连接配置
66
+
67
+ Args:
68
+ config: 完整配置字典
69
+ profile: 配置名称,为 None 时使用 default 或第一个配置
70
+
71
+ Returns:
72
+ 连接配置字典
73
+ """
74
+ connections = config.get("connections", {})
75
+
76
+ if not connections:
77
+ # 兼容旧格式:直接在根级别配置
78
+ return {
79
+ "server": config.get("server"),
80
+ "database": config.get("database"),
81
+ "user": config.get("user"),
82
+ "password": config.get("password"),
83
+ "port": config.get("port", 1433)
84
+ }
85
+
86
+ if profile:
87
+ if profile in connections:
88
+ return connections[profile]
89
+ else:
90
+ print(f"警告: 配置 '{profile}' 不存在,使用默认配置")
91
+
92
+ # 使用 default 配置或第一个配置
93
+ default_profile = config.get("default", "default")
94
+ if default_profile in connections:
95
+ return connections[default_profile]
96
+
97
+ # 返回第一个配置
98
+ if connections:
99
+ first_key = list(connections.keys())[0]
100
+ return connections[first_key]
101
+
102
+ return {}
103
+
104
+
105
+ def is_delete_statement(sql: str) -> bool:
106
+ """检查 SQL 是否包含 DELETE 语句"""
107
+ sql_upper = sql.upper().strip()
108
+
109
+ # 移除单行注释
110
+ sql_clean = re.sub(r'--.*$', '', sql_upper, flags=re.MULTILINE)
111
+ # 移除多行注释
112
+ sql_clean = re.sub(r'/\*.*?\*/', '', sql_clean, flags=re.DOTALL)
113
+
114
+ # 检查是否包含 DELETE 语句
115
+ delete_pattern = r'(^|\s|;)DELETE(\s|$)'
116
+ return bool(re.search(delete_pattern, sql_clean))
117
+
118
+
119
+ def execute_sql(
120
+ server: str,
121
+ database: str,
122
+ user: str,
123
+ password: str,
124
+ sql: str,
125
+ port: int = 1433,
126
+ output_format: str = "table"
127
+ ) -> dict:
128
+ """
129
+ 执行 SQL 语句
130
+
131
+ Args:
132
+ server: 服务器地址
133
+ database: 数据库名
134
+ user: 用户名
135
+ password: 密码
136
+ sql: SQL 语句
137
+ port: 端口号,默认 1433
138
+ output_format: 输出格式 (table/json/csv)
139
+
140
+ Returns:
141
+ 执行结果字典
142
+ """
143
+ # 安全检查:禁止 DELETE 操作
144
+ if is_delete_statement(sql):
145
+ return {
146
+ "success": False,
147
+ "error": "安全限制:不允许执行 DELETE 语句",
148
+ "rows_affected": 0,
149
+ "data": None
150
+ }
151
+
152
+ try:
153
+ conn = pymssql.connect(
154
+ server=server,
155
+ port=port,
156
+ user=user,
157
+ password=password,
158
+ database=database,
159
+ charset='utf8'
160
+ )
161
+ cursor = conn.cursor(as_dict=True)
162
+
163
+ cursor.execute(sql)
164
+
165
+ # 判断是否为查询语句
166
+ sql_type = sql.strip().upper().split()[0] if sql.strip() else ""
167
+
168
+ if sql_type == "SELECT" or cursor.description:
169
+ # 查询语句,返回结果集
170
+ rows = cursor.fetchall()
171
+ columns = [desc[0] for desc in cursor.description] if cursor.description else []
172
+
173
+ result = {
174
+ "success": True,
175
+ "error": None,
176
+ "row_count": len(rows),
177
+ "columns": columns,
178
+ "data": rows
179
+ }
180
+ else:
181
+ # 非查询语句(INSERT/UPDATE/CREATE等)
182
+ conn.commit()
183
+ result = {
184
+ "success": True,
185
+ "error": None,
186
+ "rows_affected": cursor.rowcount,
187
+ "data": None
188
+ }
189
+
190
+ cursor.close()
191
+ conn.close()
192
+ return result
193
+
194
+ except pymssql.Error as e:
195
+ return {
196
+ "success": False,
197
+ "error": str(e),
198
+ "rows_affected": 0,
199
+ "data": None
200
+ }
201
+ except Exception as e:
202
+ return {
203
+ "success": False,
204
+ "error": f"未知错误: {str(e)}",
205
+ "rows_affected": 0,
206
+ "data": None
207
+ }
208
+
209
+
210
+ def format_output(result: dict, output_format: str) -> str:
211
+ """格式化输出结果"""
212
+ if not result["success"]:
213
+ return f"错误: {result['error']}"
214
+
215
+ if result.get("data") is None:
216
+ return f"执行成功,影响行数: {result.get('rows_affected', 0)}"
217
+
218
+ data = result["data"]
219
+ columns = result.get("columns", [])
220
+
221
+ if not data:
222
+ return "查询成功,无数据返回"
223
+
224
+ if output_format == "json":
225
+ return json.dumps(data, ensure_ascii=False, indent=2, default=str)
226
+
227
+ elif output_format == "csv":
228
+ lines = [",".join(columns)]
229
+ for row in data:
230
+ line = ",".join(str(row.get(col, "")) for col in columns)
231
+ lines.append(line)
232
+ return "\n".join(lines)
233
+
234
+ else: # table 格式
235
+ # 计算每列最大宽度
236
+ col_widths = {col: len(col) for col in columns}
237
+ for row in data:
238
+ for col in columns:
239
+ val_len = len(str(row.get(col, "")))
240
+ col_widths[col] = max(col_widths[col], val_len)
241
+
242
+ # 构建表格
243
+ header = " | ".join(col.ljust(col_widths[col]) for col in columns)
244
+ separator = "-+-".join("-" * col_widths[col] for col in columns)
245
+
246
+ lines = [header, separator]
247
+ for row in data:
248
+ line = " | ".join(str(row.get(col, "")).ljust(col_widths[col]) for col in columns)
249
+ lines.append(line)
250
+
251
+ lines.append(f"\n共 {len(data)} 行")
252
+ return "\n".join(lines)
253
+
254
+
255
+ def list_profiles(config: Dict[str, Any]) -> None:
256
+ """列出所有可用的配置"""
257
+ connections = config.get("connections", {})
258
+ default_profile = config.get("default", "default")
259
+
260
+ if not connections:
261
+ print("未找到任何数据库配置")
262
+ return
263
+
264
+ print("可用的数据库配置:")
265
+ print("-" * 50)
266
+ for name, conn in connections.items():
267
+ default_mark = " (默认)" if name == default_profile else ""
268
+ server = conn.get("server", "未配置")
269
+ database = conn.get("database", "未配置")
270
+ print(f" {name}{default_mark}")
271
+ print(f" 服务器: {server}")
272
+ print(f" 数据库: {database}")
273
+ print()
274
+
275
+
276
+ def main():
277
+ parser = argparse.ArgumentParser(
278
+ description="SQL Server 执行器 - 支持除 DELETE 外的所有 SQL 操作",
279
+ formatter_class=argparse.RawDescriptionHelpFormatter,
280
+ epilog="""
281
+ 配置文件示例 (~/.sqlserver-executor.json):
282
+ {
283
+ "default": "dev",
284
+ "connections": {
285
+ "dev": {
286
+ "server": "localhost",
287
+ "database": "DevDB",
288
+ "user": "sa",
289
+ "password": "password",
290
+ "port": 1433
291
+ },
292
+ "prod": {
293
+ "server": "prod-server",
294
+ "database": "ProdDB",
295
+ "user": "app_user",
296
+ "password": "secret",
297
+ "port": 1433
298
+ }
299
+ }
300
+ }
301
+ """
302
+ )
303
+
304
+ # 配置相关参数
305
+ parser.add_argument("-c", "--config", help="配置文件路径")
306
+ parser.add_argument("--profile", help="使用指定的配置名称")
307
+ parser.add_argument("--list-profiles", action="store_true", help="列出所有可用配置")
308
+
309
+ # 连接参数(可覆盖配置文件)
310
+ parser.add_argument("-s", "--server", help="服务器地址")
311
+ parser.add_argument("-d", "--database", help="数据库名")
312
+ parser.add_argument("-u", "--user", help="用户名")
313
+ parser.add_argument("-p", "--password", help="密码")
314
+ parser.add_argument("-P", "--port", type=int, help="端口号 (默认: 1433)")
315
+
316
+ # SQL 相关参数
317
+ parser.add_argument("-q", "--query", help="SQL 语句")
318
+ parser.add_argument("-f", "--file", help="SQL 文件路径")
319
+ parser.add_argument(
320
+ "-o", "--output",
321
+ choices=["table", "json", "csv"],
322
+ default="table",
323
+ help="输出格式 (默认: table)"
324
+ )
325
+
326
+ args = parser.parse_args()
327
+
328
+ # 加载配置文件
329
+ config = load_config(args.config)
330
+
331
+ # 列出配置
332
+ if args.list_profiles:
333
+ list_profiles(config)
334
+ sys.exit(0)
335
+
336
+ # 获取连接配置
337
+ conn_config = get_connection_config(config, args.profile)
338
+
339
+ # 命令行参数优先级高于配置文件
340
+ server = args.server or conn_config.get("server")
341
+ database = args.database or conn_config.get("database")
342
+ user = args.user or conn_config.get("user")
343
+ password = args.password or conn_config.get("password")
344
+ port = args.port or conn_config.get("port", 1433)
345
+
346
+ # 验证必要参数
347
+ missing = []
348
+ if not server:
349
+ missing.append("server (-s)")
350
+ if not database:
351
+ missing.append("database (-d)")
352
+ if not user:
353
+ missing.append("user (-u)")
354
+ if not password:
355
+ missing.append("password (-p)")
356
+
357
+ if missing:
358
+ print(f"错误: 缺少必要的连接参数: {', '.join(missing)}")
359
+ print("请通过命令行参数或配置文件提供这些参数")
360
+ print("使用 --help 查看帮助信息")
361
+ sys.exit(1)
362
+
363
+ # 获取 SQL 语句
364
+ if args.query:
365
+ sql = args.query
366
+ elif args.file:
367
+ if not os.path.exists(args.file):
368
+ print(f"错误: 文件不存在 - {args.file}")
369
+ sys.exit(1)
370
+ with open(args.file, 'r', encoding='utf-8') as f:
371
+ sql = f.read()
372
+ else:
373
+ # 从标准输入读取
374
+ if sys.stdin.isatty():
375
+ print("错误: 未提供 SQL 语句")
376
+ print("使用 -q 参数提供 SQL 语句,或使用 -f 参数指定 SQL 文件")
377
+ sys.exit(1)
378
+ sql = sys.stdin.read()
379
+
380
+ if not sql.strip():
381
+ print("错误: 未提供 SQL 语句")
382
+ sys.exit(1)
383
+
384
+ # 执行 SQL
385
+ result = execute_sql(
386
+ server=server,
387
+ database=database,
388
+ user=user,
389
+ password=password,
390
+ port=port,
391
+ sql=sql,
392
+ output_format=args.output
393
+ )
394
+
395
+ # 输出结果
396
+ output = format_output(result, args.output)
397
+ print(output)
398
+
399
+ # 返回状态码
400
+ sys.exit(0 if result["success"] else 1)
401
+
402
+
403
+ if __name__ == "__main__":
404
+ main()
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: ui-ux-pro-max
3
+ description: "UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
4
+ ---
5
+
6
+ # UI/UX Pro Max - Design Intelligence
7
+
8
+ Searchable database of UI styles, color palettes, font pairings, chart types, product recommendations, UX guidelines, and stack-specific best practices.
9
+
10
+ ## Prerequisites
11
+
12
+ Check if Python is installed:
13
+
14
+ ```bash
15
+ python3 --version || python --version
16
+ ```
17
+
18
+ If Python is not installed, install it based on user's OS:
19
+
20
+ **macOS:**
21
+ ```bash
22
+ brew install python3
23
+ ```
24
+
25
+ **Ubuntu/Debian:**
26
+ ```bash
27
+ sudo apt update && sudo apt install python3
28
+ ```
29
+
30
+ **Windows:**
31
+ ```powershell
32
+ winget install Python.Python.3.12
33
+ ```
34
+
35
+ ---
36
+
37
+ ## How to Use This Skill
38
+
39
+ When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
40
+
41
+ ### Step 1: Analyze User Requirements
42
+
43
+ Extract key information from user request:
44
+ - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
45
+ - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
46
+ - **Industry**: healthcare, fintech, gaming, education, etc.
47
+ - **Stack**: React, Vue, Next.js, or default to `html-tailwind`
48
+
49
+ ### Step 2: Search Relevant Domains
50
+
51
+ Use `search.py` multiple times to gather comprehensive information. Search until you have enough context.
52
+
53
+ ```bash
54
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
55
+ ```
56
+
57
+ **Recommended search order:**
58
+
59
+ 1. **Product** - Get style recommendations for product type
60
+ 2. **Style** - Get detailed style guide (colors, effects, frameworks)
61
+ 3. **Typography** - Get font pairings with Google Fonts imports
62
+ 4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
63
+ 5. **Landing** - Get page structure (if landing page)
64
+ 6. **Chart** - Get chart recommendations (if dashboard/analytics)
65
+ 7. **UX** - Get best practices and anti-patterns
66
+ 8. **Stack** - Get stack-specific guidelines (default: html-tailwind)
67
+
68
+ ### Step 3: Stack Guidelines (Default: html-tailwind)
69
+
70
+ If user doesn't specify a stack, **default to `html-tailwind`**.
71
+
72
+ ```bash
73
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
74
+ ```
75
+
76
+ Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`
77
+
78
+ ---
79
+
80
+ ## Search Reference
81
+
82
+ ### Available Domains
83
+
84
+ | Domain | Use For | Example Keywords |
85
+ |--------|---------|------------------|
86
+ | `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
87
+ | `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
88
+ | `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
89
+ | `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
90
+ | `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
91
+ | `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
92
+ | `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
93
+ | `prompt` | AI prompts, CSS keywords | (style name) |
94
+
95
+ ### Available Stacks
96
+
97
+ | Stack | Focus |
98
+ |-------|-------|
99
+ | `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
100
+ | `react` | State, hooks, performance, patterns |
101
+ | `nextjs` | SSR, routing, images, API routes |
102
+ | `vue` | Composition API, Pinia, Vue Router |
103
+ | `svelte` | Runes, stores, SvelteKit |
104
+ | `swiftui` | Views, State, Navigation, Animation |
105
+ | `react-native` | Components, Navigation, Lists |
106
+ | `flutter` | Widgets, State, Layout, Theming |
107
+
108
+ ---
109
+
110
+ ## Example Workflow
111
+
112
+ **User request:** "Làm landing page cho dịch vụ chăm sóc da chuyên nghiệp"
113
+
114
+ **AI should:**
115
+
116
+ ```bash
117
+ # 1. Search product type
118
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --domain product
119
+
120
+ # 2. Search style (based on industry: beauty, elegant)
121
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "elegant minimal soft" --domain style
122
+
123
+ # 3. Search typography
124
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "elegant luxury" --domain typography
125
+
126
+ # 4. Search color palette
127
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness" --domain color
128
+
129
+ # 5. Search landing page structure
130
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "hero-centric social-proof" --domain landing
131
+
132
+ # 6. Search UX guidelines
133
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "animation" --domain ux
134
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "accessibility" --domain ux
135
+
136
+ # 7. Search stack guidelines (default: html-tailwind)
137
+ python3 .claude/skills/ui-ux-pro-max/scripts/search.py "layout responsive" --stack html-tailwind
138
+ ```
139
+
140
+ **Then:** Synthesize all search results and implement the design.
141
+
142
+ ---
143
+
144
+ ## Tips for Better Results
145
+
146
+ 1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
147
+ 2. **Search multiple times** - Different keywords reveal different insights
148
+ 3. **Combine domains** - Style + Typography + Color = Complete design system
149
+ 4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
150
+ 5. **Use stack flag** - Get implementation-specific best practices
151
+ 6. **Iterate** - If first search doesn't match, try different keywords
152
+
153
+ ---
154
+
155
+ ## Common Rules for Professional UI
156
+
157
+ These are frequently overlooked issues that make UI look unprofessional:
158
+
159
+ ### Icons & Visual Elements
160
+
161
+ | Rule | Do | Don't |
162
+ |------|----|----- |
163
+ | **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 🚀 ⚙️ as UI icons |
164
+ | **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
165
+ | **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
166
+ | **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
167
+
168
+ ### Interaction & Cursor
169
+
170
+ | Rule | Do | Don't |
171
+ |------|----|----- |
172
+ | **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
173
+ | **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
174
+ | **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
175
+
176
+ ### Light/Dark Mode Contrast
177
+
178
+ | Rule | Do | Don't |
179
+ |------|----|----- |
180
+ | **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
181
+ | **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
182
+ | **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
183
+ | **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
184
+
185
+ ### Layout & Spacing
186
+
187
+ | Rule | Do | Don't |
188
+ |------|----|----- |
189
+ | **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
190
+ | **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
191
+ | **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
192
+
193
+ ---
194
+
195
+ ## Pre-Delivery Checklist
196
+
197
+ Before delivering UI code, verify these items:
198
+
199
+ ### Visual Quality
200
+ - [ ] No emojis used as icons (use SVG instead)
201
+ - [ ] All icons from consistent icon set (Heroicons/Lucide)
202
+ - [ ] Brand logos are correct (verified from Simple Icons)
203
+ - [ ] Hover states don't cause layout shift
204
+ - [ ] Use theme colors directly (bg-primary) not var() wrapper
205
+
206
+ ### Interaction
207
+ - [ ] All clickable elements have `cursor-pointer`
208
+ - [ ] Hover states provide clear visual feedback
209
+ - [ ] Transitions are smooth (150-300ms)
210
+ - [ ] Focus states visible for keyboard navigation
211
+
212
+ ### Light/Dark Mode
213
+ - [ ] Light mode text has sufficient contrast (4.5:1 minimum)
214
+ - [ ] Glass/transparent elements visible in light mode
215
+ - [ ] Borders visible in both modes
216
+ - [ ] Test both modes before delivery
217
+
218
+ ### Layout
219
+ - [ ] Floating elements have proper spacing from edges
220
+ - [ ] No content hidden behind fixed navbars
221
+ - [ ] Responsive at 320px, 768px, 1024px, 1440px
222
+ - [ ] No horizontal scroll on mobile
223
+
224
+ ### Accessibility
225
+ - [ ] All images have alt text
226
+ - [ ] Form inputs have labels
227
+ - [ ] Color is not the only indicator
228
+ - [ ] `prefers-reduced-motion` respected
@@ -0,0 +1,26 @@
1
+ No,Data Type,Keywords,Best Chart Type,Secondary Options,Color Guidance,Performance Impact,Accessibility Notes,Library Recommendation,Interactive Level
2
+ 1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area",Primary: #0080FF. Multiple series: use distinct colors. Fill: 20% opacity,⚡ Excellent (optimized),✓ Clear line patterns for colorblind users. Add pattern overlays.,"Chart.js, Recharts, ApexCharts",Hover + Zoom
3
+ 2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar",Each bar: distinct color. Category: grouped same color. Sorted: descending order,⚡ Excellent,✓ Easy to compare. Add value labels on bars for clarity.,"Chart.js, Recharts, D3.js",Hover + Sort
4
+ 3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Treemap",Colors: 5-6 max. Contrasting palette. Large slices first. Use labels.,⚡ Good (limit 6 slices),⚠ Hard for accessibility. Better: Stacked bar with legend. Avoid pie if >5 items.,"Chart.js, Recharts, D3.js",Hover + Drill
5
+ 4,Correlation/Distribution,"correlation, distribution, scatter, relationship, pattern",Scatter Plot or Bubble Chart,"Heat Map, Matrix",Color axis: gradient (blue-red). Size: relative. Opacity: 0.6-0.8 to show density,⚠ Moderate (many points),⚠ Provide data table alternative. Use pattern + color distinction.,"D3.js, Plotly, Recharts",Hover + Brush
6
+ 5,Heatmap/Intensity,"heatmap, heat-map, intensity, density, matrix",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat",Gradient: Cool (blue) to Hot (red). Scale: clear legend. Divergent for ±data,⚡ Excellent (color CSS),⚠ Colorblind: Use pattern overlay. Provide numerical legend.,"D3.js, Plotly, ApexCharts",Hover + Zoom
7
+ 6,Geographic Data,"geographic, map, location, region, geo, spatial","Choropleth Map, Bubble Map",Geographic Heat Map,Regional: single color gradient or categorized colors. Legend: clear scale,⚠ Moderate (rendering),⚠ Include text labels for regions. Provide data table alternative.,"D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
8
+ 7,Funnel/Flow,funnel/flow,"Funnel Chart, Sankey",Waterfall (for flows),Stages: gradient (starting color → ending color). Show conversion %,⚡ Good,✓ Clear stage labels + percentages. Good for accessibility if labeled.,"D3.js, Recharts, Custom SVG",Hover + Drill
9
+ 8,Performance vs Target,performance-vs-target,Gauge Chart or Bullet Chart,"Dial, Thermometer",Performance: Red→Yellow→Green gradient. Target: marker line. Threshold colors,⚡ Good,✓ Add numerical value + percentage label beside gauge.,"D3.js, ApexCharts, Custom SVG",Hover
10
+ 9,Time-Series Forecast,time-series-forecast,Line with Confidence Band,Ribbon Chart,Actual: solid line #0080FF. Forecast: dashed #FF9500. Band: light shading,⚡ Good,✓ Clearly distinguish actual vs forecast. Add legend.,"Chart.js, ApexCharts, Plotly",Hover + Toggle
11
+ 10,Anomaly Detection,anomaly-detection,Line Chart with Highlights,Scatter with Alert,Normal: blue #0080FF. Anomaly: red #FF0000 circle/square marker + alert,⚡ Good,✓ Circle/marker for anomalies. Add text alert annotation.,"D3.js, Plotly, ApexCharts",Hover + Alert
12
+ 11,Hierarchical/Nested Data,hierarchical/nested-data,Treemap,"Sunburst, Nested Donut, Icicle",Parent: distinct hues. Children: lighter shades. White borders 2-3px.,⚠ Moderate,⚠ Poor - provide table alternative. Label large areas.,"D3.js, Recharts, ApexCharts",Hover + Drilldown
13
+ 12,Flow/Process Data,flow/process-data,Sankey Diagram,"Alluvial, Chord Diagram",Gradient from source to target. Opacity 0.4-0.6 for flows.,⚠ Moderate,⚠ Poor - provide flow table alternative.,"D3.js (d3-sankey), Plotly",Hover + Drilldown
14
+ 13,Cumulative Changes,cumulative-changes,Waterfall Chart,"Stacked Bar, Cascade",Increases: #4CAF50. Decreases: #F44336. Start: #2196F3. End: #0D47A1.,⚡ Good,✓ Good - clear directional colors with labels.,"ApexCharts, Highcharts, Plotly",Hover
15
+ 14,Multi-Variable Comparison,multi-variable-comparison,Radar/Spider Chart,"Parallel Coordinates, Grouped Bar",Single: #0080FF 20% fill. Multiple: distinct colors per dataset.,⚡ Good,⚠ Moderate - limit 5-8 axes. Add data table.,"Chart.js, Recharts, ApexCharts",Hover + Toggle
16
+ 15,Stock/Trading OHLC,stock/trading-ohlc,Candlestick Chart,"OHLC Bar, Heikin-Ashi",Bullish: #26A69A. Bearish: #EF5350. Volume: 40% opacity below.,⚡ Good,⚠ Moderate - provide OHLC data table.,"Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
17
+ 16,Relationship/Connection Data,relationship/connection-data,Network Graph,"Hierarchical Tree, Adjacency Matrix",Node types: categorical colors. Edges: #90A4AE 60% opacity.,❌ Poor (500+ nodes struggles),❌ Very Poor - provide adjacency list alternative.,"D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
18
+ 17,Distribution/Statistical,distribution/statistical,Box Plot,"Violin Plot, Beeswarm",Box: #BBDEFB. Border: #1976D2. Median: #D32F2F. Outliers: #F44336.,⚡ Excellent,"✓ Good - include stats table (min, Q1, median, Q3, max).","Plotly, D3.js, Chart.js (plugin)",Hover
19
+ 18,Performance vs Target (Compact),performance-vs-target-(compact),Bullet Chart,"Gauge, Progress Bar","Ranges: #FFCDD2, #FFF9C4, #C8E6C9. Performance: #1976D2. Target: black 3px.",⚡ Excellent,✓ Excellent - compact with clear values.,"D3.js, Plotly, Custom SVG",Hover
20
+ 19,Proportional/Percentage,proportional/percentage,Waffle Chart,"Pictogram, Stacked Bar 100%",10x10 grid. 3-5 categories max. 2-3px spacing between squares.,⚡ Good,✓ Good - better than pie for accessibility.,"D3.js, React-Waffle, Custom CSS Grid",Hover
21
+ 20,Hierarchical Proportional,hierarchical-proportional,Sunburst Chart,"Treemap, Icicle, Circle Packing",Center to outer: darker to lighter. 15-20% lighter per level.,⚠ Moderate,⚠ Poor - provide hierarchy table alternative.,"D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
22
+ 21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split",Decomposition Tree,"Decision Tree, Flow Chart",Nodes: #2563EB (Primary) vs #EF4444 (Negative impact). Connectors: Neutral grey.,⚠ Moderate (calculation heavy),✓ clear hierarchy. Allow keyboard navigation for nodes.,"Power BI (native), React-Flow, Custom D3.js",Drill + Expand
23
+ 22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric",3D Scatter/Surface Plot,"Volumetric Rendering, Point Cloud",Depth cues: lighting/shading. Z-axis: color gradient (cool to warm).,❌ Heavy (WebGL required),❌ Poor - requires alternative 2D view or data table.,"Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
24
+ 23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse",Streaming Area Chart,"Ticker Tape, Moving Gauge",Current: Bright Pulse (#00FF00). History: Fading opacity. Grid: Dark.,⚡ Optimized (canvas/webgl),⚠ Flashing elements - provide pause button. High contrast.,Smoothed D3.js, CanvasJS, SciChart,Real-time + Pause
25
+ 24,Sentiment/Emotion,"sentiment, emotion, nlp, opinion, feeling",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart",Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Size = Frequency.,⚡ Good,⚠ Word clouds poor for screen readers. Use list view.,"D3-cloud, Highcharts, Nivo",Hover + Filter
26
+ 25,Process Mining,"process, mining, variants, path, bottleneck, log",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net",Happy path: #10B981 (Thick). Deviations: #F59E0B (Thin). Bottlenecks: #EF4444.,⚠ Moderate to Heavy,⚠ Complex graphs hard to navigate. Provide path summary.,"React-Flow, Cytoscape.js, Recharts",Drag + Node-Click