Back to Skills

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.

22,907stars1,558forksUpdated 6/27/2026

Security Assessment

Medium Risk(65/100)

Detected risks:

Secret Exposure([SKILL.md] TOKEN=)
Sensitive File Access([references/cli-commands.md] .env, [SKILL.md] .env, [references/deployment-patterns.md] .env)
Security Score65/100

About netlify-deploy

The netlify-deploy skill automates deploying web projects to Netlify using the Netlify CLI invoked through npx (no global install required). It covers the full path from authentication through to a live or preview URL, intelligently detecting project configuration and deployment context along the way. Typical triggers are requests to deploy, host, publish, or link a site or repository on Netlify, including both preview and production deploys.

The workflow proceeds in steps. First it verifies authentication with npx netlify status, guiding the user through npx netlify login (browser-based OAuth) or, as an alternative, setting the NETLIFY_AUTH_TOKEN environment variable. Next it determines whether the project is already linked to a Netlify site; if not, it attempts to link by Git remote using netlify link --git-remote-url, falling back to netlify init to create and configure a new site interactively. It then installs dependencies (npm install, or the appropriate command for yarn or pnpm), and deploys with npx netlify deploy for a preview/draft or npx netlify deploy --prod for production. After deployment it reports the deploy URL, site URL, and where to find logs.

The skill handles netlify.toml automatically when present, and otherwise prompts for the build command and publish directory, with documented framework defaults (Next.js builds to .next, Vite/React to dist, static HTML needs no build). It includes guidance for common errors such as not being logged in, no site linked, build failures, and missing publish directories. Because deploys make outbound network calls, it notes that when sandbox networking blocks them the deploy should be rerun with escalated permissions (sandbox_permissions=require_escalated) and that deploys may take several minutes, so generous timeouts are appropriate. Secrets should never be committed; they belong in the Netlify dashboard environment variables. Bundled reference files cover CLI commands, deployment patterns, and the netlify.toml format.

FAQ

Do I need to install the Netlify CLI globally?

No. The skill runs the CLI through npx (npx netlify ...), so no global install is required.

How does authentication work?

It checks status with npx netlify status, then uses browser-based OAuth via npx netlify login as the primary method, or alternatively the NETLIFY_AUTH_TOKEN environment variable. It fails gracefully if authentication cannot be established.

What is the difference between a preview and a production deploy?

npx netlify deploy creates a deploy preview with a unique URL for testing, while npx netlify deploy --prod deploys to the live production URL. The skill recommends previewing first before deploying to production.

What happens if the deployment fails due to network issues?

When sandbox networking blocks outbound requests (timeouts, DNS errors, connection resets), the deploy should be rerun with escalated network access using sandbox_permissions=require_escalated.

How are build settings determined if there is no netlify.toml?

If netlify.toml exists the CLI uses it automatically; otherwise the CLI prompts for the build command and publish directory. The skill suggests framework defaults such as .next for Next.js and dist for Vite/React based on package.json.

All Files

7 files
agents/openai.yaml0.3 KB
View
references/cli-commands.md2.6 KB
View
SKILL.md6.8 KB
View
assets/netlify-small.svg1.3 KB
View
references/deployment-patterns.md6.5 KB
View
LICENSE.txt10.5 KB
View
references/netlify-toml.md3.9 KB
View

Install netlify-deploy

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

openai/skills