netlify-config

netlify-config is a skill for Codex from PracticalSwan/agent-skills. It costs 129 tokens per session (4,551 once invoked), scanned C, a copy of netlify-config, MIT.

A set of instructions for configuring Netlify projects with netlify.toml, redirect and header files, build settings, deploy contexts, environment variables, and secrets.

In plain words
What is it for?
Use it to set build commands and publish folders, configure redirects, rewrites, proxies, headers, environment-variable scopes, and branch-specific settings.
Why use it?
It helps avoid configuration mistakes, especially exposing browser-side secrets or assuming local .env files work during Netlify builds.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to set build commands and publish folders, configure redirects, rewrites, proxies, headers, environment-variable scopes, and branch-specific settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/netlify-config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill netlify-config
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for netlify-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/netlify-config.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/netlify-config)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/netlify-config"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/netlify-config.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00129 $0.04551
Opus 5 $0.00064 $0.02276
Sonnet 5 $0.00026 $0.00910
Haiku 4.5 $0.00013 $0.00455

Measured today against content hash efb1141a078e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

netlify-config scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- system: agent-context/config/system.md — human-owned, merged by ctx-gen; edit system.md, not this section -->
Origin

This is a copy

88% identical to netlify-config — 64 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

netlify-config/SKILL.md · 362 lines

How it starts

The opening of the file, as written. The whole thing — 362 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Netlify configuration

netlify.toml lives at the repo root (or set base/package directory for monorepos). Settings in netlify.toml override the Netlify UI on conflict. _headers and _redirects are extensionless plain-text files in the publish directory, processed before netlify.toml rules.

Footguns (read first)

  • Env vars in netlify.toml are NOT available to functions or edge functions at runtime — reading them there returns undefined. Vars declared in netlify.toml only get the Builds and Post processing scopes. Set runtime vars in the UI or with netlify env:set.
  • Never put secrets in client-prefixed vars (VITE_, NEXT_PUBLIC_, PUBLIC_, …) — they are inlined into the client bundle. --secret does not protect them.
  • .env is not read by the Netlify build system — import variables into Netlify first (netlify env:import). The CLI reads .env only for local builds.
  • Direct env injection into netlify.toml (key = "$VAR") is unsupported — except signed proxy redirects. Use a build plugin or sed in the build command.
  • [[redirects]] and [[headers]] are global — NOT context-aware, cannot be scoped to branches/contexts. Workaround: per-context build command copies a custom file into the publish directory.
  • Proxy rewrites time out at 26 seconds. HTTP 307 is unsupported — use 302.

netlify.toml — core structure

[build]
  base = "project/"          # base directory
  publish = "build-output/"  # relative to base, default /
  command = "npm run build"  # runs in Bash shell
  [build.environment]
    NODE_VERSION = "18"

[context.production]         # production branch deploy
  command = "make publish"
  environment = { NODE_VERSION = "14.15.3" }
[context.deploy-preview]     # PR/MR previews
  publish = "dist/"
[context.branch-deploy]      # non-production branches
  command = "echo branch"
[context.dev.environment]    # local dev env vars ONLY
  NODE_ENV = "development"
[context.staging]            # a specific branch name
  command = "echo staging"
[context."feat/branch"]      # quote branches with special chars
  command = "echo special"

Read the full file on GitHub · 362 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -1 lines efb1141a078e
  2. yesterday Changed 56f4c88bdd85
  3. 4d ago First seen · 363 lines · 129 tokens per session scan C 7d136087b75f

Subscribe to this mod's changes

netlify-config is a skill published in the GitHub repository PracticalSwan/agent-skills (13 stars, last pushed today), licensed MIT. It adds 129 tokens to every session and 4,551 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). It is 88% identical to netlify-config, differing in 64 lines, and is treated as a copy.