Skip to content

netlify-config

Configure Netlify builds and routing via netlify.toml, _redirects, and _headers. Use when setting a build command or publish directory, validating netlify.toml

— (0 ratings) 3.8K downloads netlify
$ npx skills add https://github.com/netlify/context-and-tools --skill netlify-config

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

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


Installs: 3.8K | GitHub stars: 57 | First seen: Feb 27, 2026

Related skills

New

Databases

azure-resource-lookup

Fast discovery and inventory of Azure resources across subscriptions using Resource Graph queries.

New • 779.5K
New

Databases

azure-kusto

Execute KQL queries and analyze data in Azure Data Explorer for log analytics, telemetry, and time series insights.

New • 779.1K
New

Databases

supabase-postgres-best-practices

Postgres performance optimization rules across 8 priority categories, from query tuning to advanced features.

New • 502.1K