tcb-harness

Full-lifecycle CloudBase (TCB) development harness for WeChat Mini Programs, Web apps, or both. Drives structured Spec to Design to Coding (TDD) to Testing to Deploy pipeline with project isolation, quality gates, and persistent artifacts. Handles three platform types: (1) Mini Program — WeChat Mini Program with wx.cloud; (2) Web — browser-based app with CloudBase Web SDK; (3) Hybrid — Mini Program + Web frontend sharing one backend. Use when developing, testing, or deploying CloudBase projects that need requirement specification, UI/service/frontend/backend design, test case generation, test data construction, test execution/evaluation/reports, or deployment management. Triggers on: TCB开发, CloudBase项目, 小程序开发, Web开发, spec设计, TDD开发, 测试用例, 测试数据, 项目部署, harness流程.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tcb-harness" with this command: npx skills add scemoon/tcb-harness

TCB Harness

Full-lifecycle development harness for CloudBase (Tencent CloudBase) projects.

Platform Types

This harness manages three platform configurations:

类型简称前端后台认证
小程序MP微信小程序(TDesign Miniprogram)可选 CloudBase 云函数/云托管OPENID 静默
WebWebPC 浏览器应用(TDesign React)CloudBase 云函数/云托管Web SDK Auth
移动端Mobile移动端 H5(TDesign Mobile React)CloudBase 云函数/云托管Web SDK Auth
混合项目Hybrid小程序 + Web + 移动端任意组合统一后台各自平台认证

Activation Contract

Read this first when

  • Starting a new CloudBase project (MP / Web / Hybrid)
  • Needing structured spec → design → code → test → deploy workflow
  • Working on test design (case gen, data gen, evaluation, reports)
  • Managing multiple projects with isolation

Then route to

  • CloudBase MCP integration → cloudbase skill (CloudBase-specific tools, database, cloud functions, auth)
  • Claude Code → claude-code-cli-openclaw skill (TDD coding sessions)
  • Mini Program specific → references/miniprogram-guide.md (TDesign Miniprogram)
  • Web specific → references/web-guide.md (TDesign React)
  • Mobile specific → references/mobile-guide.md (TDesign Mobile React)
  • Backend specific → references/backend-guide.md
  • Knowledge Base → references/knowledge-base.md (含后台项目必读)

Do NOT use for

  • Non-CloudBase projects (use platform-specific skills instead)
  • Simple one-off code generation without lifecycle management

Project Directory Convention

projects/{project-name}/
├── .harness/
│   ├── config.json              # 项目配置(平台类型、envId、appid)
│   ├── state.json               # 当前阶段、进度、阻塞项
│   └── deploy-history.json      # 部署历史
├── specs/{spec-name}/
│   ├── requirements.md          # 需求文档
│   ├── design.md                # 技术方案
│   ├── tasks.md                 # 任务分解
│   └── reviews/                 # 评审记录
├── design/
│   ├── ui/                      # UI 设计(全平台通用)
│   │   ├── design-system.md
│   │   ├── color-palette.md
│   │   └── wireframes/
│   ├── frontend/                 # 前端设计(按平台隔离)
│   │   ├── miniprogram/         # 小程序前端设计(可选)
│   │   │   ├── architecture.md
│   │   │   ├── routing.md
│   │   │   ├── component-tree.md
│   │   │   └── subpackage.md
│   │   └── web/                 # Web 前端设计(可选)
│   │       ├── architecture.md
│   │       ├── routing.md
│   │       └── state-management.md
│   ├── backend/                  # 后台设计(可选,无后台时跳过)
│   │   ├── api-contract.md       # API 契约
│   │   ├── data-model.md         # 数据模型
│   │   ├── cloud-functions.md    # 云函数清单
│   │   └── security-rules.md     # 安全规则
│   └── shared/                   # 跨平台共享设计(可选)
│       └── common-types.md       # 共享类型定义
├── src/                          # 源码
│   ├── miniprogram/              # 小程序源码(可选)
│   │   ├── app.js / app.ts
│   │   ├── app.json
│   │   ├── pages/
│   │   ├── components/
│   │   ├── services/
│   │   └── utils/
│   └── web/                      # Web 源码(TDesign React,可选)
│       ├── index.html
│       ├── src/
│       └── dist/
├── cloud/                        # CloudBase 云函数(共享)
│   ├── {function-name}/
│   └── ...
├── tests/
│   ├── unit/
│   ├── integration/
│   ├── e2e/
│   ├── test-data/
│   └── reports/
└── docs/

平台决定规则:

  • config.jsonplatform 字段决定哪些目录生效
  • Hybrid 项目:frontend 下同时存在 miniprogram/、web/ 和 mobile/ 中的任意组合
  • 无后台项目:backend/ 目录不存在,设计阶段跳过

Core Workflow

init → spec → design → coding(TDD) → testing → deploy → iterate
  ↑                                                    │
  └───────────── feedback loop ──────────────────────────┘

Phase Routing

