create-pracht 0.6.0 → 0.6.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/package.json +1 -1
- package/skills/add-auth/SKILL.md +63 -143
- package/skills/add-capabilities/SKILL.md +409 -0
- package/skills/add-content/SKILL.md +242 -0
- package/skills/add-db/SKILL.md +93 -202
- package/skills/add-i18n/SKILL.md +178 -217
- package/skills/add-images/SKILL.md +203 -0
- package/skills/add-observability/SKILL.md +118 -15
- package/skills/add-openapi/SKILL.md +209 -0
- package/skills/audit-a11y/SKILL.md +8 -9
- package/skills/audit-agent-surface/SKILL.md +335 -0
- package/skills/audit-auth/SKILL.md +16 -11
- package/skills/audit-bundles/SKILL.md +56 -12
- package/skills/audit-csrf/SKILL.md +9 -10
- package/skills/audit-deps/SKILL.md +8 -8
- package/skills/audit-headers/SKILL.md +9 -10
- package/skills/audit-islands/SKILL.md +9 -10
- package/skills/audit-loaders/SKILL.md +23 -8
- package/skills/audit-redirects/SKILL.md +9 -10
- package/skills/audit-secrets/SKILL.md +6 -6
- package/skills/audit-seo/SKILL.md +8 -8
- package/skills/audit-shells/SKILL.md +8 -9
- package/skills/configure-isg/SKILL.md +9 -10
- package/skills/migrate-nextjs/SKILL.md +200 -415
- package/skills/pracht-debug/SKILL.md +165 -120
- package/skills/pracht-deploy/SKILL.md +248 -329
- package/skills/pracht-scaffold/SKILL.md +123 -146
- package/skills/pracht-test-api/SKILL.md +10 -10
- package/skills/pre-deploy/SKILL.md +166 -195
- package/skills/scaffold-e2e/SKILL.md +11 -12
- package/skills/scaffold-tests/SKILL.md +10 -12
- package/skills/tune-render-mode/SKILL.md +7 -8
- package/skills/typed-routes/SKILL.md +15 -11
- package/skills/upgrade-pracht/SKILL.md +12 -10
- package/src/index.js +43 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit-loaders
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: |
|
|
5
|
-
Audit pracht route loaders for serializability, leaked secrets,
|
|
6
|
-
|
|
7
|
-
Use
|
|
8
|
-
|
|
5
|
+
Audit pracht route loaders for serializability, leaked secrets, unsafe
|
|
6
|
+
`loaderCache`, browser-only API use, and missing `AbortSignal` plumbing.
|
|
7
|
+
Use for "audit loaders", "check loader data", "find serialization bugs", "loader
|
|
8
|
+
security review".
|
|
9
9
|
allowed-tools:
|
|
10
10
|
- Bash
|
|
11
11
|
- Read
|
|
@@ -21,8 +21,8 @@ ends up in the browser — including secrets you never meant to expose.
|
|
|
21
21
|
|
|
22
22
|
## Step 1: Enumerate routes
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
MCP: when the pracht MCP server is registered (docs/MCP.md), prefer its
|
|
25
|
+
`inspect_routes`/`inspect_api`/`inspect_build`/`doctor`/`verify` tools over
|
|
26
26
|
shelling out.
|
|
27
27
|
|
|
28
28
|
```bash
|
|
@@ -51,12 +51,27 @@ Flag returns that contain any of:
|
|
|
51
51
|
| `Date`, `Map`, `Set`, `URL` | Not preserved by `JSON.stringify` |
|
|
52
52
|
| Class instances | Lose prototype on the client |
|
|
53
53
|
| `Function` / arrow values | Stripped silently |
|
|
54
|
-
| `Promise`
|
|
54
|
+
| `Promise` (bare) | Becomes `{}` — wrap in `defer()` |
|
|
55
55
|
| Circular refs | Throws at serialize time |
|
|
56
56
|
| `Buffer` / typed arrays | Becomes `{}` or numeric keys |
|
|
57
57
|
| `bigint` | `JSON.stringify` throws |
|
|
58
58
|
| `undefined` in arrays/object | Drops keys; arrays become `null` |
|
|
59
59
|
|
|
60
|
+
A bare promise in loader data is always a bug — it serializes to `{}`. The fix
|
|
61
|
+
is `defer(promise)`, which marks the field as deferred and is read in the
|
|
62
|
+
component with `use()` inside a `<Suspense>` boundary. Flag a bare promise as an
|
|
63
|
+
`error` and point at `defer()`; a `defer()`ed field is correct and must not be
|
|
64
|
+
flagged.
|
|
65
|
+
|
|
66
|
+
Two `defer()` rules worth checking while you are in the loader:
|
|
67
|
+
|
|
68
|
+
- A deferred value must not redirect, throw `PrachtHttpError`, or set response
|
|
69
|
+
status or headers — by the time it settles the response is already committed.
|
|
70
|
+
Auth belongs in middleware or the awaited part of the loader.
|
|
71
|
+
- `defer(await …)` defeats the point and throws at runtime. Flag it.
|
|
72
|
+
- `defer()` must be returned from an enumerable data property, not hidden
|
|
73
|
+
behind a getter. An unresolved marker throws during serialization.
|
|
74
|
+
|
|
60
75
|
Recommend converting to `string` (ISO for dates), plain arrays, or plain objects
|
|
61
76
|
before return.
|
|
62
77
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit-redirects
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: |
|
|
5
|
-
Find open
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
?redirect= param safe", or "review login redirect handling".
|
|
5
|
+
Find open redirects in pracht loaders, middleware, and navigation. The framework
|
|
6
|
+
rejects unsafe schemes and CRLF at both ends, but a hand-rolled 3xx Response
|
|
7
|
+
bypasses every guard, and even a guarded redirect to an attacker-chosen origin
|
|
8
|
+
can phish.
|
|
9
|
+
Use for "audit redirects", "check for open redirects", "is my ?redirect= param
|
|
10
|
+
safe", "review login redirect handling".
|
|
12
11
|
allowed-tools:
|
|
13
12
|
- Bash
|
|
14
13
|
- Read
|
|
@@ -41,8 +40,8 @@ Bound the search first — do not grep the whole repo blind:
|
|
|
41
40
|
pracht inspect routes --json
|
|
42
41
|
```
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
MCP: when the pracht MCP server is registered (docs/MCP.md), prefer its
|
|
44
|
+
`inspect_routes`/`inspect_api`/`inspect_build`/`doctor`/`verify` tools over
|
|
46
45
|
shelling out.
|
|
47
46
|
|
|
48
47
|
The resolved graph gives you each route's `file`, `loaderFile`, and
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit-secrets
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: |
|
|
5
|
-
Detect environment variables and secrets
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Use
|
|
9
|
-
|
|
5
|
+
Detect environment variables and secrets reaching the client bundle via loader
|
|
6
|
+
return values, hydration state, or server-only modules imported from client code
|
|
7
|
+
paths.
|
|
8
|
+
Use for "audit secrets", "find leaked env vars", "is my API key exposed", "scan
|
|
9
|
+
for credential leaks".
|
|
10
10
|
allowed-tools:
|
|
11
11
|
- Bash
|
|
12
12
|
- Read
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit-seo
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: |
|
|
5
|
-
Per-route SEO audit
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Use
|
|
9
|
-
|
|
5
|
+
Per-route SEO audit: `head()` coverage, title and description presence, Open
|
|
6
|
+
Graph and Twitter cards, canonicals, robots rules, plus a `sitemap.xml`
|
|
7
|
+
generated from the route manifest.
|
|
8
|
+
Use for "audit SEO", "check meta tags", "generate a sitemap", "are my OG cards
|
|
9
|
+
set", "review robots.txt".
|
|
10
10
|
allowed-tools:
|
|
11
11
|
- Bash
|
|
12
12
|
- Read
|
|
@@ -23,8 +23,8 @@ coverage and generates the static SEO artifacts.
|
|
|
23
23
|
|
|
24
24
|
## Step 1: Inventory
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
MCP: when the pracht MCP server is registered (docs/MCP.md), prefer its
|
|
27
|
+
`inspect_routes`/`inspect_api`/`inspect_build`/`doctor`/`verify` tools over
|
|
28
28
|
shelling out.
|
|
29
29
|
|
|
30
30
|
```bash
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit-shells
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: |
|
|
5
|
-
Audit pracht shells
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
shells", or "is my layout structured correctly".
|
|
5
|
+
Audit pracht shells: missing `Loading()` on SPA routes, `<html>`/`<head>`/
|
|
6
|
+
`<body>` rendered inside a shell, shells that never render `children`, unused
|
|
7
|
+
shells, and `ErrorBoundary` exports shadowed by every route under them.
|
|
8
|
+
Use for "audit shells", "check shell composition", "find unused shells", "is my
|
|
9
|
+
layout structured correctly".
|
|
11
10
|
allowed-tools:
|
|
12
11
|
- Bash
|
|
13
12
|
- Read
|
|
@@ -24,8 +23,8 @@ component.
|
|
|
24
23
|
|
|
25
24
|
## Step 1: Enumerate
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
MCP: when the pracht MCP server is registered (docs/MCP.md), prefer its
|
|
27
|
+
`inspect_routes`/`inspect_api`/`inspect_build`/`doctor`/`verify` tools over
|
|
29
28
|
shelling out.
|
|
30
29
|
|
|
31
30
|
```bash
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-isg
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: |
|
|
5
|
-
Wire ISG
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Use
|
|
10
|
-
|
|
11
|
-
the edge".
|
|
5
|
+
Wire ISG revalidation for the project's adapter: route-level
|
|
6
|
+
`timeRevalidate`/`webhookRevalidate`, the authenticated `/__pracht/revalidate`
|
|
7
|
+
webhook, Cloudflare Workers Cache, Vercel ISR, and cache-key pitfalls — then
|
|
8
|
+
verify locally.
|
|
9
|
+
Use for "set up ISG", "configure revalidation", "add a revalidation webhook", "my
|
|
10
|
+
ISG page never updates", "cache this page at the edge".
|
|
12
11
|
allowed-tools:
|
|
13
12
|
- Bash
|
|
14
13
|
- Read
|
|
@@ -30,8 +29,8 @@ webhook, and the adapter-specific cache correctly.
|
|
|
30
29
|
|
|
31
30
|
## Step 1: Identify adapter and candidate routes
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
MCP: when the pracht MCP server is registered (docs/MCP.md), prefer its
|
|
33
|
+
`inspect_routes`/`inspect_api`/`inspect_build`/`doctor`/`verify` tools over
|
|
35
34
|
shelling out.
|
|
36
35
|
|
|
37
36
|
```bash
|