Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Netlify configuration

Sets up Netlify builds, redirects, headers and environment variables, so your site deploys and routes correctly.

Claude's review

9/10 Dense accurate Netlify config gotchas on redirects headers env vars

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Configure Netlify builds and routing via netlify.toml, _redirects, and _headers. Use when setting a build command or publish directory, validating netlify.toml against its JSON schema, adding redirects/rewrites/proxies or an SPA fallback rewrite, or setting custom response headers or basic auth. Also use when managing environment variables and secrets, scoping vars per deploy context, marking a var as secret or disabling secret scanning, handling sensitive vars in fork Deploy Previews, configuring functions bundling or the Netlify Server region/size, ignoring builds, or wiring up a monorepo or JavaScript SPA on Netlify.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: netlify-config
description: Configure Netlify builds and routing via netlify.toml, _redirects, and _headers. Use when setting a build command or publish directory, validating netlify.toml against its JSON schema, adding redirects/rewrites/proxies or an SPA fallback rewrite, or setting custom response headers or basic auth. Also use when managing environment variables and secrets, scoping vars per deploy context, marking a var as secret or disabling secret scanning, handling sensitive vars in fork Deploy Previews, configuring functions bundling or the Netlify Server region/size, ignoring builds, or wiring up a monorepo or JavaScript SPA on Netlify.
---

# Netlify configuration

Config lives in three files at the repo **root** (or the base/package directory for monorepos):
- `netlify.toml`: build, contexts, plugins, functions, server, redirects, headers, dev.
- `_redirects`: plain-text redirect/rewrite rules, saved to the **publish directory**, no extension.
- `_headers`: plain-text response headers, saved to the **publish directory**.

`netlify.toml` values **take precedence over the Netlify UI** when they conflict. Paths in `netlify.toml` are absolute relative to the **base directory** (root `/` by default).

## Modern vs legacy syntax to reach for
- Schema: start `netlify.toml` with `"$schema" = "https://open-api.netlify.com/netlify.schema.json"` (key is quoted). Editors and agents with TOML JSON-schema support suggest and validate properties. In VS Code, use the Even Better TOML extension. Netlify ignores the key at build/deploy. **A schema-valid file can still fail to build**, because checks like whether a directory exists happen only during the build.
- Functions bundler: use `node_bundler = "esbuild"`. `zisi` is the legacy JS default. TypeScript always uses `esbuild`.
- Temporary redirect: use `status = 302`. `307` is **unsupported**.
- Gatsby Image CDN: use `NETLIFY_IMAGE_CDN`, not the deprecated `GATSBY_CLOUD_IMAGE_CDN`.
- Injecting env values into TOML: `key = "$VAR"` is **NOT supported** (except `signed` in proxy redirects). Use a build-command `sed` substitution or a build plugin (see below).

## `netlify.toml` build + contexts

```toml
"$schema" = "https://open-api.netlify.com/netlify.schema.json"

[build]
  base = "frontend"
  publish = "dist"
  command = "npm run build"
  environment = { NODE_VERSION = "18" }

[context.production]
  publish = "output/"
  command = "make publish"

[context.deploy-preview]
  publish = "dist/"

[context."feat/branch"]        # quote names with special characters
...

From netlify's repository, MIT licence.

Related skills

  • Checked

    Incident postmortem writer

    Writes blameless incident postmortems with fishbone and five whys analysis, so the team fixes root causes.

    by github 42k
    8/101 credit
  • Checked

    Akka.NET cluster management

    Sets up Akka.NET cluster bootstrapping, service discovery and health checks, with no static seed nodes needed.

    by Aaronontheweb 1.3k
    7/101 credit
  • Checked

    Terraform and OpenTofu

    Sets up Terraform or OpenTofu modules, state and secrets with safe plan and apply for predictable changes.

    by affaan-m 314k
    8/101 credit
  • Checked

    AWS Lambda web apps

    Builds and deploys Express, Fastify or Hono apps on AWS Lambda web functions, so your site runs serverless.

    by aws 3.7k
    7/101 credit
  • Checked

    Cloud IAM audit

    Audits and designs access across AWS, GCP, Azure and identity providers for least privilege and clean SSO.

    by briiirussell 541
    7/101 credit
  • Checked

    Grafana APM and RUM

    Sets up Grafana Cloud app monitoring, Faro frontend RUM and LLM tracing to show latency and errors.

    by grafana 326
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added