github-vercel-deploy
Skill2 starsChanged 35 days agoMITView on GitHub
Deploy a local project folder from scratch to a new GitHub repo and connect it to Vercel so every push auto-deploys. Use when the user says "deploy to GitHub and Vercel", "put this project online", "ship this to Vercel", or wants auto-deploy on push.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/app-foundation/template/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/app-foundation/template/CLAUDE.mdCLAUDE.md
- app-foundationSkill
- auth-loginSkill
- db-backupSkill
- db-connectSkill
- deploy-cloudflareSkill
- domain-setupSkill
- email-sendSkill
- env-secretsSkill
- file-uploadSkill
- launch-kitSkill
- ops-dashboardSkill
- pay-checkoutSkill
- pay-subscriptionSkill
- pay-webhookSkill
- uptime-alertSkill
- warehouse-siteSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 25
Never type passwords, create accounts, solve CAPTCHAs, or change account settings for the user.
- Very specific: line 26
Never ask the user to paste a token into the chat.
- Very specific: line 27
Before creating a repo or deploying, confirm with the user: repo name, Public or Private (default Private), and any environment variables.
- Distinctive: line 28
Never git push --force. Never delete repos or Vercel projects.
- Very specific: line 45
If gh is installed and logged in, the GitHub token is picked up automatically.
- Very specific: line 51
Ask: "I'll create a private repo <login>/<name> and deploy it to Vercel.
- Distinctive: line 88
Do not paste tokens or the full log.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub + Vercel deploy
Goal: take a project folder, push it to a GitHub repo, create a Vercel project linked to that repo, deploy to production, and verify. Every later git push auto-deploys.
This skill follows the open Agent Skills format (SKILL.md + scripts/ + references/) and works in any agent that can run a shell command: Claude Code, Claude desktop/web, Cursor, VS Code Copilot, OpenAI Codex, Gemini CLI, Windsurf, or a plain CI job.
Pick a mode
| Your agent can... | Use |
| run shell commands on the machine that has the project (Claude Code, Cursor, Copilot agent mode, Codex, Gemini CLI, a terminal) | CLI mode (below), the default |
| only use a browser plus a sandbox that cannot reach api.vercel.com (for example a cloud chat session) | Browser mode: follow references/browser-mode.md |
Rules (always)
- Never type passwords, create accounts, solve CAPTCHAs, or change account settings for the user. Logins, sign-ups, OAuth approvals, and linking or unlinking accounts are done by the user.
- Never ask the user to paste a token into the chat. Tokens go in environment variables or an
.env.deployfile that the user edits themselves. - Before creating a repo or deploying, confirm with the user: repo name, Public or Private (default Private), and any environment variables. Then run with
--yes. - Never
git push --force. Never delete repos or Vercel projects.
CLI mode
The script scripts/deploy.mjs does everything through the GitHub and Vercel REST APIs. It needs only git and Node 18+, with no gh or vercel CLI and no interactive login, so it cannot hang. Resolve the script path relative to this SKILL.md.
1. Preflight (no changes)
node <skill-dir>/scripts/deploy.mjs --dir <project> --check- Exit 2, missing or invalid token: show the user the two links the script prints and ask them to create the tokens and put them in
<project>/.env.deployor~/.env.deploy:
IfGITHUB_TOKEN=... # https://github.com/settings/tokens/new?scopes=repo&description=skill-deploy VERCEL_TOKEN=... # https://vercel.com/account/tokensghis installed and logged in, the GitHub token is picked up automatically. Wait for the user to say done, then run the check again. - Exit 3, git or Node missing: show the printed install command. On Windows, tell the user to open a new terminal after installing so that PATH refreshes.
- On success the check prints the GitHub login, the Vercel user, and whether the repo and project already exist. Use these in your confirmation question.
2. Confirm, then deploy
Ask: "I'll create a private repo <login>/<name> and deploy it to Vercel. OK?" Once the user agrees:
node <skill-dir>/scripts/deploy.mjs --dir <project> --name <name> --yes --json
# add --public if the user wants a public repo; --framework nextjs|vite|... if auto-detect is wrongThe script:
- adds
.gitignoreentries (node_modules/,.env*,.env.deploy,.vercel) - scans for secrets and aborts before pushing if it finds any
- runs
git initand commits - creates the GitHub repo
- pushes, passing the token through env so it never lands in
.git/config - creates or links the Vercel project
- triggers a production deploy, waits for READY, and checks the live URL
Re-running is safe because completed steps are skipped.
3. Handle failures by exit code
| Exit | Meaning | What you do |
| 2 | token missing or invalid | step 1 again |
| 5 | secrets found | show the files and ask the user whether to ignore or remove them. Never add --allow-secrets unless the user confirms it's a false positive |
| 6 | Vercel can't see the repo | the most common cause is that the GitHub account linked in Vercel is not the repo owner. Send the user to https://vercel.com/account/settings/authentication to Disconnect and Connect the right account, and to https://github.com/apps/vercel/installations/new to grant repo access. Then re-run |
| 7 | build failed | open the printed inspector URL or read the build log, fix the code, then re-run |
| 10 | needs confirmation | ask the user, then re-run with --yes |
More cases: references/troubleshooting.md.
4. Report
Tell the user, briefly:
- the repo URL and the live URL from the
--jsonoutput - "pushing to
mainauto-deploys, and other branches get preview URLs" - anything they still need to do
Do not paste tokens or the full log.
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
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.

