init-taro-miniapp
Init Taro Mini-Program
Initialize a Taro project only with the official CLI; after init, create directories, configure the API proxy, and may add or update README and AGENTS.md. Do not modify any other generated files or config.
Constraint
- Init command (mandatory): Must use
npx @tarojs/cli init <projectName>to create the project. Do not use globaltaro initor other scaffolding. - Required after init: Run
npm install(orpnpm install/yarnif chosen during init) from the project root; do not skip. - After init (allowed only): (1) create new directories under
src, (2) add or edit the dev proxy configuration for the backend API, and (3) add or edit README and AGENTS.md. Do not changepackage.json, existing source files, or other config files.
Reference Docs
Workflow
1. Initialize with Taro CLI (required)
From the parent directory where the project should be created, run:
npx @tarojs/cli init <projectName>
Example:
npx @tarojs/cli init myApp
- Use only this command to create the project. During the interactive init, the user (or you on their behalf) may choose framework (React/Vue3), TypeScript, CSS preprocessor, bundler, package manager.
- Do not replace or re-scaffold with any other tool or template.
2. Install dependencies (required)
From the project root (the directory created by init), run:
npm install
If the user chose pnpm or yarn during init, use pnpm install or yarn instead. This step is required; do not skip it.
3. Create directories under src
Only add these directories under the project's src (create only if missing; do not change existing files):
- apis — API wrappers and request helpers
- utils — Utilities
- components — Shared and feature components
- consts — Constants, enums, config
Optionally add: hooks (React), services. Do not add files inside them unless the user explicitly asks; creating empty directories is enough.
4. Configure dev proxy for API
Only modify the project config to add the H5 dev proxy so the frontend can call the backend during local development. Default backend port: 5000.
- Config file: usually
config/index.js(orconfig/dev.jsin the generated project). - Under h5 → devServer, add or merge proxy (e.g. forward
/apito the backend):
h5: {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:5000',
changeOrigin: true,
pathRewrite: { '^/api': '/api' }
}
}
}
}
- If the backend port is not 5000, set
targettohttp://localhost:<port>. AdjustpathRewriteif the backend uses a different path prefix. - Do not change other options in the config file beyond what is needed for this proxy.
5. Add or update README and AGENTS.md
- AGENTS.md: In the project root, create or overwrite
AGENTS.mdfrom this skill's templateassets/templates/AGENTS.template.md. Fill placeholders:{{PROJECT_NAME}},{{PROJECT_DESCRIPTION}},{{TECH_STACK_TABLE}},{{DIR_STRUCTURE}}(includesrc/with apis, utils, components, consts, andconfig/,dist/),{{SCRIPTS}},{{INITIALIZED_DATE}}(YYYY-MM-DD). - README: May add or update a project README (e.g. project name, how to run, proxy/port note). Keep minimal unless the user asks for more.
6. Do not do
- Do not change
package.json, dependencies, or scripts (except running the install command in step 2). - Do not modify existing source files, app entry, or other config (e.g.
app.config.ts,babel.config.js) except the proxy block in step 4.
More from hillstone-networks/agent-skills
project-initializer
Scaffolds new projects with README.md, AGENTS.md, and CI/CD (GitLab CI, GitHub Actions). Handles project type (generic / Flask backend / React frontend / Taro miniapp), tech stack, coding standards, quality level, and SDD (OpenSpec, SpecKit, GSD). All init flows (Flask, React, Taro) and conventions (backend-python-cicd, frontend-codegen, flask-backend-codegen, QA/testing, agent-roles/subagents) are built-in; no separate skills. Docs default to Chinese. Use when creating a project, initializing a repo, or setting up CI/CD/SDD.
13init-flask-backend
按分层架构与规范搭建 Flask API 后端项目,包含应用工厂、Blueprint/Flask-RESTful 路由、Service/Model 分层、权限与统一响应。在用户要创建或生成 Flask 后端、REST API 项目使用
8frontend-codegen
Generates React frontend code following project conventions: reuse-first (utils/components), UI vs business component split, data-driven routes, test-first (red/green), function components. When adding third-party libs, presents 3 options with pros/cons for user confirmation. Use when implementing features, pages, or components in a React + Ant Design + TypeScript + Vite project.
7flask-backend-codegen
项目规范生成 Flask API 后端代码(路由、Service、Model、Schema、权限策略与测试);开发中优先使用常见中间件,配置写入 .env.example、用法在 .env 补充。在用户要新增接口、新资源模块、或按规范生成/补全后端代码时使用。
7init-react-frontend
Scaffolds a new React frontend with Vite (Rolldown), React Compiler, TypeScript, Ant Design, react-router, Zustand, Vitest, jsdom, Tailwind CSS, Axios. Uses create-vite in Rolldown form with React + Compiler + TS by default. Creates utils, consts, route, components, test directories (route separate from consts); includes unit/component tests and end-to-end (e2e) testing. Optional CI/CD: defaults to GitLab CI, frontend built as nginx Docker image. All dependencies use latest versions. Use when initializing a frontend project or setting up React + TypeScript + Vite stack.
7backend-python-cicd
根据 GitLab CI 与 Docker 多阶段构建规范,生成或校验 .gitlab-ci.yml、分支约定与部署脚本;强调先本地 Docker 构建测试、再 Git 提交触发流水线;必须使用私有镜像源参考(尤其 Python 基础镜像与 pip/uv 源)。文档中的 Docker 与 Git 命令均可直接执行。在用户要配置 GitLab CI、Docker 流水线、分支策略或部署流程时使用。
4