@a13xu/lucid 1.13.0 → 1.16.1
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/README.md +147 -21
- package/build/compression/semantic.d.ts +31 -0
- package/build/compression/semantic.js +196 -0
- package/build/config.d.ts +15 -0
- package/build/http/routes.d.ts +3 -0
- package/build/http/routes.js +56 -0
- package/build/http/server.d.ts +7 -0
- package/build/http/server.js +11 -0
- package/build/index.js +176 -0
- package/build/lucid-sync.d.ts +15 -0
- package/build/lucid-sync.js +72 -0
- package/build/retrieval/context.js +6 -0
- package/build/retrieval/qdrant.d.ts +1 -1
- package/build/retrieval/qdrant.js +11 -2
- package/build/tools/compress.d.ts +15 -0
- package/build/tools/compress.js +18 -0
- package/build/tools/init.js +16 -1
- package/build/tools/model-advisor.d.ts +9 -0
- package/build/tools/model-advisor.js +30 -0
- package/build/tools/smart-context.d.ts +16 -0
- package/build/tools/smart-context.js +54 -0
- package/build/tools/sync.js +8 -0
- package/package.json +64 -59
- package/skills/lucid-audit/SKILL.md +43 -23
- package/skills/lucid-context/SKILL.md +54 -20
- package/skills/lucid-plan/SKILL.md +25 -33
- package/skills/lucid-security/SKILL.md +22 -40
- package/skills/lucid-start/SKILL.md +70 -0
- package/skills/lucid-webdev/SKILL.md +31 -109
|
@@ -1,123 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lucid-webdev
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[
|
|
3
|
+
description: Use for web development tasks — generates components, pages, audits, API clients, and performance hints via Lucid's 10 web dev tools.
|
|
4
|
+
argument-hint: "[what you are building: component/page/api/audit]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
Before building any web component, page, or API client from scratch:
|
|
9
|
+
call the relevant generator tool first. Do not write boilerplate manually.
|
|
10
|
+
</HARD-GATE>
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## When to invoke
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
**INVOKE when:** building UI components, scaffolding pages, writing API clients, running accessibility/security/performance audits
|
|
15
|
+
**DO NOT INVOKE for:** backend-only logic with no web layer
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
generate_component(
|
|
16
|
-
description="user profile card with avatar and edit button",
|
|
17
|
-
framework="vue", # react | vue | nuxt
|
|
18
|
-
styling="tailwind", # tailwind | css-modules | none
|
|
19
|
-
typescript=true
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Generate a page scaffold
|
|
24
|
-
```
|
|
25
|
-
scaffold_page(
|
|
26
|
-
page_name="ProductDetail",
|
|
27
|
-
framework="nuxt", # nuxt | next | vue
|
|
28
|
-
sections=["hero", "specs", "reviews", "cta"],
|
|
29
|
-
seo_title="Product Detail"
|
|
30
|
-
)
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## SEO & Accessibility
|
|
34
|
-
|
|
35
|
-
### Generate SEO metadata
|
|
36
|
-
```
|
|
37
|
-
seo_meta(
|
|
38
|
-
title="Buy Widgets — Best Price",
|
|
39
|
-
description="Shop our range of premium widgets with free delivery.",
|
|
40
|
-
keywords=["widgets", "buy widgets", "widget shop"],
|
|
41
|
-
page_type="product", # article | product | landing | home
|
|
42
|
-
url="https://example.com/widgets",
|
|
43
|
-
image_url="https://example.com/og/widgets.jpg"
|
|
44
|
-
)
|
|
45
|
-
```
|
|
46
|
-
Returns: HTML meta tags + Open Graph + Twitter Card + JSON-LD structured data.
|
|
47
|
-
|
|
48
|
-
### Audit accessibility (WCAG)
|
|
49
|
-
```
|
|
50
|
-
accessibility_audit(
|
|
51
|
-
code="<your HTML/JSX/Vue snippet>",
|
|
52
|
-
wcag_level="AA", # A | AA | AAA
|
|
53
|
-
framework="vue" # html | jsx | vue
|
|
54
|
-
)
|
|
55
|
-
```
|
|
56
|
-
Returns: violations with severity (critical/warning/info), WCAG criterion, and corrected code.
|
|
57
|
-
|
|
58
|
-
## API & Testing
|
|
17
|
+
## Steps
|
|
59
18
|
|
|
60
|
-
###
|
|
19
|
+
### 0. Get model recommendation
|
|
61
20
|
```
|
|
62
|
-
|
|
63
|
-
endpoint="/users/:id",
|
|
64
|
-
method="GET", # GET | POST | PUT | PATCH | DELETE
|
|
65
|
-
response_schema="{ id: string; name: string; email: string }",
|
|
66
|
-
auth="bearer", # bearer | cookie | apikey | none
|
|
67
|
-
base_url_var="NEXT_PUBLIC_API_URL"
|
|
68
|
-
)
|
|
21
|
+
suggest_model(task_description="<paste the user's task description>")
|
|
69
22
|
```
|
|
23
|
+
Say: **"Using [model] — [reasoning]"** then proceed.
|
|
70
24
|
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
test_generator(
|
|
74
|
-
code="<your function or component source>",
|
|
75
|
-
test_framework="vitest", # vitest | jest | playwright
|
|
76
|
-
test_type="unit", # unit | integration | e2e
|
|
77
|
-
component_framework="vue" # vue | react | none
|
|
78
|
-
)
|
|
79
|
-
```
|
|
25
|
+
## Available tools
|
|
80
26
|
|
|
81
|
-
|
|
27
|
+
| Task | Tool |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Generate a React/Vue component | `generate_component(description, framework, styling, typescript)` |
|
|
30
|
+
| Scaffold a full page | `scaffold_page(page_name, framework, sections, seo_title)` |
|
|
31
|
+
| SEO meta tags | `seo_meta(title, description, keywords, page_type, url, image_url)` |
|
|
32
|
+
| Accessibility audit | `accessibility_audit(code, wcag_level, framework)` |
|
|
33
|
+
| API client | `api_client(endpoint, method, response_schema, auth, base_url_var)` |
|
|
34
|
+
| Test scaffolding | `test_generator(code, test_framework, test_type, component_framework)` |
|
|
35
|
+
| Responsive layout | `responsive_layout(description, framework, breakpoints, container)` |
|
|
36
|
+
| Security scan | `security_scan(code, language, context)` |
|
|
37
|
+
| Design tokens | `design_tokens(brand_name, primary_color, mood, output_format)` |
|
|
38
|
+
| Performance hints | `perf_hints(code, framework, context)` |
|
|
82
39
|
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
responsive_layout(
|
|
86
|
-
description="sidebar left 260px, main content, right panel 240px",
|
|
87
|
-
framework="tailwind", # tailwind | css-grid | flexbox
|
|
88
|
-
breakpoints=["mobile", "tablet", "desktop"],
|
|
89
|
-
container="sidebar" # full | centered | sidebar
|
|
90
|
-
)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Generate design tokens
|
|
94
|
-
```
|
|
95
|
-
design_tokens(
|
|
96
|
-
brand_name="Acme",
|
|
97
|
-
primary_color="#6366F1", # hex or name (blue, green, etc.)
|
|
98
|
-
mood="minimal", # minimal | bold | playful | corporate
|
|
99
|
-
output_format="css-variables" # css-variables | tailwind-config | json
|
|
100
|
-
)
|
|
101
|
-
```
|
|
40
|
+
## Workflow
|
|
102
41
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
security_scan(
|
|
108
|
-
code="<your code snippet>",
|
|
109
|
-
language="typescript", # javascript | typescript | html | vue
|
|
110
|
-
context="frontend" # frontend | backend | api
|
|
111
|
-
)
|
|
112
|
-
```
|
|
113
|
-
Detects: XSS, eval/injection, hardcoded secrets, SQL injection, open redirects, CORS issues.
|
|
114
|
-
|
|
115
|
-
### Analyze Core Web Vitals issues
|
|
116
|
-
```
|
|
117
|
-
perf_hints(
|
|
118
|
-
code="<your component or page source>",
|
|
119
|
-
framework="vue", # react | vue | nuxt | vanilla
|
|
120
|
-
context="page" # component | page | layout
|
|
121
|
-
)
|
|
122
|
-
```
|
|
123
|
-
Detects: missing image dimensions (CLS), render-blocking scripts (FCP), fetch-in-render (TTFB), heavy click handlers (INP), missing useMemo/computed.
|
|
42
|
+
1. Call the relevant generator/auditor tool
|
|
43
|
+
2. Review output → adapt to project conventions
|
|
44
|
+
3. `sync_file(path="<generated file>")` after saving
|
|
45
|
+
4. Run /lucid-audit before marking done
|