Deploy to Netlify

Deploys the current project to Netlify with `npx netlify`: checks the login, links the folder to a site by Git remote or creates one, builds locally and returns a preview or production URL. Use when you want to publish a site to Netlify from your machine.

DevOpsPack: OpenAI skills247 linesnetlify-deploy
Author
Source
openai/skills/skills/.curated/netlify-deploy @ 49f948f
License
Apache-2.0

About this skill

What it does

The skill deploys the project in the current directory to Netlify with the Netlify CLI, run as npx netlify so nothing is installed globally. netlify status checks the login; without one, netlify login opens browser OAuth, or you set NETLIFY_AUTH_TOKEN. The folder is then linked to a site by its Git remote (netlify link --git-remote-url); if no site matches, netlify init creates one, with a netlify.toml when needed. Dependencies are installed, then the CLI builds locally and uploads the output. A linked site gets a draft deploy with its own preview URL; --prod is for a new site or when you ask for production. It reports the deploy URL, the site URL and a link to the logs.

references/cli-commands.md lists commands for sites, environment variables, functions and logs, with exit codes. references/deployment-patterns.md has the decision tree and scenarios such as a monorepo with a base directory or a custom domain. references/netlify-toml.md covers build settings, redirects with the SPA fallback, headers, per-context builds, functions and plugins. agents/openai.yaml and assets/ hold the Codex display name and icons.

When to use it, and when not

Use it to publish a static site or a front-end build to Netlify from your machine, to check a preview before production, or to link a local repo to an existing site.

If Netlify already builds the site on every push, a local deploy only duplicates that. Note that for a new site the skill runs netlify init, which the Netlify CLI documents as setting up continuous deployment from the Git repository.

How to run it

The install command below puts the whole folder in place. You need Node.js for npx and a Netlify account. When a sandbox blocks the network calls, SKILL.md has the agent rerun the deploy with Codex's escalated permissions (sandbox_permissions=require_escalated). The agent picks the skill up by its description; to call it yourself:

  • Claude Code: /netlify-deploy, or ask for the skill by name.
  • Codex: $netlify-deploy.
  • Cursor: type / in the Agent chat and pick netlify-deploy.

Example: /netlify-deploy Deploy this Vite app as a preview and tell me which build settings you used.

OpenAI has marked openai/skills deprecated; our copy is pinned to a commit there, and as of November 2026 openai/plugins has no newer version of this skill.

How it differs from similar skills

Deploy to Vercel does the same for Vercel and can deploy without an account; this skill always needs a Netlify login. Deploy to Render deploys apps from a Git repository, including back ends with databases and workers, instead of uploading a local build. Web frameworks on Cloudflare Workers prepares a framework app for Cloudflare Workers but has no deploy command of its own: it leaves the commands to the Wrangler and cf skills. Release checklist decides whether a release is safe to ship and never deploys; CI/CD pipeline setup moves deploys into the pipeline.

Install

Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.

