three-tomato

将需求文档转换为多端原生开发代码,支持 Android、iOS、鸿蒙、小程序、快应用、H5、Web、macOS、Windows 等 17 个平台。原生优先,AI 友好技术栈。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "three-tomato" with this command: npx skills add trsoliu/three-tomato/trsoliu-three-tomato-three-tomato

Three-Tomato

将需求文档转换为多端原生开发代码,支持 Android、iOS、鸿蒙、小程序、快应用、H5、Web、macOS、Windows 等 17 个平台。

核心原则:原生优先,AI 友好技术栈(数据集大、文档丰富)

Overview

This skill enables AI Agents to analyze requirement documents and generate native platform-specific code using AI-friendly tech stacks with large training datasets.

Supported Platforms

PlatformCodeLanguage/FrameworkAI-Friendly Reason
原生移动端
AndroidandroidKotlin + Jetpack ComposeKotlin 数据集大,Compose 声明式 UI
iOSiosSwift + SwiftUISwift 现代语法,SwiftUI 声明式
HarmonyOSharmonyArkTS + ArkUITypeScript 超集,AI 熟悉
小程序
WeChat Mini Programwechat-mpTypeScript + 原生 WXMLTS 类型安全,文档丰富
Alipay Mini Programalipay-mpTypeScript + 原生 AXML同上
Baidu Mini Programbaidu-mpTypeScript + 原生 Swan同上
Quick Appquick-appTypeScript类 Vue 语法
Web
H5 Mobileh5TypeScript + ReactReact 优先,数据集最大
Web DesktopwebTypeScript + React + Next.jsSSR/SSG,企业级首选
桌面原生
macOSmacosSwift + SwiftUI原生 Apple 生态
WindowswindowsC# + WinUI 3.NET 生态成熟,AI 友好
跨端移动
FlutterflutterDart + Riverpod高性能,声明式 UI
React Nativereact-nativeTypeScript + ZustandReact 生态,AI 友好
Uni-appuni-appVue 3 + TypeScript一套代码多端运行
TarotaroReact + TypeScript京东出品,React 生态
跨端桌面
ElectronelectronReact + TypeScriptWeb 技术栈,成熟稳定
TauritauriRust + React高性能,体积小

Trigger Commands

Code Generation

🤖 "transform to [platform]"
🤖 "generate [platform] code"
🤖 "convert requirement to multi-platform"
🤖 "create platform specs"
🤖 "转换为[平台]代码"
🤖 "生成多端代码"

Self-Evolution

🧬 "3T evolve" / "3T 总结归纳进化"
🧬 "3T log issue [description]" / "3T 记录问题 [描述]"
🧬 "3T show evolution log" / "3T 查看进化日志"

Workflow

Evolution Workflow (3T evolve / 3T 总结归纳进化)

When 3T evolve command is triggered, AI Agent executes:

Step 1: Collect Feedback

  1. Scan .three-tomato/feedback/issues/ for issue records
  2. Analyze compile/runtime errors in .three-tomato/output/
  3. Identify patterns from user's manual code fixes

Step 2: Categorize Issues

  1. Group by platform (Android/iOS/Mini Programs, etc.)
  2. Group by type (syntax error/API changes/best practices/architecture)
  3. Calculate issue frequency

Step 3: Update Knowledge

  1. Update references/patterns/known-issues.yaml - known issues database
  2. Update references/patterns/best-practices.yaml - best practices
  3. Update platform-specific plugins/[platform]-generator/PLUGIN.md
  4. Log changes to .three-tomato/evolution/changelog.md

Step 4: Validate Improvements

  1. Generate test cases for high-frequency issues
  2. Verify improved templates resolve the issues
  3. Output evolution report to .three-tomato/evolution/reports/

Phase 1: Requirement Analysis

  1. Read requirement document from .three-tomato/requirements/ or specified path
  2. Parse and extract:
    • Feature specifications
    • UI/UX requirements
    • Data models
    • API interfaces
    • Business logic flows

Phase 2: Platform Selection

  1. Read .three-tomato/config.yaml for target platforms
  2. Check enabled plugins in plugins/_registry.yaml
  3. Determine output platforms based on user command or config

Phase 3: Code Generation

For each target platform:

  1. Load platform-specific templates from references/templates/[platform]/
  2. Apply tech stack configurations
  3. Generate:
    • Project structure
    • UI components
    • Data models
    • API clients
    • Business logic
    • Platform-specific configurations

Phase 4: Output & Validation

  1. Write generated code to .three-tomato/output/[platform]/
  2. Generate comparison matrix
  3. Create migration guides between platforms

Configuration

Read configuration from .three-tomato/config.yaml:

# Target platforms to generate
platforms:
  - android
  - ios
  - wechat-mp
  - h5

