skills/coding/coding-web/SKILL.md
Web coding meta: JS/TS/Node for full-stack development
npx skillsauth add alphaonedev/openclaw-graph coding-webInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables OpenClaw to assist with full-stack web development using JavaScript, TypeScript, and Node.js, focusing on generating, debugging, and optimizing code for web applications.
Use this skill when building or maintaining web projects involving frontend (e.g., React, Vue) and backend (e.g., Node.js servers), especially for tasks like scaffolding apps, fixing bugs in JS/TS code, or integrating APIs. Apply it in iterative development cycles, such as rapid prototyping or migrating legacy code to modern standards.
import React from 'react'; const MyComponent = () => <div>Hello</div>; export default MyComponent;To invoke this skill, prefix commands with openclaw coding-web in your terminal or integrate via OpenClaw's API. Always specify the subcommand first (e.g., generate, debug), followed by options like --language ts or --framework react. For API calls, use POST requests to /api/coding-web/execute with a JSON payload containing { "action": "generate", "params": { "type": "component", "name": "UserForm" } }. Set environment variables for authentication, e.g., export $OPENCLAW_API_KEY before running commands. Chain skills by piping outputs, like using output from a database skill as input here.
openclaw coding-web generate --type server --framework express --port 3000 – Creates a basic Express server; add --language ts for TypeScript.openclaw coding-web debug --file app.js --issue "undefined variable" – Analyzes and patches errors in the specified file./api/coding-web/generate with body { "codeType": "component", "language": "ts", "details": { "name": "Login", "props": ["username"] } } – Returns generated code as JSON.{ "defaultLanguage": "ts", "framework": "react", "apiKey": "$OPENCLAW_API_KEY" }, placed in .openclaw/config.json.const response = await fetch('/api/coding-web/generate', { method: 'POST', body: JSON.stringify({ action: 'generate' }) }); const code = await response.json();$OPENCLAW_API_KEY in headers for API calls, e.g., headers: { 'Authorization': Bearer ${process.env.OPENCLAW_API_KEY} }.Integrate this skill with IDEs like VS Code by adding it to your extensions or using OpenClaw's plugin system; install via npm install openclaw-vscode. For CI/CD, embed in scripts like GitHub Actions: run: openclaw coding-web generate --type test --file src/app.js. Handle dependencies by specifying Node.js versions in package.json, e.g., "engines": { "node": ">=14" }. If using with other tools, export generated code as modules: module.exports = generatedCode;. Ensure your environment has Node.js installed; check with node -v before invoking.
When errors occur, check the exit code from CLI commands (e.g., code 1 for failures) and parse JSON error responses from APIs, which include fields like { "error": "Invalid params", "details": "Missing --type flag" }. For common issues, retry with corrected inputs, e.g., if a generation fails due to missing dependencies, run npm install express first. Use try-catch in code snippets: try { await openclawAPI.call('coding-web', { action: 'generate' }); } catch (e) { console.error(e.message); // e.g., "API key required" }. If authentication fails (e.g., 401 status), verify $OPENCLAW_API_KEY is set and not expired.
Example 1: Generate a Node.js Express Server
Use: openclaw coding-web generate --type server --framework express --language js
This creates a basic server file: const express = require('express'); const app = express(); app.listen(3000, () => console.log('Server running'));
Then, run it with node server.js to start the server on port 3000.
Example 2: Debug and Fix a TypeScript React Component
Use: openclaw coding-web debug --file MyComponent.tsx --issue "Type error in props"
It might output a fixed snippet: interface Props { name: string; } const MyComponent: React.FC<Props> = ({ name }) => <div>{name}</div>;
Integrate by copying the output into your project and rebuilding with tsc.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui