Set up Vercel preview subdomain with auto-sync branch and SEO protection. Creates {repo-name}-preview.jbcloud.app pattern.
Configures Vercel preview deployments with automatic branch syncing and search engine protection.
/plugin marketplace add https://www.claudepluginhub.com/api/plugins/aventerica89-claude-codex/marketplace.json/plugin install aventerica89-claude-codex@cpd-aventerica89-claude-codexThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Command: /setup-preview
Purpose: Configure a stable preview subdomain on Vercel with automatic branch sync and search engine blocking.
{repo-name}-preview.jbcloud.app
Examples:
claude-codex repo → claudecodex-preview.jbcloud.appjb-cloud-docs repo → jbclouddocs-preview.jbcloud.appHDFlowsheet-Cloud repo → hdflowsheetcloud-preview.jbcloud.app| Framework | Detection | Config File |
|---|---|---|
| Next.js | next.config.* | next.config.js |
| Astro | astro.config.* | astro.config.mjs |
| Remix | remix.config.* | remix.config.js |
| SvelteKit | svelte.config.* | svelte.config.js |
| Static | None of above | vercel.json only |
{
"headers": [
{
"source": "/(.*)",
"has": [
{
"type": "host",
"value": "{repo-name}-preview.jbcloud.app"
}
],
"headers": [
{
"key": "X-Robots-Tag",
"value": "noindex, nofollow"
}
]
}
]
}
Next.js (app/robots.ts):
import type { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
const isProduction = process.env.VERCEL_GIT_COMMIT_REF === 'main'
return isProduction
? { rules: { userAgent: '*', allow: '/' } }
: { rules: { userAgent: '*', disallow: '/' } }
}
Astro (src/pages/robots.txt.ts):
import type { APIRoute } from 'astro';
export const GET: APIRoute = () => {
const isProduction = process.env.VERCEL_GIT_COMMIT_REF === 'main';
const robotsTxt = isProduction
? `User-agent: *\nAllow: /`
: `User-agent: *\nDisallow: /`;
return new Response(robotsTxt, {
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
});
};
.github/workflows/preview.yml)name: Sync Preview Branch
on:
push:
branches-ignore:
- preview
permissions:
contents: write
jobs:
sync-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync to preview branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin preview || git checkout -b preview
git checkout preview
git reset --hard ${{ github.sha }}
git push -f origin preview
After running this skill, complete these in Vercel:
Add Domain
{repo-name}-preview.jbcloud.appAssign to Branch
previewEnable System Environment Variables
DNS (if not already configured)
*.jbcloud.app → cname.vercel-dns.com# In any project directory
/setup-preview
# With custom subdomain (overrides default pattern)
/setup-preview --subdomain myapp-staging
Any branch push
│
▼
GitHub Actions workflow
│
▼
Force-push to `preview` branch
│
▼
Vercel auto-deploys `preview` branch
│
▼
{repo-name}-preview.jbcloud.app updated
After setup, verify:
{repo-name}-preview.jbcloud.appX-Robots-Tag: noindex, nofollow/robots.txt returns Disallow: /Based on: https://jonrh.is/preview-subdomain-nextj-vercel
Successfully tested on claude-codex (Astro project):
| Component | Value |
|---|---|
| Production | codex.jbcloud.app |
| Preview | claudecodex-preview.jbcloud.app |
| Framework | Astro |
| Workflow | .github/workflows/preview.yml |
Push any commit to trigger the workflow, which creates the branch:
git commit --allow-empty -m "trigger preview branch" && git push
Ensure workflow has write permission:
permissions:
contents: write
gh run list --workflow="Sync Preview Branch"preview branchReady to set up preview subdomain. Provide project path or run in project directory.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.