netlify-deploy/SKILL.md
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.
npx skillsauth add lidge-jun/cli-jaw-skills netlify-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deploy web projects to Netlify using the CLI with automatic project detection.
npx netlify status
If not authenticated:
npx netlify login # browser-based OAuth (primary)
# OR
export NETLIFY_AUTH_TOKEN=your_token_here # API key alternative
# Tokens: https://app.netlify.com/user/applications#personal-access-tokens
From netlify status, check if a site is already linked.
If not linked:
# Try Git-based linking first
git remote show origin
npx netlify link --git-remote-url <REMOTE_URL>
# If no site exists on Netlify:
npx netlify init
# Or create a new site directly (without linking)
npx netlify create --name my-site-name
netlify init guides through team selection, site naming, build settings, and netlify.toml creation.
npm install # or yarn/pnpm as appropriate
# Preview deploy (unique URL for testing)
npx netlify deploy
# Production deploy
npx netlify deploy --prod
# Stream deploy and function logs
npx netlify logs # All logs
npx netlify logs:function # Function logs only
After deployment, report:
netlify open to view siteIf present, the CLI uses it automatically. If absent, the CLI prompts for:
npm run build, next builddist, build, .nextCommon framework defaults:
| Framework | Build Command | Publish Dir |
|-----------|--------------|-------------|
| Next.js | npm run build | .next |
| React (Vite) | npm run build | dist |
| Static HTML | (none) | . |
Detect framework from package.json and suggest appropriate settings.
| Error | Solution |
|-------|----------|
| "Not logged in" | npx netlify login |
| "No site linked" | npx netlify link or npx netlify init |
| "Build failed" | Check build command, publish dir, dependencies; review build logs |
| "Publish directory not found" | Verify build ran successfully and path is correct |
Set secrets in Netlify dashboard (Site Settings → Environment Variables), not in Git.
Netlify offers a managed serverless PostgreSQL database (built on Neon).
# Create a database for the linked site
npx netlify db:init
# Open database shell
npx netlify db:shell
# Connection string available as environment variable
# DATABASE_URL is auto-injected into Netlify Functions at runtime
DATABASE_URLpg client in Netlify FunctionsNode 18 and Node 20 are no longer supported for Netlify Build Plugins (as of 2026). Build Plugins must target Node 22+. Update your plugin's
enginesfield in package.json accordingly.
tools
Use only on the Codex CLI for native image generation or image editing without an API key. Save final PNG files under ~/.cli-jaw/uploads, report web-ready absolute-path markdown, and send to Telegram or Discord only when explicitly requested.
tools
Ranked repository structure map via `cli-jaw map`. Use for codebase overview, structure map, symbol overview, unfamiliar codebase exploration, architecture orientation. Triggers: repo map, structure map, codebase overview, 와꾸, project structure, unfamiliar code.
tools
cli-jaw Design workspace: create, preview, run, and export design pages from the right sidebar. Covers panel UX, direct-write workflow, artifact lifecycle, wireframe generation, design system, and Open Design adapter.
development
MUST USE for infrastructure and delivery work — container builds, deploy pipelines, Kubernetes, Infrastructure as Code, SRE foundations, edge/serverless, ML infrastructure. Triggers: Dockerfile, K8s manifests, CI/CD pipeline, Terraform/IaC, release/deploy, devops/infra/deploy or release_cd task_tags.