# AI-Friendly Tech Stack (原生优先,数据集大)
tech_stack:
  android:
    language: kotlin              # AI 数据集大
    ui: compose                   # 声明式,AI 友好
    architecture: mvvm
    di: hilt
    network: retrofit + okhttp
    async: coroutines
    
  ios:
    language: swift               # 现代语法,AI 熟悉
    ui: swiftui                   # 声明式 UI
    architecture: mvvm
    network: urlsession           # 原生优先
    async: async-await
    
  harmony:
    language: arkts               # TypeScript 超集
    ui: arkui
    architecture: mvvm
    
  wechat-mp:
    language: typescript          # 类型安全,AI 友好
    framework: native             # 原生开发
    
  alipay-mp:
    language: typescript
    framework: native
    
  baidu-mp:
    language: typescript
    framework: native
    
  quick-app:
    language: typescript
    
  h5:
    language: typescript
    framework: react              # React 优先,数据集最大
    ui: antd-mobile
    bundler: vite
    
  web:
    language: typescript
    framework: react              # React 优先
    meta_framework: nextjs        # SSR/SSG 支持
    ui: antd / shadcn-ui
    state: zustand
    
  macos:
    language: swift
    ui: swiftui
    architecture: mvvm
    
  windows:
    language: csharp              # C# AI 数据集大
    ui: winui3                    # 现代 Windows UI
    architecture: mvvm

# Output settings
output:
  directory: .three-tomato/output
  include_tests: true
  include_docs: true
  language: zh-CN

Plugin System

Hook Points

Plugins can extend functionality at these hooks:

  • before_analyze - Pre-process requirement documents
  • after_analyze - Post-process extracted requirements
  • before_generate - Modify generation parameters
  • on_generate - Custom code generation logic
  • after_generate - Post-process generated code
  • on_export - Custom export formats

Plugin Commands

📋 "list platform plugins"
📦 "install plugin <source>"
✅ "enable plugin <name>"
❌ "disable plugin <name>"

Built-in Plugins

PluginDescription
原生平台
android-generatorAndroid 原生 (Kotlin + Compose)
ios-generatoriOS 原生 (Swift + SwiftUI)
harmony-generatorHarmonyOS (ArkTS + ArkUI)
wechat-mp-generator微信小程序 (TypeScript)
alipay-mp-generator支付宝小程序 (TypeScript)
baidu-mp-generator百度智能小程序 (TypeScript)
quick-app-generator快应用 (TypeScript)
h5-generatorH5 移动端 (React + TypeScript)
web-generatorWeb 桌面端 (Next.js + React)
macos-generatormacOS 原生 (Swift + SwiftUI)
windows-generatorWindows 原生 (C# + WinUI 3)
跨端框架
flutter-generatorFlutter (Dart + Riverpod)
rn-generatorReact Native (TypeScript + Zustand)
uni-app-generatorUni-app (Vue 3 + TypeScript)
taro-generatorTaro (React + TypeScript)
electron-generatorElectron (React + TypeScript)
tauri-generatorTauri (Rust + React)
工具类
api-sync跨平台 API 定义同步
ui-converterUI 组件跨平台转换
i18n-sync国际化资源同步
diff-report平台差异报告生成

Output Structure

.three-tomato/
├── config.yaml              # Main configuration
├── requirements/            # Input requirement documents
│   ├── PRD.md              # Product requirement document
│   ├── api.yaml            # API specifications
│   └── ui-specs/           # UI design specs
├── cache/                   # Incremental cache
├── output/                  # Generated code
│   ├── android/            # Kotlin + Compose
│   ├── ios/                # Swift + SwiftUI
│   ├── harmony/            # ArkTS + ArkUI
│   ├── wechat-mp/          # TypeScript 原生
│   ├── alipay-mp/          # TypeScript 原生
│   ├── baidu-mp/           # TypeScript 原生
│   ├── quick-app/          # TypeScript
│   ├── h5/                 # React + TypeScript
│   ├── web/                # Next.js + React
│   ├── macos/              # Swift + SwiftUI
│   ├── windows/            # C# + WinUI 3
│   └── _shared/            # 共享资源
│       ├── models/         # 数据模型定义
│       ├── api/            # API 接口定义
│       └── assets/         # 共享资源文件
├── reports/                 # Analysis reports
│   ├── comparison.md       # Platform comparison
│   ├── migration.md        # Migration guide
│   └── compatibility.md    # Compatibility matrix
└── i18n/                    # Multi-language docs
    ├── en/
    └── zh/

Important Instructions

For AI Agent:

  1. Always read config first: Check .three-tomato/config.yaml before generation
  2. Respect tech stack: Use configured frameworks and libraries
  3. Maintain consistency: Ensure data models and API calls are consistent across platforms
  4. Platform idioms: Follow each platform's best practices and conventions
  5. Protocol Retention:
    • If requirement/legacy uses gRPC:
      • Supported Platforms (iOS, Android, Windows, macOS, Flutter): MUST use gRPC to maintain high performance and type safety.
      • Restricted Platforms (Mini Programs, H5): Fallback to HTTP/JSON (via Envoy/Gateway).
    • If requirement uses REST/GraphQL: Use standard HTTP clients.
  6. Incremental updates: Only regenerate changed parts using cache
  7. Preserve user content: Content marked with <!-- user-content --> must not be overwritten

Code Quality Standards:

  • Follow platform-specific coding guidelines
  • Include proper error handling
  • Add necessary comments (in configured language)
  • Generate unit tests when include_tests: true
  • Create platform-specific README with setup instructions

Cross-Platform Consistency:

  • Unified data model definitions
  • Consistent API interface naming
  • Shared business logic documentation
  • Synchronized i18n resources

References

  • Templates: references/templates/
  • Prompts: references/prompts/
  • Examples: references/examples/
  • Platform Guides: docs/platforms/

Version

  • Skill Version: 1.0.1
  • Last Updated: 2026-01-30
  • Author: three-tomato

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.

General

mini-wiki

No summary provided by upstream source.

Repository SourceNeeds Review
General

react-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated