netlify-config

Configures netlify.toml build settings, redirects, headers, deploy contexts, and environment variables.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/JamesMitofsky/tag-archive --skill netlify-config-jamesmitofsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: netlify-config
Source: https://github.com/JamesMitofsky/tag-archive/tree/main/.claude/skills/netlify-config
Command: npx skills add https://github.com/JamesMitofsky/tag-archive --skill netlify-config-jamesmitofsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Netlify site configuration is scattered across netlify.toml, the dashboard UI, and CLI-managed environment variables, with subtle precedence rules and silent misconfiguration traps. This Skill provides a complete reference for writing correct netlify.toml files and managing environment variables without falling into common pitfalls. ## Core Features & Use Cases - Complete netlify.toml syntax: Covers build settings, redirects (splats, path parameters, conditions, force), headers, deploy contexts, functions, edge functions, plugins, Image CDN, and the [dev] block. - Precedence and gotcha guidance: Documents that netlify.toml overrides UI settings, that _redirects files are processed before toml rules, that redirects/headers cannot be scoped to deploy contexts, and that toml-declared variables are build-scoped only. - Environment variable management: Covers Netlify CLI commands (env:set, env:get, env:list, env:import, env:unset) with context scoping and secret handling. - Use Case: You set a custom command and targetPort in the [dev] block but netlify dev ignores your command — this Skill explains that framework must be "#custom" in that combination. ## Quick Start Ask the assistant to write a netlify.toml with a SPA catch-all redirect, security headers, and production-only environment variables for your site.

Frequently Asked Questions about netlify-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure redirects in netlify.toml?

Add [[redirects]] tables with from, to, and status fields, supporting splats (:splat), path parameters (:id), force overrides, and country or language conditions. Rules are processed top to bottom and the first match wins, so place specific rules before general ones.

How do I set environment variables with the Netlify CLI?

Use netlify env:set NAME "value" to create variables, with --secret to hide values from logs and --context production or deploy-preview for scoping. CLI-set variables are available at both build and function runtime, unlike netlify.toml-declared ones.

Does netlify.toml override Netlify UI settings?

Yes, netlify.toml takes precedence over the Netlify UI for the same property, including build command, publish directory, environment variables, redirects, and headers. The dashboard field still shows its old value but is inert, so treat the toml file as the source of truth.

Why is netlify dev ignoring my custom command?

When both a custom command and targetPort are set in the [dev] block, framework must be "#custom". With the default "#auto", Netlify Dev runs its own detector and silently ignores your command.

Can redirects be scoped to a deploy context in netlify.toml?

No, [[redirects]] and [[headers]] are global and cannot be scoped to deploy contexts. For context-specific rules, generate a _redirects or _headers file during that context's build, or gate behavior in an edge function.

Why is my environment variable undefined inside a Netlify Function?

Variables declared under [build.environment] or [context.*.environment] in netlify.toml are build-scoped only and not injected into function runtime. Set them via the Netlify UI or netlify env:set, and read them with Netlify.env.get for portability across Functions and Edge Functions.