Agent skill

CodFlow Storefront Vercel Deploy

by bighadj22 in bighadj22/codflow

Runbook for deploying or redeploying the CodFlow Astro storefront to Vercel, with required environment variables, CLI or Git methods and checks afterwards.

Apache-2.0Auto-check passedDevOps & Cloud

Install CodFlow Storefront Vercel Deploy

skills CLI
$ npx skills add bighadj22/codflow --skill storefront-vercel -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bighadj22/codflow storefront-vercel --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bighadj22/codflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/storefront-vercel .claude/skills/storefront-vercel && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
storefront-vercel
GitHub stars
350
Token cost
~2.2k tokens
SKILL.md length
881 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Runbook for deploying or redeploying the CodFlow Astro storefront to Vercel, with required environment variables, CLI or Git methods and checks afterwards.

  • Works in 4 steps: Prerequisites → Configure and Link Project → Set Environment Variables → …
  • Deploying the CodFlow storefront to Vercel for the first time
  • SKILL.md covers Required Environment Variables, Deployment Methods, Verification & Smoke Testing and Custom Domain Setup, plus 1 more section
  • Calls npx, curl and npm; needs STORE_API_KEY and VERCEL_TOKEN

What it does

This skill covers deploying the CodFlow storefront theme (cod-astro/theme01) to Vercel instead of Cloudflare Workers. It explains why Vercel can be preferable: it avoids Cloudflare's error 1042, where a Worker on a free workers.dev subdomain cannot fetch another one, and it offers edge caching and per-branch preview deployments. The storefront picks its adapter from DEPLOY_TARGET, which must be set to vercel.

Required variables are DEPLOY_TARGET, COD_SERVER_URL and STORE_API_KEY, with MEDIA_DOMAIN optional for an R2 image CDN, and STORE_API_KEY is a secret that must stay on the server side. Two methods are given: the Vercel CLI through npx, recommended for agents, which checks login with vercel whoami and falls back to a VERCEL_TOKEN in headless or CI settings, and the Vercel dashboard with Git for continuous deployment. After deploying, the agent verifies that the storefront works.

When your agent uses it

  • Deploying the CodFlow storefront to Vercel for the first time
  • Switching the storefront from Cloudflare Workers to Vercel
  • Troubleshooting a failing Vercel storefront deployment

Example prompts

  • “Deploy the CodFlow storefront to Vercel with the CLI.”
  • “Switch my CodFlow storefront from Cloudflare Workers to Vercel and set the environment variables.”
  • “The storefront on Vercel cannot reach cod-server, so help me troubleshoot.”

Requirements

  • A Vercel account, with the Vercel CLI through npx or a VERCEL_TOKEN
  • A deployed CodFlow cod-server and its URL
  • The store API key from the CodFlow setup

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Prerequisites
  2. Configure and Link Project
  3. Set Environment Variables
  4. Build and Deploy to Production

What it can do on your machine

Read from SKILL.md and the folder at commit ed79aa9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • curl
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, curl and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • STORE_API_KEY
    • VERCEL_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CodFlow Storefront Vercel Deploy loads about 2.2k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 881 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~125
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bighadj22/codflow at commit ed79aa9, republished under its Apache-2.0 licence (© bighadj22). 881 words, ~2,240 tokens.