Claude Code — macOS, Linux
curl -fsSL --create-dirs -o ~/.claude/skills/netlify-deploy/SKILL.md https://anymodel.org/en/skills/openai/netlify-deploy/SKILL.md -o ~/.claude/skills/netlify-deploy/LICENSE.txt https://anymodel.org/en/skills/openai/netlify-deploy/LICENSE.txt -o ~/.claude/skills/netlify-deploy/agents/openai.yaml https://anymodel.org/en/skills/openai/netlify-deploy/agents/openai.yaml -o ~/.claude/skills/netlify-deploy/assets/netlify-small.svg https://anymodel.org/en/skills/openai/netlify-deploy/assets/netlify-small.svg -o ~/.claude/skills/netlify-deploy/assets/netlify.png https://anymodel.org/en/skills/openai/netlify-deploy/assets/netlify.png -o ~/.claude/skills/netlify-deploy/references/cli-commands.md https://anymodel.org/en/skills/openai/netlify-deploy/references/cli-commands.md -o ~/.claude/skills/netlify-deploy/references/deployment-patterns.md https://anymodel.org/en/skills/openai/netlify-deploy/references/deployment-patterns.md -o ~/.claude/skills/netlify-deploy/references/netlify-toml.md https://anymodel.org/en/skills/openai/netlify-deploy/references/netlify-toml.md
Codex, Cursor — macOS, Linux
curl -fsSL --create-dirs -o ~/.agents/skills/netlify-deploy/SKILL.md https://anymodel.org/en/skills/openai/netlify-deploy/SKILL.md -o ~/.agents/skills/netlify-deploy/LICENSE.txt https://anymodel.org/en/skills/openai/netlify-deploy/LICENSE.txt -o ~/.agents/skills/netlify-deploy/agents/openai.yaml https://anymodel.org/en/skills/openai/netlify-deploy/agents/openai.yaml -o ~/.agents/skills/netlify-deploy/assets/netlify-small.svg https://anymodel.org/en/skills/openai/netlify-deploy/assets/netlify-small.svg -o ~/.agents/skills/netlify-deploy/assets/netlify.png https://anymodel.org/en/skills/openai/netlify-deploy/assets/netlify.png -o ~/.agents/skills/netlify-deploy/references/cli-commands.md https://anymodel.org/en/skills/openai/netlify-deploy/references/cli-commands.md -o ~/.agents/skills/netlify-deploy/references/deployment-patterns.md https://anymodel.org/en/skills/openai/netlify-deploy/references/deployment-patterns.md -o ~/.agents/skills/netlify-deploy/references/netlify-toml.md https://anymodel.org/en/skills/openai/netlify-deploy/references/netlify-toml.md
Claude Code — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/netlify-small.svg','assets/netlify.png','references/cli-commands.md','references/deployment-patterns.md','references/netlify-toml.md') { $p = Join-Path "$HOME\.claude\skills\netlify-deploy" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/netlify-deploy/$f" -UseBasicParsing -OutFile $p }
Codex, Cursor — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/netlify-small.svg','assets/netlify.png','references/cli-commands.md','references/deployment-patterns.md','references/netlify-toml.md') { $p = Join-Path "$HOME\.agents\skills\netlify-deploy" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/netlify-deploy/$f" -UseBasicParsing -OutFile $p }

Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/openai/netlify-deploy/SKILL.md

SKILL.md

Raw

Netlify Deployment Skill

Deploy web projects to Netlify using the Netlify CLI with intelligent detection of project configuration and deployment context.

Overview

This skill automates Netlify deployments by:

  • Verifying Netlify CLI authentication
  • Detecting project configuration and framework
  • Linking to existing sites or creating new ones
  • Deploying to production or preview environments

Prerequisites

  • Netlify CLI: Installed via npx (no global install required)
  • Authentication: Netlify account with active login session
  • Project: Valid web project in current directory
  • When sandboxing blocks the deployment network calls, rerun with sandbox_permissions=require_escalated.
  • The deployment might take a few minutes. Use appropriate timeout values.

Authentication Pattern

The skill uses the pre-authenticated Netlify CLI approach:

  1. Check authentication status with npx netlify status
  2. If not authenticated, guide user through npx netlify login
  3. Fail gracefully if authentication cannot be established

Authentication uses either:

  • Browser-based OAuth (primary): netlify login opens browser for authentication
  • API Key (alternative): Set NETLIFY_AUTH_TOKEN environment variable

Workflow

1. Verify Netlify CLI Authentication

Check if the user is logged into Netlify:

npx netlify status

Expected output patterns:

  • ✅ Authenticated: Shows logged-in user email and site link status
  • ❌ Not authenticated: "Not logged into any site" or authentication error

If not authenticated, guide the user:

npx netlify login

This opens a browser window for OAuth authentication. Wait for user to complete login, then verify with netlify status again.

Alternative: API Key authentication

If browser authentication isn't available, users can set:

export NETLIFY_AUTH_TOKEN=your_token_here

Tokens can be generated at: https://app.netlify.com/user/applications#personal-access-tokens

From netlify status output, determine:

  • Linked: Site already connected to Netlify (shows site name/URL)
  • Not linked: Need to link or create site

If already linked → Skip to step 4

If not linked, attempt to link by Git remote:

# Check if project is Git-based
git remote show origin

# If Git-based, extract remote URL
# Format: https://github.com/username/repo or [email protected]:username/repo.git

# Try to link by Git remote
npx netlify link --git-remote-url <REMOTE_URL>

