uaibuilder 0.1.2 → 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 +31 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -64,6 +64,31 @@ function buildMcpEntry(token) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
// ─── Skill file for Claude Code ───────────────────────
|
|
68
|
+
|
|
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
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
function installSkill() {
|
|
86
|
+
const skillDir = join(process.cwd(), '.claude', 'skills');
|
|
87
|
+
const skillPath = join(skillDir, 'uaibuilder.md');
|
|
88
|
+
if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true });
|
|
89
|
+
writeFileSync(skillPath, SKILL_CONTENT);
|
|
90
|
+
}
|
|
91
|
+
|
|
67
92
|
// ─── Read/Write config safely ─────────────────────────
|
|
68
93
|
|
|
69
94
|
function readConfig(path) {
|
|
@@ -125,11 +150,17 @@ function setup(flags) {
|
|
|
125
150
|
|
|
126
151
|
writeConfig(configPath, config);
|
|
127
152
|
|
|
153
|
+
// Install skill file for Claude Code
|
|
154
|
+
if (provider === 'claude') {
|
|
155
|
+
installSkill();
|
|
156
|
+
}
|
|
157
|
+
|
|
128
158
|
console.log(`
|
|
129
159
|
UaiBuilder configured for ${provider}!
|
|
130
160
|
|
|
131
161
|
Config: ${configPath}
|
|
132
162
|
Server: uaibuilder (MCP HTTP)
|
|
163
|
+
${provider === 'claude' ? 'Skill: .claude/skills/uaibuilder.md (installed)' : ''}
|
|
133
164
|
|
|
134
165
|
Next steps:
|
|
135
166
|
${provider === 'claude' ? ' 1. Restart Claude Code (close and reopen)' : ' 1. Restart your editor'}
|