Download SKILL.mdSave it as .claude/skills/storefront-vercel/SKILL.md (or your agent's skills folder).
name
storefront-vercel
description
Deploy or redeploy the CodFlow storefront (cod-astro/theme01) to Vercel — an AI agent following it configures the Vercel project with DEPLOY_TARGET=vercel, binds environment variables (COD_SERVER_URL, STORE_API_KEY, MEDIA_DOMAIN), builds and deploys using the Vercel CLI or Git integration, and verifies storefront functionality. Use when a developer wants to deploy the storefront to Vercel, switch from Cloudflare Workers to Vercel, or troubleshoot Vercel storefront deployments.

CodFlow Storefront — Vercel Deployment Runbook

cod-astro/theme01 is the customer-facing storefront theme for CodFlow (Astro 7). While the CodFlow backend (cod-server) and merchant dashboard (cod-client-astro) run on Cloudflare Workers (using D1, R2, and KV), the storefront supports dynamic deployment targets (DEPLOY_TARGET=vercel or DEPLOY_TARGET=cloudflare).

Deploying the storefront to Vercel is often preferred because:

  1. Solves Cloudflare Error 1042 (Worker-to-Worker block): When cod-server is deployed on a free *.workers.dev subdomain without a custom domain, Cloudflare blocks another Cloudflare Worker on *.workers.dev from fetching it. Vercel runs outside Cloudflare's internal network, allowing the storefront to fetch cod-server on *.workers.dev without needing a custom domain.
  2. Generous Global Edge Bandwidth: Vercel includes generous bandwidth and Edge CDN caching for storefront traffic.
  3. Automatic Preview Deployments: Every Git branch/PR can have its own preview URL for testing theme changes.

Required Environment Variables

Before deploying, collect these values:

VariableDescriptionExample
DEPLOY_TARGETMandatory. Tells astro.config.mjs to use @astrojs/vercelvercel
COD_SERVER_URLMandatory. Base URL of deployed cod-server APIhttps://api.yourdomain.com or https://codflow-server.<account>.workers.dev
STORE_API_KEYMandatory. Raw store API key matching the seeded key in D1Generated in codflow-setup Step 4
MEDIA_DOMAINOptional. Custom domain for R2 image CDNmedia.yourdomain.com

[!IMPORTANT] STORE_API_KEY is secret. It is used on the server side in SSR routes and API proxies. Never expose it in client-side bundles.


Deployment Methods

Choose Method 1 (Vercel CLI) for automated/terminal deployments, or Method 2 (Vercel Dashboard / Git) for continuous deployment from GitHub.


1. Prerequisites
  • Ensure Vercel CLI is accessible via npx vercel (or installed globally).
  • Check authentication:
    bash
    npx vercel whoami
    If not logged in:
    • If a browser is available: npx vercel login
    • If headless/CI: Set VERCEL_TOKEN in the environment (export VERCEL_TOKEN="<token>").

Navigate to the storefront directory:

bash
cd cod-astro/theme01

Run initial setup:

bash
npx vercel link

Follow the interactive prompts (or provide flags in non-interactive sessions):

  • Link to existing project? No (or Yes if linking existing)
  • Project name: <project>-storefront (e.g. mystore-storefront)
  • In which directory is your code located? ./
3. Set Environment Variables

Add the required production environment variables using the CLI:

bash
# 1. Deployment Target
printf "vercel" | npx vercel env add DEPLOY_TARGET production

# 2. Backend API URL (must start with https://)
printf "https://<your-cod-server-domain>" | npx vercel env add COD_SERVER_URL production

# 3. Store API Key
printf "<your-raw-store-api-key>" | npx vercel env add STORE_API_KEY production

# 4. Optional: Media Domain (if R2 custom domain is configured)
printf "<media.yourdomain.com>" | npx vercel env add MEDIA_DOMAIN production

(Optional: also add them to preview and development environments if you plan to use preview branches).

4. Build and Deploy to Production

Execute production deployment with the Vercel adapter:

bash
cd cod-astro/theme01
npx vercel --prod

Vercel will upload the project, execute npm run build:vercel (or astro build with DEPLOY_TARGET=vercel), compile the SSR serverless/edge functions, and provide the live production URL (e.g. https://<project>-storefront.vercel.app).


Method 2: Deploy via Vercel Dashboard (Git Integration)

Use this method when connecting a GitHub / GitLab / Bitbucket repository:

  1. Import Repository in Vercel:

    • In the Vercel Dashboard, click Add New... → Project.
    • Select the codflow-os repository.
  2. Configure Project Settings:

    • Project Name: e.g. codflow-storefront
    • Framework Preset: Astro
    • Root Directory: Click Edit and choose cod-astro/theme01. Check the option "Include source files outside of the Root Directory in the Build Step" (needed because workspace dependencies resolve to root node_modules).
    • Build Command: Toggle Override and set:
      bash
      npm run build:vercel
      (Or leave default astro build if DEPLOY_TARGET=vercel is set in Environment Variables).
    • Output Directory: Leave default (.vercel/output).
    • Install Command: Leave default (npm install / root workspace install).
  3. Configure Environment Variables: Under Environment Variables, add:

    • DEPLOY_TARGET = vercel
    • COD_SERVER_URL = https://<your-cod-server-domain>
    • STORE_API_KEY = <your-raw-store-api-key>
    • MEDIA_DOMAIN = <media.yourdomain.com> (optional)
  4. Deploy:

    • Click Deploy. Vercel will build the workspace, bundle the Astro site with @astrojs/vercel, and assign a production URL.

Show full SKILL.md (339 more words)Show less

Verification & Smoke Testing

Once deployment completes, run these checks against the live Vercel URL:

TargetTest Command / ActionExpected Result
Homepagecurl -s -o /dev/null -w "%{http_code}" https://<storefront-url>200 (HTML response)
Catalog SSROpen https://<storefront-url>/ in browserProducts load with images, prices, and title
Product DetailOpen https://<storefront-url>/product/<slug>Product page renders with checkout / order form
Cart / Order FlowSubmit test order (or test modal)Order registers and thank-you page displays
Test via Terminal:
bash
# Verify homepage returns 200 OK
curl -s -I "https://<your-storefront>.vercel.app" | head -n 5

# Verify API connectivity through storefront proxy
curl -s "https://<your-storefront>.vercel.app/api/cart/validate" \
  -H "Content-Type: application/json" \
  -d '{"items":[]}'
# Expect valid JSON response

Custom Domain Setup

To attach a custom domain to the Vercel storefront:

  1. In Vercel Dashboard: Project → Settings → Domains.
  2. Enter your domain (e.g. store.yourdomain.com or yourdomain.com).
  3. Configure DNS records:
    • For subdomains (store.yourdomain.com): Add CNAME pointing to cname.vercel-dns.com.
    • For apex domain (yourdomain.com): Add A record pointing to 76.76.21.21.
  4. Wait for SSL certificate issuance (automatic via Let's Encrypt).

Troubleshooting

ProblemCauseSolution
Build fails: Cannot find module '@astrojs/vercel'Missing dependency in cod-astro/theme01Run npm install @astrojs/vercel --workspace=cod-astro-theme01 at repository root.
Build produces Cloudflare output instead of Vercel outputDEPLOY_TARGET not set to vercelEnsure DEPLOY_TARGET=vercel is present in Vercel environment variables, or run npm run build:vercel.
Storefront loads but shows empty products / error bannerCOD_SERVER_URL incorrect or unreachableConfirm COD_SERVER_URL has https:// prefix and matches the live API worker. Verify curl https://<api-url>/api/docs returns 200.
Orders fail with 401 UnauthorizedSTORE_API_KEY mismatchThe value in Vercel STORE_API_KEY must match the key seeded into the D1 database in codflow-setup Step 5. Re-check or update the secret in Vercel.
Monorepo build fails to resolve shared packagesVercel root directory configurationIf using Git integration, ensure "Include source files outside of the Root Directory" is enabled in Vercel project settings, or deploy via npx vercel inside cod-astro/theme01.
Node.js version warning: Node.js 26 is not supportedVercel serverless functions support up to Node 24Normal warning on Node 26 development machines; Vercel automatically runs Node 24 in its cloud functions.
Images do not load from R2MEDIA_DOMAIN misconfigured or missing CORSVerify MEDIA_DOMAIN is set (hostname only, without https://). Ensure R2 bucket CORS policy allows requests from the Vercel domain.

© bighadj22, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/storefront-vercel of bighadj22/codflow.

Open the folder on GitHubat commit ed79aa9

Compare with similar skills

CodFlow Storefront Vercel Deploy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CodFlow Storefront Vercel Deploy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CodFlow Storefront Vercel Deploy this skillbighadj22/codflow350—~2.2kAutomated safety check: PassApache-2.0
Vercel CLI With Tokensvercel-labs/agent-skills32k7 repos~2.6kAutomated safety check: NotesNone
Env Managerbobmatnyc/claude-mpm155—~2kAutomated safety check: NotesMIT
Frontmcp Deploymentagentfront/frontmcp146—~9.2kAutomated safety check: NotesApache-2.0
Add Vercel to NanoClawnanocoai/nanoclaw31k—~1.5kAutomated safety check: WarnMIT
Frontmcp Production Readinessagentfront/frontmcp146—~6.5kAutomated safety check: PassApache-2.0

Similar skills

  • Vercel CLI With Tokens

    vercel-labs/agent-skills

    Official

    Deploys and manages Vercel projects through the CLI using an access token from the environment or a .env file instead of interactive login.

    32k GitHub starsUsed in 7 repos~2.6k tokens
    DevOps & CloudAuto-check: notes
  • Env Manager

    bobmatnyc/claude-mpm

    Environment variable validation, synchronization, and management across local development, CI/CD, and deployment platforms

    155 GitHub stars~2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Frontmcp Deployment

    agentfront/frontmcp

    A skill your agent uses when deploying, building for production, packaging, or shipping a FrontMCP server.

    146 GitHub stars~9.2k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes
  • Add Vercel to NanoClaw

    nanocoai/nanoclaw

    Gives NanoClaw agents the ability to deploy web apps to Vercel by installing the Vercel CLI in agent containers and wiring up credential injection through OneCLI.

    31k GitHub stars~1.5k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: warnings
  • Pre-production audit, hardening, and go-live checklists for FrontMCP servers.

    146 GitHub stars~6.5k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Deploying Applications

    ancoleman/ai-design-components

    Deployment patterns from Kubernetes to serverless and edge functions.

    526 GitHub stars~3.1k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed

More from bighadj22/codflow

All 11 skills in this repo
  • Wires an app to the Yalidine (Guepex) Algerian courier API: parcels, zone lookups, delivery fees and verified delivery-status webhooks.

    350 GitHub stars~2.5k tokensUpdated 4 days ago
    Auto-check passed
  • Bundles Meta's official Pixel and Conversions API documentation so tracking changes, event deduplication and conversion events are checked against the real spec.

    350 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check passed
  • CodFlow Change Workflow

    bighadj22/codflow

    A step-by-step workflow for changing the CodFlow repository: read the AGENTS.md contract, respect package boundaries, verify before claiming done and keep PRs small.

    350 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • Guides an agent through eight customer tools in a cash-on-delivery CRM for Algerian e-commerce: search, profiles, phone lookup, order history, groups, tags and deletion.

    350 GitHub stars~3.2k tokensUpdated 4 days ago
    Auto-check passed
  • Guides connecting and maintaining the EcoTrack courier adapter in CodFlow, one API shared by 82 Algerian couriers, using the official API reference and a rollout plan.

    350 GitHub stars~2.3k tokensUpdated 4 days ago
    Auto-check passed
  • defineRoute Route Builder

    bighadj22/codflow

    Creates new API endpoints, and converts older ones, with the defineRoute() pattern used in cod-server, including auth strategies, scopes and OpenAPI output.

    350 GitHub stars~924 tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about CodFlow Storefront Vercel Deploy

What does CodFlow Storefront Vercel Deploy do?

Runbook for deploying or redeploying the CodFlow Astro storefront to Vercel, with required environment variables, CLI or Git methods and checks afterwards. This skill covers deploying the CodFlow storefront theme (cod-astro/theme01) to Vercel instead of Cloudflare Workers.dev subdomain cannot fetch another one, and it offers edge caching and per-branch preview deployments.

When should I use CodFlow Storefront Vercel Deploy?

CodFlow Storefront Vercel Deploy fits situations like: deploying the CodFlow storefront to Vercel for the first time; switching the storefront from Cloudflare Workers to Vercel; troubleshooting a failing Vercel storefront deployment.

How do I install CodFlow Storefront Vercel Deploy in Claude Code?

Run `npx skills add bighadj22/codflow --skill storefront-vercel -a claude-code`. Or copy the skill folder (.agents/skills/storefront-vercel in bighadj22/codflow) into .claude/skills/storefront-vercel in your project. Claude Code loads it when a task matches its description.

How do I install CodFlow Storefront Vercel Deploy in Codex?

Run `npx skills add bighadj22/codflow --skill storefront-vercel -a codex`. Or copy the skill folder (.agents/skills/storefront-vercel in bighadj22/codflow) into .agents/skills/storefront-vercel in your project. Codex loads it when a task matches its description.

Can I use CodFlow Storefront Vercel Deploy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bighadj22/codflow --skill storefront-vercel -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/storefront-vercel, .gemini/skills/storefront-vercel, .github/skills/storefront-vercel and .opencode/skills/storefront-vercel in your project.

What does CodFlow Storefront Vercel Deploy need to run?

Going by SKILL.md and its folder, CodFlow Storefront Vercel Deploy needs the command-line tools its instructions call (npx, curl and npm) and credentials named STORE_API_KEY and VERCEL_TOKEN. Our summary lists: A Vercel account, with the Vercel CLI through npx or a VERCEL_TOKEN; A deployed CodFlow cod-server and its URL; The store API key from the CodFlow setup.

Does CodFlow Storefront Vercel Deploy access the network?

SKILL.md contains no URLs. Its commands use npx, curl and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CodFlow Storefront Vercel Deploy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CodFlow Storefront Vercel Deploy use?

CodFlow Storefront Vercel Deploy is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CodFlow Storefront Vercel Deploy use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CodFlow Storefront Vercel Deploy?

Skills that share tags, products or a category with CodFlow Storefront Vercel Deploy: Vercel CLI With Tokens (vercel-labs/agent-skills, 32k stars), Env Manager (bobmatnyc/claude-mpm, 155 stars), Frontmcp Deployment (agentfront/frontmcp, 146 stars) and Add Vercel to NanoClaw (nanocoai/nanoclaw, 31k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CodFlow Storefront Vercel Deploy?

bighadj22 (a GitHub user) maintains it in bighadj22/codflow, which has 350 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 6, 2026.

Source: bighadj22/codflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.