xiaohongshu
xiaohongshu
deploy-router
Deployment platform router - Vercel vs Cloudflare vs GitHub Pages. Analyzes framework, SEO needs, repo visibility. Use for "where to deploy" decisions.
Full skill instructions
I intelligently route your deployment to the optimal platform based on project analysis, including repository visibility (private vs public).
Ask me when you need help with:
GitHub Pages has a major limitation: Free GitHub accounts can ONLY deploy GitHub Pages from public repositories. Private repo deployment requires GitHub Pro, Team, or Enterprise.
┌─────────────────────────────────────────────────────────────────┐
│ STEP 0: CHECK REPOSITORY VISIBILITY │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Is the repository PRIVATE? │
└───────────────────────────────┘
│ │
YES NO (Public)
│ │
▼ ▼
┌─────────────────────────┐ ┌─────────────────────────────┐
│ ❌ GitHub Pages FREE │ │ ✅ All platforms available │
│ ✅ Cloudflare Pages │ │ GitHub Pages is an option │
│ ✅ Vercel │ │ for static public sites │
│ ✅ Netlify │ └─────────────────────────────┘
└─────────────────────────┘
# Check if git remote exists and get repo visibility
REMOTE_URL=$(git remote get-url origin 2>/dev/null)
if [[ "$REMOTE_URL" =~ github.com[:/]([^/]+)/([^/.]+) ]]; then
OWNER="${BASH_REMATCH[1]}"
REPO="${BASH_REMATCH[2]}"
# Use GitHub CLI to check visibility
VISIBILITY=$(gh repo view "$OWNER/$REPO" --json visibility -q '.visibility' 2>/dev/null)
if [[ "$VISIBILITY" == "PRIVATE" ]]; then
echo "⚠️ PRIVATE REPOSITORY DETECTED"
echo " GitHub Pages requires GitHub Pro/Team/Enterprise for private repos"
echo " → Recommended: Cloudflare Pages (free for private repos)"
echo " → Alternative: Vercel (free tier available)"
else
echo "✅ PUBLIC REPOSITORY - All deployment options available"
fi
fi
| Platform | Private Repo (Free) | Public Repo (Free) | Notes |
|---|---|---|---|
| Cloudflare Pages | ✅ Yes | ✅ Yes | Best for private repos - No visibility restrictions |
| Vercel | ✅ Yes | ✅ Yes | Free tier works for both |
| Netlify | ✅ Yes | ✅ Yes | Free tier works for both |
| GitHub Pages | ❌ No (requires Pro) | ✅ Yes | BLOCKED for free private repos |
┌─────────────────────────────────────────────────────────────────┐
│ PROJECT ANALYSIS │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Does project require Node.js runtime features? │
│ (Server Components with DB, fs, crypto, native modules) │
└─────────────────────────────────────────────────────────────────┘
│ │
YES NO
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────────────┐
│ VERCEL │ │ Static/Edge compatible? │
│ (Node.js runtime) │ │ (No Node.js dependencies) │
└─────────────────────┘ └─────────────────────────────┘
│
┌────────┴────────┐
YES NO
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ CLOUDFLARE │ │ VERCEL │
│ (Edge/Pages) │ │ (needs runtime) │
└─────────────────┘ └─────────────────┘
| Framework | Detection | Default Recommendation |
|---|---|---|
| Next.js | next.config.js/ts/mjs | Depends on features used |
| Remix | remix.config.js | Vercel (Node) or Cloudflare (adapter) |
| Astro | astro.config.mjs | Cloudflare (static-first) |
| Nuxt | nuxt.config.ts | Vercel (SSR) or Cloudflare (static) |
| SvelteKit | svelte.config.js | Either (adapter-based) |
| Static (Vite/CRA) | vite.config.ts, no SSR | Cloudflare Pages |
Signals for VERCEL (Node.js Runtime):
prisma, drizzle, direct SQL)fs module usage (file system operations)crypto or native Node.js modulesgetServerSideProps with database queriesSignals for CLOUDFLARE (Edge/Static):
When SEO matters most, choose carefully:
| SEO Need | Vercel | Cloudflare | GitHub Pages |
|---|---|---|---|
| Static meta tags | ✅ | ✅ | ✅ |
| Dynamic meta from DB | ✅ (SSR) BEST | ⚠️ (ISR/Edge only) | ❌ (static only) |
| Per-page dynamic OG | ✅ BEST | ⚠️ (limited) | ❌ |
| Real-time product data | ✅ (SSR) BEST | ⚠️ (stale cache) | ❌ |
| Sitemap generation | ✅ | ✅ | ✅ (manual) |
| robots.txt | ✅ | ✅ | ✅ |
| Structured data (JSON-LD) | ✅ (dynamic) | ✅ (static) | ✅ (static) |
| Core Web Vitals | ✅ (optimized) | ✅ (fast edge) | ✅ (fast static) |
| SSR/ISR for freshness | ✅ BEST | ⚠️ (edge-limited) | ❌ |
┌─────────────────────────────────────────────────────────────────┐
│ SEO REQUIREMENTS ROUTING │
├─────────────────────────────────────────────────────────────────┤
│ │
│ TIER 1 - Critical SEO (choose VERCEL): │
│ ├─ E-commerce product pages (prices change, inventory) │
│ ├─ News/content sites (freshness matters for Google) │
│ ├─ SaaS landing pages with dynamic pricing │
│ ├─ Marketplace listings (real-time availability) │
│ └─ Any page where DB-driven meta tags are required │
│ │
│ TIER 2 - Good SEO (CLOUDFLARE works): │
│ ├─ Blogs with static content │
│ ├─ Documentation sites │
│ ├─ Marketing pages (rarely changing) │
│ ├─ Portfolio sites │
│ └─ ISR with revalidation (1-hour stale OK) │
│ │
│ TIER 3 - Basic SEO (any platform): │
│ ├─ Internal tools (SEO doesn't matter) │
│ ├─ Admin dashboards │
│ ├─ Private apps │
│ └─ Prototypes/MVPs │
│ │
└─────────────────────────────────────────────────────────────────┘
revalidateTag() and revalidatePath()@vercel/og generates images server-sideBest For:
Pricing (2025):
Limitations:
Best For:
Pricing (2025):
Limitations:
Why Cloudflare for Private Repos:
Best For:
Pricing (2025):
Limitations:
When to Use GitHub Pages:
✅ DO use GitHub Pages when:
- Repository is PUBLIC
- Content is 100% static
- You want zero deployment config
- Open-source project docs
❌ DO NOT use GitHub Pages when:
- Repository is PRIVATE (use Cloudflare Pages instead!)
- You need SSR/dynamic content
- You need API routes
- You need environment variables
When user asks "where should I deploy?", I follow this order:
# CRITICAL: Check if repo is private BEFORE anything else
REMOTE_URL=$(git remote get-url origin 2>/dev/null)
if [[ "$REMOTE_URL" =~ github.com[:/]([^/]+)/([^/.]+) ]]; then
OWNER="${BASH_REMATCH[1]}"
REPO="${BASH_REMATCH[2]}"
# Check visibility with GitHub CLI
VISIBILITY=$(gh repo view "$OWNER/$REPO" --json visibility -q '.visibility' 2>/dev/null)
if [[ "$VISIBILITY" == "PRIVATE" ]]; then
echo "🔒 PRIVATE REPO - GitHub Pages NOT available on free tier"
echo " Recommended: Cloudflare Pages or Vercel"
GITHUB_PAGES_AVAILABLE=false
else
echo "✅ PUBLIC REPO - All platforms available"
GITHUB_PAGES_AVAILABLE=true
fi
else
echo "⚠️ No GitHub remote detected - assuming private"
GITHUB_PAGES_AVAILABLE=false
fi
# Framework detection
ls -la | grep -E "next.config|remix.config|astro.config|nuxt.config|svelte.config|vite.config"
# Package.json analysis
cat package.json | jq '.dependencies, .devDependencies'
# Check for SSR/SSG configuration
grep -r "getServerSideProps\|getStaticProps\|generateStaticParams" --include="*.tsx" --include="*.ts" | head -20
# Native module detection
grep -E "prisma|sharp|puppeteer|playwright|canvas|bcrypt|argon2" package.json
# File system usage
grep -r "require\('fs'\)\|from 'fs'\|import fs" --include="*.ts" --include="*.tsx" --include="*.js" | head -10
# Crypto usage
grep -r "require\('crypto'\)\|from 'crypto'" --include="*.ts" --include="*.tsx" | head -10
# Dynamic meta detection
grep -r "generateMetadata\|Head.*title\|meta.*content" --include="*.tsx" --include="*.ts" | head -10
# Database calls in metadata
grep -rB5 "generateMetadata" --include="*.tsx" | grep -E "prisma|db\.|fetch\("
# Check for e-commerce/content patterns that need fresh SEO
grep -rE "product|price|inventory|article|news" --include="*.tsx" | head -10
Based on analysis, I provide:
## 🚀 Deployment Recommendation
**Platform**: [VERCEL / CLOUDFLARE]
**Confidence**: [HIGH / MEDIUM / LOW]
### Analysis Results
| Factor | Finding | Impact |
|--------|---------|--------|
| Framework | Next.js 14 | Neutral |
| Node.js deps | Prisma, Sharp | → VERCEL |
| SEO needs | Dynamic meta | → VERCEL |
| Budget | Cost-sensitive | → Cloudflare |
| Scale | Global edge | → Cloudflare |
### Why [PLATFORM]
[Detailed reasoning based on findings]
### Configuration
[Platform-specific setup instructions]
### Alternative
If you need [opposite platform features], consider:
- [Migration path]
- [Hybrid approach]
┌─────────────────────────────────────────────────────────────────┐
│ MASTER DECISION TREE (Check in order!) │
├─────────────────────────────────────────────────────────────────┤
│ │
│ STEP 1: Is repo PRIVATE? │
│ ├─ YES → ❌ Eliminate GitHub Pages │
│ │ → Go to Step 2 │
│ └─ NO → GitHub Pages is an option (static only) │
│ │
│ STEP 2: Do you need dynamic SEO? │
│ ├─ YES → ✅ VERCEL (SSR, real-time meta, OG images) │
│ └─ NO → Go to Step 3 │
│ │
│ STEP 3: Do you need Node.js runtime? │
│ ├─ YES → ✅ VERCEL (Prisma, Sharp, fs, crypto) │
│ └─ NO → Go to Step 4 │
│ │
│ STEP 4: Is it a static site? │
│ ├─ YES, Private repo → ✅ CLOUDFLARE Pages │
│ ├─ YES, Public repo → ✅ CLOUDFLARE or GitHub Pages │
│ └─ NO → Go to Step 5 │
│ │
│ STEP 5: Do you need edge performance + cost savings? │
│ ├─ YES → ✅ CLOUDFLARE (Workers/Pages) │
│ └─ NO → ✅ VERCEL (default choice for Next.js) │
│ │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ PLATFORM QUICK REFERENCE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Use VERCEL when: │
│ ├─ Dynamic SEO is critical (e-commerce, news, marketplaces) │
│ ├─ Next.js with Server Components + DB │
│ ├─ Native Node.js modules (Sharp, Prisma, Puppeteer) │
│ ├─ Real-time OG image generation │
│ ├─ WebSockets/real-time features │
│ └─ Team wants easiest DX │
│ │
│ Use CLOUDFLARE when: │
│ ├─ 🔒 PRIVATE REPO (GitHub Pages blocked on free tier!) │
│ ├─ Static site (Astro, Hugo, plain HTML) │
│ ├─ Edge-first, low latency priority │
│ ├─ Cost-sensitive (Cloudflare is cheaper) │
│ ├─ Simple API routes without Node.js deps │
│ ├─ Already using Cloudflare ecosystem (R2, D1, KV) │
│ └─ Global CDN distribution priority │
│ │
│ Use GITHUB PAGES when: │
│ ├─ Repository is PUBLIC (required for free tier!) │
│ ├─ 100% static content (no SSR, no API) │
│ ├─ Open-source project documentation │
│ └─ Zero deployment configuration needed │
│ │
│ HYBRID approach: │
│ ├─ Frontend on Cloudflare Pages (edge speed) │
│ ├─ API/backend on Vercel Functions (Node.js power) │
│ └─ Best of both: edge speed + Node.js + full SEO │
│ │
└─────────────────────────────────────────────────────────────────┘
After recommendation, I trigger the appropriate deployment:
// For Vercel deployment
Task({
subagent_type: "sw-infra:devops:devops",
prompt: `Deploy to Vercel:
- Project: ${projectName}
- Framework: ${framework}
- Environment: ${env}
Use existing VERCEL_TOKEN from .env`,
description: "Deploy to Vercel"
});
// For Cloudflare deployment
Task({
subagent_type: "sw-infra:devops:devops",
prompt: `Deploy to Cloudflare:
- Project: ${projectName}
- Type: ${isStatic ? 'Pages' : 'Workers'}
Use wrangler CLI (already authenticated)`,
description: "Deploy to Cloudflare"
});
This skill activates for:
User: "Where should I deploy my Next.js app with Prisma?"
Analysis:
- Framework: Next.js 14
- Database: Prisma (requires Node.js runtime)
- Impact: MUST use Node.js-compatible host
Recommendation: VERCEL
- Prisma requires Node.js runtime (binary execution)
- Cloudflare Workers don't support Prisma's native binary
- Vercel provides Node.js serverless functions
Alternative: Use Prisma Edge with Cloudflare D1 (requires migration)
User: "Best deployment for my Astro blog?"
Analysis:
- Framework: Astro (static-first)
- Database: None
- SEO: Static meta tags only
Recommendation: CLOUDFLARE PAGES
- 100% static site, no server runtime needed
- Free tier covers most blogs
- Global edge CDN included
- Faster than Vercel for static content
User: "I'm building an e-commerce site with product pages that need dynamic meta tags from the database"
Analysis:
- Framework: Next.js
- SEO: Dynamic meta from database (products, prices)
- Database: PostgreSQL with product catalog
Recommendation: VERCEL
- Dynamic `generateMetadata()` with DB calls
- Server-side rendering for SEO
- Product pages need fresh data for Google
- Cloudflare would require ISR which may show stale prices
User: "Where should I deploy my private Astro documentation site?"
Analysis:
- Framework: Astro (static-first)
- Repository: PRIVATE ⚠️
- SEO: Static meta tags only
- Content: Internal documentation
Step 0 - Visibility Check:
🔒 PRIVATE REPO DETECTED
❌ GitHub Pages: NOT AVAILABLE (requires GitHub Pro/Team)
✅ Cloudflare Pages: Available (free tier)
✅ Vercel: Available (free tier)
Recommendation: CLOUDFLARE PAGES
- Private repo works with free tier
- Static site = perfect fit for edge deployment
- Fast global CDN
- 500 builds/month free
- No Node.js needed
Alternative: Vercel (also works, but Cloudflare is cheaper for static)
⚠️ DO NOT recommend GitHub Pages for private repos!
User: "I need the best SEO possible for my product catalog with 10,000+ products"
Analysis:
- Framework: Next.js 14 with App Router
- Products: 10,000+ items with prices, inventory, reviews
- SEO Requirements: CRITICAL
- Dynamic meta tags per product
- Real-time pricing in structured data
- Fresh inventory status for Google
- Dynamic OG images showing product photos
SEO Analysis Results:
| Requirement | Vercel | Cloudflare | GitHub Pages |
|-------------|--------|------------|--------------|
| Dynamic meta from DB | ✅ SSR | ⚠️ ISR (stale) | ❌ |
| Real-time prices | ✅ | ⚠️ (1hr delay) | ❌ |
| Dynamic OG images | ✅ @vercel/og | ⚠️ Limited | ❌ |
| Inventory freshness | ✅ SSR | ⚠️ Cache | ❌ |
Recommendation: VERCEL (STRONG)
- SSR ensures Google sees fresh data every crawl
- `generateMetadata()` with database calls
- `@vercel/og` for product OG images
- ISR with on-demand revalidation for cache-then-fresh
- Image optimization built-in
Why NOT Cloudflare:
- ISR cache means Google might see stale prices
- No native OG image generation
- Edge runtime can't run Prisma directly
Cost consideration:
- Vercel Pro ($20/month) vs Cloudflare (free)
- For critical SEO sites, Vercel Pro is worth it
@cloudflare/next-on-pages adapterwrangler.toml to vercel.json| Platform | Free Tier Limit | When to Upgrade | Enterprise Cost |
|---|---|---|---|
| Vercel | 100GB bandwidth, 100 serverless hours | > 50K requests/day | $20/user/month (Pro), Custom (Enterprise) |
| Cloudflare | 100K requests/day, 500 builds/month | > 100K requests/day | $5/month (Workers), Custom (Enterprise) |
| GitHub Pages | 100GB bandwidth, 10 min builds | N/A (static only) | Pro: $4/month, Team: $4/user |
| Feature | Vercel Enterprise | Cloudflare Enterprise | Notes |
|---|---|---|---|
| SLA | 99.99% | 100% (edge) | Cloudflare edge is bulletproof |
| DDoS Protection | ✅ Included | ✅ Industry-leading | Cloudflare is the gold standard |
| SSO/SAML | ✅ Enterprise | ✅ Enterprise | Both require enterprise tier |
| Audit Logs | ✅ Enterprise | ✅ Enterprise | Compliance requirements |
| Custom Domains | Unlimited | Unlimited | Both generous |
| Private Network | ✅ Secure Compute | ✅ Cloudflare Tunnel | Zero-trust networking |
| Compliance | SOC2, HIPAA | SOC2, HIPAA, PCI-DSS | Cloudflare has broader certs |
┌─────────────────────────────────────────────────────────────────┐
│ ENTERPRISE TIER TRIGGERS │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Vercel Enterprise ($$$): │
│ ├─ > 1M requests/month │
│ ├─ > 100 team members │
│ ├─ SOC2/HIPAA compliance required │
│ ├─ SLA guarantees needed for contracts │
│ ├─ Advanced observability (OpenTelemetry) │
│ └─ Dedicated support │
│ │
│ Cloudflare Enterprise ($$$): │
│ ├─ > 10M requests/day │
│ ├─ Custom WAF rules │
│ ├─ Advanced bot management │
│ ├─ PCI-DSS compliance │
│ ├─ 24/7 phone support │
│ └─ Custom SSL certificates │
│ │
│ Stay on Free/Pro when: │
│ ├─ < 50K requests/day │
│ ├─ < 20 team members │
│ ├─ No compliance requirements │
│ ├─ Community support is acceptable │
│ └─ Standard SLA is fine │
│ │
└─────────────────────────────────────────────────────────────────┘
Remix is uniquely positioned to work well on BOTH platforms:
| Remix Adapter | Platform | Best For |
|---|---|---|
@remix-run/cloudflare | Cloudflare Workers | Edge-first, cost-sensitive |
@remix-run/cloudflare-pages | Cloudflare Pages | Static + edge functions |
@remix-run/vercel | Vercel | Node.js features, dynamic SEO |
@remix-run/node | Vercel/Railway | Full Node.js, DB access |
Remix + Cloudflare Decision:
If your Remix app:
├─ Uses only edge-compatible packages → Cloudflare ✅
├─ Needs KV/D1/R2 storage → Cloudflare ✅ (native support)
├─ Is cost-sensitive → Cloudflare ✅ (cheaper)
├─ Needs Prisma/native modules → Vercel (Node.js required)
├─ Has critical dynamic SEO → Vercel (SSR power)
└─ Needs WebSockets → Vercel (Durable Objects are complex)
Remix Setup for Cloudflare:
npx create-remix@latest --template cloudflare-pages
Remix Setup for Vercel:
npx create-remix@latest --template vercel
Not all deployments are frontends. For backend services:
| Use Case | Recommended Platform | Alternative |
|---|---|---|
| Cron < 1/hour | Vercel Cron, GitHub Actions | - |
| Cron >= 1/hour | Railway, Render, Fly.io | Cloudflare Workers (paid) |
| Long-running jobs | Railway, Render | Modal, Inngest |
| Event processing | Cloudflare Queues | AWS SQS, Inngest |
| Background tasks | Inngest, Trigger.dev | Railway |
| Platform | Pricing | Best For | Limitations |
|---|---|---|---|
| Railway | $5/month + usage | Full-stack, databases, cron | Can get expensive at scale |
| Render | Free tier + $7/month | Background workers, cron | Cold starts on free |
| Fly.io | Free tier + usage | Global edge, persistent | Learning curve |
| Inngest | Free tier + usage | Event-driven workflows | Requires adapter |
| Cloudflare Workers | $5/month | Edge compute, queues | No Node.js |
For complex apps, consider hybrid:
┌─────────────────────────────────────────────────────────────────┐
│ HYBRID ARCHITECTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Frontend (Cloudflare Pages) │
│ ├─ Static assets (CSS, JS, images) │
│ ├─ Edge-rendered pages (fast TTFB) │
│ └─ Cloudflare KV for session cache │
│ │
│ ▼ API calls │
│ │
│ API (Vercel Functions) │
│ ├─ Node.js runtime for DB access │
│ ├─ Prisma/Drizzle with PostgreSQL │
│ └─ Server-side auth (Prisma sessions) │
│ │
│ ▼ Background jobs │
│ │
│ Workers (Railway/Render) │
│ ├─ Cron jobs (hourly+) │
│ ├─ Email sending │
│ └─ Heavy processing │
│ │
│ Result: Edge speed + Node.js power + Background processing │
│ │
└─────────────────────────────────────────────────────────────────┘
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience