uaibuilder 0.1.3 → 0.1.4
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/index.mjs +14 -28
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -66,34 +66,20 @@ function buildMcpEntry(token) {
|
|
|
66
66
|
|
|
67
67
|
// ─── Skill file for Claude Code ───────────────────────
|
|
68
68
|
|
|
69
|
-
const SKILL_CONTENT = `# UaiBuilder
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Key rules
|
|
84
|
-
- **handler is INLINE CODE** — do NOT wrap in arrow function
|
|
85
|
-
- **Variables available**: db, request, corsHeaders, context, jwtSecret
|
|
86
|
-
- **Dynamic routes**: use :param in path, access via context.params.paramName
|
|
87
|
-
- **Auth**: set auth:true, then use user.id (from JWT). NEVER trust body userId
|
|
88
|
-
- **JWT**: signJwt(payload, jwtSecret) — 2 day expiry. NEVER use btoa()
|
|
89
|
-
- **Passwords**: hashPassword(password) / verifyPassword(password, hash) — PBKDF2
|
|
90
|
-
- **ALWAYS validate inputs**: required fields, email format, password 8+ chars
|
|
91
|
-
- **ALWAYS create /api/auth/refresh** alongside register/login
|
|
92
|
-
|
|
93
|
-
## After deploy
|
|
94
|
-
- deploy_publish returns health check — if ok:false, check handler code for syntax errors
|
|
95
|
-
- Use test_request to verify each endpoint
|
|
96
|
-
- Use group_overview for full dashboard
|
|
69
|
+
const SKILL_CONTENT = `# UaiBuilder
|
|
70
|
+
|
|
71
|
+
When the user asks to build, create, or deploy a web app, API, SaaS, backend, or landing page — use the UaiBuilder MCP tools. Start with uai_scaffold("app-name").
|
|
72
|
+
|
|
73
|
+
## NEVER
|
|
74
|
+
- Foreign keys as INTEGER — use TEXT (all IDs are UUIDs)
|
|
75
|
+
- id/created_at/updated_at in columns — auto-added
|
|
76
|
+
- btoa() for JWT — use signJwt(payload, jwtSecret)
|
|
77
|
+
- userId from request body — use user.id from JWT (auth:true)
|
|
78
|
+
- files_write to functions/*.js — use api_createEndpoint
|
|
79
|
+
- Deploy without test_request after
|
|
80
|
+
|
|
81
|
+
## Flow
|
|
82
|
+
uai_scaffold → db_createTable → api_createEndpoints (batch) → files_write("index.html") → deploy_publish → test_request
|
|
97
83
|
`;
|
|
98
84
|
|
|
99
85
|
function installSkill() {
|