Deploy Preview logo

Deploy Preview

Community
zhaoxuya520
deploy-preview

快速部署 + 预览环境时使用。适用于 Vercel / Railway / Fly.io / Cloudflare / Docker Compose 快速上线。融合 Preview 环境 + 环境变量 + 数据库连接 + 域名。

Overview

Publisherzhaoxuya520
RepositoryAI-Fullstack-Delivery-Workflow
Skill namedeploy-preview
Stars
56
Forks
18
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zhaoxuya520 on GitHub. Read the source before you install it.

Installation

Install the Deploy Preview AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow/tree/master/workflows/fullstack-engineer/skills/deploy-preview
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow.git /tmp/AI-Fullstack-Delivery-Workflow
mkdir -p .claude/skills
cp -r /tmp/AI-Fullstack-Delivery-Workflow/workflows/fullstack-engineer/skills/deploy-preview .claude/skills/deploy-preview
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deploy Preview in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Deploy Preview on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Deploy Preview is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

快速部署 + 预览(Deploy & Preview)

适用场景

  • 全栈项目快速部署
  • PR 预览环境
  • MVP 上线
  • Demo 环境
  • 内部工具部署

核心原则

text
1. 第一天就部署
   空项目也要部署,验证流水线

2. Preview 环境必备
   每个 PR 自动部署预览

3. 环境变量分级
   dev / staging / prod 分开

4. 数据库连接安全
   不硬编码,用环境变量

5. 一键回滚
   出问题 5 分钟内回滚

部署平台速查

平台适合免费额度数据库
VercelNext.js / Nuxt慷慨需外部(Neon / Supabase)
Railway全栈(含 DB)$5/月内置 PG / Redis
Fly.ioDocker / 全球有限内置 PG
Cloudflare Pages静态 + Workers慷慨D1 / Turso
Render全栈有限内置 PG
SupabaseBaaS慷慨内置 PG
Docker Compose自建-自建

Vercel 部署(Next.js 推荐)

bash
# 1. 安装 CLI
npm i -g vercel

# 2. 登录
vercel login

# 3. 部署(自动检测 Next.js)
vercel

# 4. 生产部署
vercel --prod

# 5. 环境变量
vercel env add DATABASE_URL production
vercel env add JWT_SECRET production
json
// vercel.json(可选)
{
  "buildCommand": "prisma generate && next build",
  "framework": "nextjs"
}

Railway 部署(含数据库)

bash
# 1. 安装 CLI
npm i -g @railway/cli

# 2. 登录
railway login

# 3. 初始化
railway init

# 4. 添加 PostgreSQL
railway add --plugin postgresql

# 5. 部署
railway up

# 6. 环境变量自动注入 DATABASE_URL

Docker Compose(自建 / 本地)

yaml
# docker-compose.yml
version: '3.8'

services:
  app:
    build: .
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://user:pass@db:5432/mydb
      - JWT_SECRET=${JWT_SECRET}
    depends_on:
      - db
      - redis

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: mydb
    volumes:
      - pgdata:/var/lib/postgresql/data
    ports:
      - "5432:5432"

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

volumes:
  pgdata:
dockerfile
# Dockerfile
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile

FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npx prisma generate
RUN pnpm run build

FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]

数据库连接

text
Vercel + Neon(推荐):
  DATABASE_URL=postgresql://user:pass@ep-xxx.neon.tech/mydb?sslmode=require

Vercel + Supabase:
  DATABASE_URL=postgresql://postgres:pass@db.xxx.supabase.co:5432/postgres

Railway(自动注入):
  DATABASE_URL 自动设置

Docker Compose:
  DATABASE_URL=postgresql://user:pass@db:5432/mydb

环境变量清单

text
必需:
  DATABASE_URL          数据库连接
  JWT_SECRET            JWT 签名密钥
  NEXTAUTH_SECRET       NextAuth 密钥(如用)
  NEXTAUTH_URL          应用 URL

可选:
  GOOGLE_CLIENT_ID      社交登录
  GOOGLE_CLIENT_SECRET
  SMTP_HOST             邮件
  SMTP_USER
  SMTP_PASS
  S3_BUCKET             文件存储
  SENTRY_DSN            错误追踪
  REDIS_URL             缓存

部署流程

text
1. 选平台(Vercel / Railway / Docker)
   ↓
2. 配置环境变量
   ↓
3. 连接数据库
   ↓
4. 部署空项目(验证流水线)
   ↓
5. 运行 Migration
   ↓
6. 验证(健康检查 + 首页可访问)
   ↓
7. 配置域名(如需)
   ↓
8. 配置 Preview 环境(PR 自动部署)

配套模板

  • templates/deploy-checklist.md — 部署清单 + 环境变量 + 数据库 + 域名

质量自检

text
□ 第一天就部署成功
□ Preview 环境可用
□ 环境变量不硬编码
□ 数据库连接正常
□ Migration 已执行
□ 健康检查通过
□ HTTPS 启用
□ 域名配置(如需)
□ 一键回滚可用
□ 监控接入(Sentry)

常见坑

  1. 最后才部署——环境问题堆积
  2. 环境变量硬编码——泄露
  3. 数据库连接不加 SSL——中间人攻击
  4. 不跑 Migration——表不存在
  5. Preview 环境共享生产 DB——数据污染
  6. Docker 镜像太大——> 1GB
  7. 不配 HTTPS——不安全
  8. 回滚流程不清——故障时慌

与其他 skill 的协作

text
上游:
  fullstack-architecture → 部署平台选型
  e2e-feature-delivery → 部署是交付的最后一步

下游:
  devops-engineer(深度)→ CI/CD 正式化
  sre-operations → 监控告警

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Deploy Preview AI skill do?

快速部署 + 预览环境时使用。适用于 Vercel / Railway / Fly.io / Cloudflare / Docker Compose 快速上线。融合 Preview 环境 + 环境变量 + 数据库连接 + 域名。

Why use Deploy Preview on TypingMind?

Because you install it once and use it with any model. Deploy Preview is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Deploy Preview in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow/tree/master/workflows/fullstack-engineer/skills/deploy-preview. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Deploy Preview?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Deploy Preview?

As many as you like. As long as a model supports skills, you can use Deploy Preview with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Deploy Preview AI skill free?

It is published on GitHub by zhaoxuya520. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