用户意图阶段读取 Reference执行
"新项目" / "初始化"Initscripts/init_project.py
"写需求" / "spec"Specreferences/spec-guide.mdEARS 流程
"做设计" / "UI设计"Designreferences/ui-design-guide.md确定平台后路由
"做设计" / "服务设计"Designreferences/service-design-guide.md后台设计
"做设计" / "前端设计"Designreferences/miniprogram-guide.mdreferences/web-guide.md按平台路由
"写代码" / "开发"Codingreferences/coding-guide.mdTDD 红绿重构
"写测试" / "测试"Testingreferences/testing-guide.md用例→数据→执行→报告
"部署" / "发布"Deployreferences/deploy-guide.md构建→预览→上传→配置
"项目状态"Statusscripts/project_status.py
"继续"Resume.harness/state.json → 续接

Design Phase — Platform Routing

Design 阶段根据项目类型路由到不同参考文档:

全部项目必读

  • references/ui-design-guide.md — UI 设计系统、配色、交互模式

按需读取

平台配置读取
含小程序前端references/miniprogram-guide.md
含 Web 前端references/web-guide.md
含移动端前端references/mobile-guide.md
含后台references/backend-guide.md + references/service-design-guide.md
含知识库需求references/knowledge-base.md
混合项目全部按需读取,跨平台共享设计存入 design/shared/

Hybrid 特殊规则

当项目同时包含小程序和 Web 时:

  1. 设计产物按平台分别存放(frontend/miniprogram/frontend/web/
  2. 跨平台共享的类型/API 存入 design/shared/
  3. 后台统一设计,两端共用
  4. Coding 阶段可并行开发两端,或按优先级顺序开发

Deploy Phase — Detailed Config Output

Deploy 阶段必须产出完整的部署配置,详见 references/deploy-guide.md。核心原则:

  • 小程序 — 通过 miniprogram-ci 构建/预览/上传
  • Web — 通过 CloudBase 静态托管部署
  • 后台 — 通过 CloudBase MCP 部署云函数/云托管
  • 混合项目 — 统一 deploy-config.json 描述所有组件的部署状态

部署配置模板见 assets/templates/deploy/deploy-config.json.tpl,必须填入:

  • 每个云函数的版本、超时、环境变量
  • 每个云托管服务的镜像版本、实例规格
  • 数据库集合的初始化状态
  • 安全规则的最终配置
  • 订阅消息模板 ID 映射

Phase Gate Summary

过渡必要产出校验
Init → Specconfig.json 含 platform/envId/appid文件存在 + valid JSON
Spec → Designrequirements.md + design.md + tasks.mdvalidate_spec.py 通过 + 用户确认
Design → Coding前端/后台设计文档(按平台配置)跨平台一致性检查 + 用户确认
Coding → Testing全部任务完成 + 单元测试通过npm test exit 0
Testing → Deploy测试报告,覆盖率 ≥80%,无 P0/P1 失败报告文件存在 + 指标达标
Deploy → 下一Specdeploy-history.json 更新 + 所有组件部署状态配置与实际环境一致

Integration with Other Skills

Skill何时委托方式
cloudbaseCloudBase MCP、云函数、数据库、Auth、存储读取 cloudbase skill 路由表
claude-code-cli-openclawTDD 编码会话、复杂实现启动 Claude Code session
spec-workflow (cloudbase 子 skill)EARS 方法论基础读取 references/spec-workflow/

规则: 调用 CloudBase MCP 工具前必须先读 cloudbase skill。CloudBase Activation Contract 优先于本 skill。


Resource Index

scripts/

脚本用途
init_project.py初始化项目脚手架,按平台类型生成目录
validate_spec.py需求文档质量校验
gen_test_cases.py从需求生成测试用例
gen_test_data.py生成 Mock 测试数据
project_status.py查询/展示项目状态

references/

文档适用
spec-guide.md全部项目 — Spec 阶段
ui-design-guide.md全部项目 — UI 设计
miniprogram-guide.md小程序前端设计
web-guide.mdWeb 前端设计
backend-guide.md后台设计(云函数/云托管)
service-design-guide.mdAPI 契约、数据模型
coding-guide.md全部项目 — 编码规范 + TDD
testing-guide.md全部项目 — 测试方法论
deploy-guide.md全部项目 — 部署流程 + 配置详情
tracing-guide.md含后台的项目 — 链路追踪(鹰眼兼容 Trace ID、Span 中间件、日志规范、存储分析)
knowledge-base.md含后台的项目 — 知识库管理(CRUD、搜索、权限、分析)
automation-guide.md含后台的项目 — 自动化测试(接口 Jest+SuperTest、小程序 Midscene、Web Playwright)

assets/templates/

目录内容
project/miniprogram/小程序项目模板
project/web/Web 项目模板
project/backend/云函数脚手架模板
spec/Spec 文档模板
testing/测试产出模板
deploy/部署配置模板

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Video Editor Link

Get shareable edited videos ready to post, without touching a single slider. Upload your video clips (MP4, MOV, AVI, WebM, up to 500MB), say something like "...

Registry SourceRecently Updated
Coding

Video Runcomfy

process video clips into AI-processed video with this skill. Works with MP4, MOV, AVI, WebM files up to 500MB. AI video creators use it for running ComfyUI A...

Registry SourceRecently Updated
Coding

The Hive

Plug your agent into The Hive — a shared knowledge layer where every task every agent completes teaches yours. Free for every agent. Wires a pre-task hook (i...

Registry SourceRecently Updated
Coding

Vmware Monitor

Use this skill for safe, risk-free queries of VMware infrastructure — code-level enforced safety means no destructive operations exist in the codebase. Direc...

Registry SourceRecently Updated
9991zw008