Tencent CloudBase Web Development Kit
Paste the following prompt into your AI chat to install this skill:
Please install @tencent-adm/web-development according to the guide at https://skillhub.cn/install/skillhub.md.
About this skill
Specific Problem
Web frontend developers frequently encounter several engineering hurdles: How to establish a robust initial structure for React, Vue, or Vite projects? How to configure single-page application routing to prevent users from seeing 404 errors upon refresh? How to ensure build outputs run correctly in the browser and integrate seamlessly with platforms like Tencent CloudBase? These tasks span framework selection, build toolchains, routing strategies, runtime validation, and cloud service SDK integration, where a misstep can lead to deployment failures or a poor user experience.
How the Skill Works
This skill provides a guide focused on engineering execution. Its core capabilities and key steps include:
- Clarify the Execution Scope: First, categorize the task as framework setup, page implementation, debugging, deployment, validation, or CloudBase integration. This keeps work focused on the web application layer and prevents unnecessary scope creep into unrelated backend changes.
- Adhere to Framework and Build Conventions: Supports mainstream frameworks like React and Vue, with Vite as the default bundler. In existing repos, it prioritizes following established package managers, scripts, and directory structures, implementing only the smallest viable changes.
- Handle Routing and Deployment Details: Emphasizes a critical configuration: when using History-mode routing (e.g., React Router or Vue Router), the CloudBase static hosting's "404 error document" must be set to
index.html. This is the key to avoidingNoSuchKeyerrors. It also recommends defaulting to Hash routing for new projects lacking server-side rewrites. - Integrate CloudBase Capabilities: Introduces CloudBase only when cloud platform features are actually required. It guides installing
@cloudbase/js-sdkvianpmand respects authentication boundaries—login logic must use SDK built-in features, not cloud functions. It requires resolving environment IDs to canonical full forms before use in SDK initialization code. - Enforce Engineering Verification: This is the skill's core discipline. Any change must pass two layers of validation:
- Static/Build Layer: Running
tsc --noEmit(orvue-tsc --noEmit), the project Linter, and the build command to ensure zero new errors. - Runtime/Browser Layer: Using the
agent-browsertool to actually open pages, reproduce user flows, and check target route loading, interaction behavior, and console errors.
Only after both layers pass may the task be declared complete. This prevents the hasty practice of considering code "done" once it compiles.
- Static/Build Layer: Running
Applicable Boundaries and Notes
The skill has clear scopes of application and non-negotiable principles:
- Out-of-Scope Scenarios: It is not for UI visual direction or prototyping (use the
ui-designskill), mini-program development, native apps, or backend-only services. When a task involves interface styling, theui-designskill must be loaded first to output a Design Specification. - Common Pitfalls: Deploying a History-mode SPA to CloudBase static hosting without configuring the error document; skipping browser validation after a UI change; moving web login logic into cloud functions; or using
try...catchor ignoring tests to pass compilation. - Non-Negotiable Engineering Constitution:
- No
anyType: Must useunknownwith type guards to handle unknown data, rather than bypassing the type system. - Self-Verification Before Claiming Done: Must provide evidence of actual verification, including build logs and browser check results, before declaring completion.
- Do Not Paper Over Failures: Must not silently catch errors, delete failing tests, or consider compilation as the sole completion standard.
- No
Use Cases
- Migrating a React single-page application from a local development environment to Tencent CloudBase static hosting, which requires configuring the build process and setting the 404 error document for History mode routing.
- Integrating the CloudBase Web SDK into an existing Vue project to implement WeChat login functionality, handling authentication state management and route protection.
- Debugging an issue where form submission leads to incorrect routing jumps in a Vite project, using the agent-browser tool to reproduce and inspect the interaction flow in a real browser.
- After a frontend page style refactoring, must run TypeScript type checks, ESLint, and project build, then use browser tools to verify the rendering and functionality of all changed routes.
Best For
- Frontend Engineer: Tasked with refactoring the company website from jQuery to a React stack and deploying it to CloudBase static hosting, requiring proper handling of routing and deployment configurations.
- Full-Stack Developer: Quickly building a web prototype for a startup project, needing to initialize a Vite + Vue project and securely integrate CloudBase's user authentication and database services.
- Project Lead: Managing a Vue-based online application, requiring the team to follow standards for build checks and browser-side validation after every feature change to ensure online quality.
- DevOps Engineer: Maintaining the continuous deployment pipeline for frontend applications, needing to ensure the CloudBase static hosting's 404 error document is correctly configured to prevent users from seeing 404 errors when accessing sub-routes.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.
This skill provides end-to-end automation for WeChat Mini Program development, covering building, debugging, previewing, testing, and publishing, with integrated code quality analysis and dependency management.