name: web-development description: Use when users need to implement, integrate, debug, build, deploy, or validate a Web frontend after the product direction is already clear, especially for React, Vue, Vite, browser flows, or CloudBase Web integration. version: 2.27.0 alwaysApply: false
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Cross-cutting protocols (required before code changes or deployments):
- Change Safety Protocol: ../cloudbase-platform/references/protocols/change-safety-protocol.md
- Deployment Gate: ../cloudbase-platform/references/protocols/deployment-gate.md
ui-design first.ui-design skill and output a Design Specification. Skipping this step causes frontend styling to degrade to generic AI template defaults. The ui-design skill must be loaded before any visual implementation begins, not retroactively after the user complains about the appearance.frameworks.mdbrowser-testing.md../auth-tool-cloudbase/SKILL.md, then ../auth-web-cloudbase/SKILL.md../cloudbase-wechat-integration/SKILL.md (official docs: https://docs.cloudbase.net/integration/introduce/index.md)cloudbase-wechat-integration after identifying the Web surface.index.html. This causes NoSuchKey / 404 errors when users refresh or directly visit any sub-route.These rules override convenience. Treat them as a gate before saying "done".
any to bypass type errors. Not : any, not as any, not @ts-ignore, not @ts-nocheck, not @ts-expect-error without a written justification. any propagates silently and defeats the only compile-time safety net this project has.@types/..., or narrow the import, or write a precise interface / type for the shape you actually use.postMessage payload, window.* injection) → type it as unknown and narrow with a type guard (typeof, in, a discriminator field, or zod / equivalent).declare module in a local .d.ts, not any.<T> with a constraint, not any.unknown + narrowing is the acceptable escape hatch. any is not.any for a specific line (extremely rare), leave a one-line comment with why and what would remove it, so reviewers can audit.// eslint-disable to mute the real signal. Fix the rule violation, or discuss before disabling.Before making any non-trivial code or configuration change, you must first follow the Change Safety Protocol in cloudbase-platform/references/protocols/change-safety-protocol.md (declare impact → user confirmation → post-edit verification).
Before any static hosting publish or custom domain work, complete the checks in cloudbase-platform/references/protocols/deployment-gate.md.
Saying "I've implemented it" / "fixed it" / "it should work" without evidence is not acceptable. Before declaring completion, you must actually run the checks and report the result.
Static / build layer (always, when applicable):
tsc --noEmit (or vue-tsc --noEmit) passes cleanly — zero errors, zero suppressed diagnostics you added.eslint / project linter passes on changed files.npm run build / pnpm build / vite build) completes without new warnings that you introduced.Runtime / browser layer (whenever the change affects rendering, routing, forms, auth, or async flows):
agent-browser tool to actually open the page and reproduce the user-visible flow. Follow browser-testing.md for the concrete workflow.Only after both layers pass may you say the task is done. If either layer cannot be executed locally (e.g. blocked by credentials, missing backend, paid API), say so explicitly and list exactly which step is still unverified — do not gloss over it.
try { ... } catch {} to make the error go away.Use this skill for Web engineering work such as:
Do NOT use for:
- UI direction or visual system design only; use ui-design
- Mini program development; use miniprogram-development
- Backend service implementation; use cloudrun-development or cloud-functions
If the workspace is an existing application with TODOs, treat it as a targeted repair task, not a greenfield build.
Follow framework and build conventions
src and build output under dist unless the repo already uses a different convention.In an existing application with fixed structure, inspect the files that already own the flow before reading broad docs: src/lib/backend.*, src/lib/auth.*, src/lib/*service.*, route guards, and the page handlers bound to submit buttons.
Validate through the browser, not only by reading code
agent-browser workflows from browser-testing.md.Prefer lightweight smoke validation for changed flows before claiming the frontend work is complete.
Treat CloudBase as an integration branch
auth-tool-cloudbase and auth-web-cloudbase for login or provider readiness instead of re-describing those flows here.來源於7w4.net。
tsc --noEmit and a clean project build are the minimum bar — not proof of correctness.agent-browser. Code reading alone is not sufficient evidence — see the Engineering constitution above.Use this section only when the Web project needs CloudBase platform features.
npm install @cloudbase/js-sdkhttps://static.cloudbase.net/cloudbase-js-sdk/latest/cloudbase.full.jsapp or auth instance instead of re-initializing on every callEnvId before writing SDK init code, console links, or config files. Do not pass alias-like short forms directly into cloudbase.init({ env }).auth-tool-cloudbase and auth-web-cloudbaseindex.html. Otherwise refreshing or directly visiting any sub-route returns NoSuchKey / 404 error, because the static hosting looks for a file at that path instead of falling through to index.html for the SPA to handle routing.Use the MCP tool to apply this:
json
manageHosting({ action: "setWebsiteDocument", indexDocument: "index.html", errorDocument: "index.html" })
Then verify with:
json
queryHosting({ action: "websiteConfig" })
// npm install @cloudbase/js-sdk
import cloudbase from "@cloudbase/js-sdk";
const app = cloudbase.init({
env: "your-full-env-id", // Canonical full CloudBase environment ID resolved from envQuery or the console
});
const auth = app.auth
這個 Skill 質量較好,結構清晰、使用指南明確,能較好地指導前端開發工作。它在工程規範(如程式碼檢查、驗證流程)方面做得紮實,對 SPA 部署配置等常見坑點有重要提醒。但它依賴較多外部檔案連結,如果這些連結缺失會影響使用體驗;且內容偏向開發指導而非問題解決,對除錯和錯誤排查的指引相對不足。總體適合有一定經驗的開發者使用。。