skills/treehausdev/skills/github-vercel-setup

github-vercel-setup

SKILL.md

GitHub + Vercel Setup

One-time setup: install and authenticate GitHub CLI + Vercel CLI, create a repo, link to Vercel for auto-deploy on every push.

Installation

npx skills add treehausdev/skills

Or copy this file into your project's .claude/skills/, .cursor/skills/, or .agents/skills/ directory.

Agent Compatibility

  • Claude Code (terminal/desktop): Use AskUserTool to prompt the user before installing anything or opening browser windows. Run CLI commands directly in the terminal.
  • Cursor / Windsurf: Ask in chat, run commands in the integrated terminal.
  • Requires terminal access. This skill cannot run in web-only agents (e.g. claude.ai).

Step 1 — Check Node.js

Run: node --version

  • Need v18+. If missing or too old, tell the user: "You need Node.js 18 or higher. Install from https://nodejs.org"
  • Do not proceed without Node.js.

Step 2 — Check GitHub CLI

Run: gh --version

  • If installed, proceed to Step 3.
  • If missing, ask the user: "GitHub CLI isn't installed. Can I install it?"
    • macOS: brew install gh
    • Linux: sudo apt install gh or sudo dnf install gh
    • Windows: winget install GitHub.cli

Step 3 — Check Vercel CLI

Run: vercel --version

  • If installed, proceed to Step 4.
  • If missing, ask the user: "Vercel CLI isn't installed. Can I install it?"
    • Run: npm install -g vercel

Step 4 — Authenticate GitHub

Run: gh auth status

  • If already authenticated, skip to Step 5.
  • If not, tell the user: "I need to log you into GitHub. This will open your browser — OK?"
    • Run: gh auth login --web
    • Wait for completion (user approves in browser)
    • Verify: gh auth status

Step 5 — Authenticate Vercel

Run: vercel whoami

  • If already authenticated, skip to Step 6.
  • If not, tell the user: "I need to log you into Vercel. This will open your browser — OK?"
    • Run: vercel login
    • Wait for completion (user approves in browser)
    • Verify: vercel whoami

Step 6 — Create the project

Ask the user: "What should the project be called?" (lowercase, hyphens, no spaces)

npx create-next-app@latest PROJECT_NAME --typescript --tailwind --eslint --app --src-dir --no-import-alias
cd PROJECT_NAME

Step 7 — Create GitHub repo

Ask: "Public or private repo?"

GITHUB_USER=$(gh api user --jq '.login')
gh repo create $GITHUB_USER/PROJECT_NAME --source=. --push --VISIBILITY

Step 8 — Link to Vercel

vercel link --yes
vercel git connect

Step 9 — Verify

git add -A && git commit -m "initial setup" && git push origin main
vercel --prod

Completion

Show the user:

  • GitHub repo: https://github.com/USERNAME/PROJECT_NAME
  • Live URL: https://PROJECT_NAME.vercel.app
  • Deploy trigger: Push to main

Say: "Setup complete. Every push to main auto-deploys. You're ready to build."

More Skills

Browse the full catalog at https://treehaus.dev/skills

Weekly Installs
4
First Seen
7 days ago
Installed on
mcpjam4
claude-code4
windsurf4
zencoder4
crush4
amp4