agentleFS
choupiyangchoupiyang/ZAI_SKILLS/vercel-deploy/SKILL.md

vercel-deploy

Skill13 starsChanged 7 months agoMITView on GitHub

Deploy any web project (Next.js, React, HTML) to Vercel with one command. Use this skill whenever the user asks to deploy a website, publish a page, push to Vercel, go live, or get a permanent URL for their project. Also trigger when the user says things like '部署', '上线', '发布', '帮我弄个链接', 'deploy to vercel', or wants a shareable URL. IMPORTANT: Always use this skill for deployment — never skip it or deploy manually.

  • Deletes or force-pushes

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use netlify-deploy, notion-knowledge-capture and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    netlify-deploy

    Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.

    Also in 4 projects that use this

  • OpenAISkill

    notion-knowledge-capture

    Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.

    Also in 5 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 9 projects that use this

  • +9 more from openai

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read scripts/.token to check for a stored Vercel token.

    line 20
  2. Distinctive:

    If the token file does NOT exist or is empty:

    line 22
  3. Distinctive:

    Ask the user to provide their Vercel token

    line 23
  4. Distinctive:

    If the user specifies a name, use it (slugified: lowercase, hyphens, no special chars)

    line 30
  5. Distinctive:

    Keep it under 40 characters

    line 33
  6. Very specific:

    If output: "export" is not present, add it.

    line 44
  7. Very specific:

    Wait for build to complete.

    line 52
  8. Very specific:

    Remove output: "export" from next.config.ts so the dev server continues working normally.

    line 73
  9. Very specific:

    Always restore next.config.ts: after building. Forgetting this breaks the dev server.

    line 85
  10. Distinctive:

    If deployment fails, check the error message — common issues:

    line 87

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Vercel Deploy Skill

This skill deploys the current Next.js project at /home/z/my-project/ to Vercel, producing a permanent, shareable URL. Each deployment gets its own Vercel project so multiple projects can coexist without overwriting each other.

Prerequisites

  • Vercel CLI is available via npx vercel
  • A valid Vercel token is stored in scripts/.token (first-time setup required)
  • The project at /home/z/my-project/ has valid Next.js source code

Deployment Workflow

Step 1: Ensure token exists

Read scripts/.token to check for a stored Vercel token.

If the token file does NOT exist or is empty:

  • Ask the user to provide their Vercel token
  • They can get one at https://vercel.com/account/tokens (Create Token → Full Account)
  • Once received, save it to scripts/.token (no newline at end)

Step 2: Determine project name

Generate a short, URL-safe project name based on context:

  • If the user specifies a name, use it (slugified: lowercase, hyphens, no special chars)
  • Otherwise, derive from the page title or content theme
  • Examples: ai-startup-article, chinese-font-catalog, portfolio-2026
  • Keep it under 40 characters

Step 3: Configure for static export

Temporarily modify /home/z/my-project/next.config.ts to add output: "export" if not already present. This is needed for static hosting on Vercel.

cd /home/z/my-project
# Check if output: "export" is already in next.config.ts

If output: "export" is not present, add it. Remember to remove it after building.

Step 4: Build static export

cd /home/z/my-project && npx next build

Wait for build to complete. Verify success by checking for out/index.html.

Step 5: Deploy to Vercel

cd /home/z/my-project/out
# Remove any previous .vercel config to avoid linking to wrong project
rm -rf .vercel
TOKEN=$(cat /home/z/my-project/skills/vercel-deploy/scripts/.token)
npx vercel deploy --yes --prod --token "$TOKEN" --name "$PROJECT_NAME"

The output will contain a line like:

Aliased: https://your-project.vercel.app

Extract and save this URL — it's the permanent link.

Step 6: Restore dev config

Remove output: "export" from next.config.ts so the dev server continues working normally.

Step 7: Report to user

Send the user a message with:

  • The permanent URL ( prominently displayed )
  • Confirmation that it's live and shareable
  • Note that this is an independent deployment and won't be affected by future projects

Important Notes

  • Each project gets its own Vercel project name, so deployments never overwrite each other.
  • Always restore next.config.ts after building. Forgetting this breaks the dev server.
  • The token is stored locally in scripts/.token and is never sent to the user or logged.
  • If deployment fails, check the error message — common issues:
    • Token expired → ask user for a new token
    • Project name conflict → add a suffix like -2
    • Build failure → check the build output for errors

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.