Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

web-development

БесплатноБез исполняемых скриптовНе проверен

Web frontend project development rules. Use this skill when developing web frontend pages, deploying static hosting, and integrating CloudBase Web SDK.

bighardpersonот bighardperson★ 71 звезда на GitHub

Об этом скилле

Activation Contract

Use this first when

  • The request is for a CloudBase Web app, static hosting site, frontend page, or Web SDK integration.

Read before writing code if

  • The task includes frontend structure, build config, deployment, routing, or Web SDK usage.

Then also read

  • Login flow -> ../auth-tool/SKILL.md, then ../auth-web/SKILL.md
  • UI work -> ../ui-design/SKILL.md first
  • NoSQL / MySQL data work -> matching database skill

Do NOT use for

  • Mini programs, native Apps, or container backend services.

Common mistakes / gotchas

  • Treating cloud functions as the default solution for Web authentication.
  • Starting UI implementation before reading ui-design.
  • Routing native App requests into Web SDK code paths.

When to use this skill

Use this skill for Web frontend project development when you need to:

  • Develop web frontend pages and interfaces
  • Deploy static websites to CloudBase static hosting
  • Integrate CloudBase Web SDK for database, cloud functions, and authentication
  • Set up modern frontend build systems (Vite, Webpack, etc.)
  • Handle routing and build configurations for static hosting

Do NOT use for:

  • Mini-program development (use miniprogram-development skill)
  • Backend service development (use cloudrun-development skill)
  • UI design only (use ui-design skill, but may combine with this skill)

How to use this skill (for a coding agent)

  1. Follow project structure conventions

    • Frontend source code in src directory
    • Build output in dist directory
    • Cloud functions in cloudfunctions directory
    • Use modern frontend build systems (Vite, etc.)
  2. Use CloudBase Web SDK correctly

    • Always use SDK built-in authentication features
    • Never implement login logic in cloud functions
    • Use envQuery tool to get environment ID
    • Mention the official CDN early when the user needs a static HTML or no-build integration
  3. Deploy and preview properly

    • Build project first (ensure npm install is executed)
    • Use relative paths for publicPath configuration
    • Use hash routing for better static hosting compatibility
    • Deploy to subdirectory if user doesn't specify root directory

Web Frontend Development Rules

Project Structure

  1. Directory Organization:

    • Frontend source code should be stored in src directory
    • Build output should be placed in dist directory
    • Cloud functions should be in cloudfunctions directory
  2. Build System:

    • Projects should use modern frontend build systems like Vite
    • Install dependencies via npm
  3. Routing:

    • If the frontend project involves routing, use hash routing by default
    • Hash routing solves the 404 refresh issue and is more suitable for static website hosting deployment

Deployment and Preview

  1. Static Hosting Deployment:

    • For frontend projects, after building, you can use CloudBase static hosting
    • First start local preview, then confirm with user if deployment to CloudBase static hosting is needed
    • When deploying, if user has no special requirements, generally do not deploy directly to root directory
    • Return deployed address in markdown link format
  2. Local Preview:

    • To preview static web pages locally, navigate to the specified output directory and use npx live-server
  3. Public Path Configuration:

    • When web projects are deployed to static hosting CDN, since paths cannot be known in advance, publicPath and similar configurations should use relative paths instead of absolute paths
    • This solves resource loading issues

CloudBase Web SDK Usage

  1. SDK Integration:
    • If user's project needs database, cloud functions, and other features, need to introduce @cloudbase/js-sdk@latest in the web application
    • Official CDN: https://static.cloudbase.net/cloudbase-js-sdk/latest/cloudbase.full.js
    • Prefer npm for React, Vue, Vite, Webpack, and other bundler-based projects
    • Prefer the CDN only for static HTML pages, quick demos, embedded snippets, or README examples where a build step is unnecessary

CDN quick start (static HTML / no-build):

<script src="https://static.cloudbase.net/cloudbase-js-sdk/latest/cloudbase.full.js"></script>
<script>
const app = cloudbase.init({
  env: "xxxx-yyy",
});
</script>

Important: Authentication must use SDK built-in features. It is strictly forbidden to implement login authentication logic using cloud functions!

import cloudbase from "@cloudbase/js-sdk";

const app = cloudbase.init({
  env: "xxxx-yyy", // Can query environment ID via envQuery tool
});
const auth = app.auth();

// Check current login state
let loginState = await auth.getLoginState();

if (loginState && loginState.user) {
  // Logged in
  const user = await auth.getCurrentUser();
  console.log("Current user:", user);
} else {
  // Not logged in - use SDK built-in authentication features
    
  // Collect user's phon
Полный SKILL.md на GitHub

Установить web-development в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл web-development?

Web frontend project development rules. Use this skill when developing web frontend pages, deploying static hosting, and integrating CloudBase Web SDK.

Как установить скилл web-development?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл web-development запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить web-development с