agentleFS
aideploytutoraideploytutor/skill-deploy-share/skills/github-vercel-deploy/SKILL.md

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

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
  1. Distinctive:

    Never type passwords, create accounts, solve CAPTCHAs, or change account settings for the user.

    line 25
  2. Very specific:

    Never ask the user to paste a token into the chat.

    line 26
  3. Very specific:

    Before creating a repo or deploying, confirm with the user: repo name, Public or Private (default Private), and any environment variables.

    line 27
  4. Distinctive:

    Never git push --force. Never delete repos or Vercel projects.

    line 28
  5. Very specific:

    If gh is installed and logged in, the GitHub token is picked up automatically.

    line 45
  6. Very specific:

    Ask: "I'll create a private repo <login>/<name> and deploy it to Vercel.

    line 51
  7. Distinctive:

    Do not paste tokens or the full log.

    line 88

≈ “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.

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

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.deploy file 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.deploy or ~/.env.deploy:
    GITHUB_TOKEN=...   # https://github.com/settings/tokens/new?scopes=repo&description=skill-deploy
    VERCEL_TOKEN=...   # https://vercel.com/account/tokens
    If gh is 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 wrong

The script:

  1. adds .gitignore entries (node_modules/, .env*, .env.deploy, .vercel)
  2. scans for secrets and aborts before pushing if it finds any
  3. runs git init and commits
  4. creates the GitHub repo
  5. pushes, passing the token through env so it never lands in .git/config
  6. creates or links the Vercel project
  7. 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

ExitMeaningWhat you do
2token missing or invalidstep 1 again
5secrets foundshow 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
6Vercel can't see the repothe 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
7build failedopen the printed inspector URL or read the build log, fix the code, then re-run
10needs confirmationask 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 --json output
  • "pushing to main auto-deploys, and other branches get preview URLs"
  • anything they still need to do

Do not paste tokens or the full log.

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.