If link fails (site doesn't exist on Netlify):

# Create new site interactively
npx netlify init

This guides user through:

  1. Choosing team/account
  2. Setting site name
  3. Configuring build settings
  4. Creating netlify.toml if needed

4. Verify Dependencies

Before deploying, ensure project dependencies are installed:

# For npm projects
npm install

# For other package managers, detect and use appropriate command
# yarn install, pnpm install, etc.

5. Deploy to Netlify

Choose deployment type based on context:

Preview/Draft Deploy (default for existing sites):

npx netlify deploy

This creates a deploy preview with a unique URL for testing.

Production Deploy (for new sites or explicit production deployments):

npx netlify deploy --prod

This deploys to the live production URL.

Deployment process:

  1. CLI detects build settings (from netlify.toml or prompts user)
  2. Builds the project locally
  3. Uploads built assets to Netlify
  4. Returns deployment URL

6. Report Results

After deployment, report to user:

  • Deploy URL: Unique URL for this deployment
  • Site URL: Production URL (if production deploy)
  • Deploy logs: Link to Netlify dashboard for logs
  • Next steps: Suggest netlify open to view site or dashboard

Handling netlify.toml

If a netlify.toml file exists, the CLI uses it automatically. If not, the CLI will prompt for:

  • Build command: e.g., npm run build, next build
  • Publish directory: e.g., dist, build, .next

Common framework defaults:

  • Next.js: build command npm run build, publish .next
  • React (Vite): build command npm run build, publish dist
  • Static HTML: no build command, publish current directory

The skill should detect framework from package.json if possible and suggest appropriate settings.

Example Full Workflow

# 1. Check authentication
npx netlify status

# If not authenticated:
npx netlify login

# 2. Link site (if needed)
# Try Git-based linking first
git remote show origin
npx netlify link --git-remote-url https://github.com/user/repo

# If no site exists, create new one:
npx netlify init

# 3. Install dependencies
npm install

# 4. Deploy (preview for testing)
npx netlify deploy

# 5. Deploy to production (when ready)
npx netlify deploy --prod

Error Handling

Common issues and solutions:

"Not logged in" → Run npx netlify login

"No site linked" → Run npx netlify link or npx netlify init

"Build failed" → Check build command and publish directory in netlify.toml or CLI prompts → Verify dependencies are installed → Review build logs for specific errors

"Publish directory not found" → Verify build command ran successfully → Check publish directory path is correct

Troubleshooting

Escalated Network Access

If deployment fails due to network issues (timeouts, DNS errors, connection resets), rerun the deploy with escalated permissions (use sandbox_permissions=require_escalated). The deploy requires escalated network access when sandbox networking blocks outbound requests.

Example guidance to the user:

The deploy needs escalated network access to deploy to Netlify. I can rerun the command with escalated permissions—want me to proceed?

Environment Variables

For secrets and configuration:

  1. Never commit secrets to Git
  2. Set in Netlify dashboard: Site Settings → Environment Variables
  3. Access in builds via process.env.VARIABLE_NAME

Tips

  • Use netlify deploy (no --prod) first to test before production
  • Run netlify open to view site in Netlify dashboard
  • Run netlify logs to view function logs (if using Netlify Functions)
  • Use netlify dev for local development with Netlify Functions

Reference

Bundled References (Load As Needed)

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack OpenAI skills

ASP.NET Core apps

Guides the agent through current ASP.NET Core practice: choosing Blazor, Razor Pages, MVC or Minimal APIs, Program.cs and middleware order, auth, EF Core, tests and upgrades to .NET 10. Use when building, reviewing or upgrading an ASP.NET Core app.

ChatGPT Apps SDK

Builds ChatGPT apps on the Apps SDK: reads current OpenAI docs first, picks an app archetype, plans MCP tools, adapts an official example or scaffolds a Node server and widget, then tests in Developer Mode. Use when building or fixing an app inside ChatGPT.

CLI creator from API docs

Builds a durable CLI from API docs, an OpenAPI spec, curls or a script: JSON output, doctor and dry-run commands, safe auth, installed on PATH and paired with a companion skill. Use when an agent keeps hitting the same service through ad hoc calls.

Define a measurable goal

Turns a fuzzy intention into one measurable goal with a validator, scope and stop condition, then registers it via get_goal and create_goal. Use before goal-backed or long-running agent work, when "done" needs a number or a check.

Address GitHub PR comments

Fetches all comments, reviews and inline threads on the current branch's GitHub PR with a gh GraphQL script, numbers them and fixes only the ones you pick. Use when a PR has review comments to work through and you want to choose which get changed.

Fix failing GitHub Actions checks

Finds failing GitHub Actions checks on a PR with gh, pulls the logs, extracts the failure snippet and drafts a fix plan, changing code only after approval. Use when a PR's CI is red and you want the cause and a plan before any edit.

Jupyter notebooks

Creates and tidies Jupyter notebooks for experiments or tutorials from bundled templates via a stdlib script, with structure patterns and a run-top-to-bottom checklist. Use when starting a notebook or turning a messy one into something others can rerun.

Linear issues and projects

Works with Linear issues, projects and cycles through Linear's MCP server in a fixed order: setup, scope, read, then write, with sample workflows for triage, sprints and releases. Use when an agent should read or update Linear as part of a task.

Browser automation with Playwright CLI

Drives a real browser from the terminal with playwright-cli: snapshots give element refs for clicks and typing, plus screenshots, console, network and traces, with no test files written. Use when a task needs a browser clicked through step by step.

Deploy to Render

Deploys an app to Render from a Git repo: writes and validates a render.yaml Blueprint with services, databases and secrets, or creates one service through the Render MCP server, then checks status and logs. Use when an app needs hosting on Render.

Security best-practice review

Checks Python, JavaScript/TypeScript and Go code against bundled security specs for ten frameworks, writes a report by severity with line numbers and fixes one finding at a time. Use when you explicitly ask for a security best-practice review.

Repository threat model

Writes a repository-grounded threat model: trust boundaries, assets, attacker capabilities and ranked abuse paths with mitigations, asking you to confirm key assumptions before the final file. Use when you explicitly ask to threat model a codebase.

Sentry issues and events

Reads Sentry issues and events through the sentry CLI without changing anything: recent production errors, issue and event details, AI root-cause summaries, with PII redacted. Use when you ask what is failing in production according to Sentry.

Deploy to Vercel

Deploys a project to Vercel, as a preview unless told otherwise, through the Vercel CLI or, without an account, a bundled script that uploads the folder and returns a preview link and a claim link. Use when you want a shareable deployment link fast.

Figma MCP design context

Reads Figma frames through the Figma MCP server in a fixed order (design context, metadata, screenshot) and rebuilds them with the project's components and tokens; also covers server setup in Codex. Use when connecting Figma MCP or coding from a frame link.

Figma use_figma prerequisite

Sets the rules an agent must load before every use_figma call that runs Plugin API JavaScript in a Figma file: return values, page resets, colours, fonts, node IDs, small validated steps. Use when creating or editing anything inside a Figma file.

Implement a Figma design in code

Implements a Figma frame or component as code in your repo with 1:1 visual parity: fetches context and a screenshot, maps the output to project tokens and components, then runs a validation checklist. Use when a Figma link must become production UI.

Generate a Figma design from an app

Builds or updates a full screen in Figma from code or a description, section by section, using the file's published components, variables and styles instead of hardcoded values. Use when a page from your app should exist as a Figma screen.

Figma design system from a codebase

Builds a Figma design system library from a codebase in five supervised phases: discovery, variables and styles, page structure, components one by one, QA. Use when a product needs a Figma library that matches its code tokens and components.

Figma Code Connect components

Links published Figma components to the code components that implement them via Code Connect: finds unmapped ones, matches them in the codebase, maps only what the user approves. Use when a Figma library and its code both exist but are not linked.

Figma design system rules

Writes project rules for turning Figma designs into code into CLAUDE.md, AGENTS.md or a Cursor rules file, based on Figma's rule template and an analysis of the codebase. Use when setting up an agent for regular Figma-to-code work in a repo.

Create a new Figma file

Creates a blank Figma design file or FigJam board in your drafts, resolving the plan through whoami, and returns the file key and URL. Use when the next Figma step needs a fresh file to write into.