agentleFS
Rikinshah787Rikinshah787/agent-skills-production-skills/skills/netlify/SKILL.md

netlify

Skill2 starsChanged 4 months agoMITView on GitHub

Use to deploy sites/apps with continuous deployment, configure builds via netlify.toml, add functions, redirects, headers, and deploy contexts.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use when: deploying static sites or Jamstack/SSR apps with CI/CD from Git.

    line 19
  2. Distinctive:

    Use when: you want redirects, custom headers, and preview deploys defined in-repo.

    line 20
  3. Distinctive:

    Don't use for: always-on servers or heavy background jobs.

    line 21
  4. Very specific:

    Don't store secrets in netlify.toml (it's committed).

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Netlify — Skillship

Git-driven hosting for web apps and static sites with a global CDN, serverless functions, and per-branch deploy previews. Most config lives in a single netlify.toml.

🧭 When to use this skill

  • Use when: deploying static sites or Jamstack/SSR apps with CI/CD from Git.
  • Use when: you want redirects, custom headers, and preview deploys defined in-repo.
  • Don't use for: always-on servers or heavy background jobs.

⚡ Quickstart

1. Install CLI (optional but handy)

npm i -g netlify-cli
netlify login
netlify init          # link repo + set build settings
netlify deploy         # draft deploy
netlify deploy --prod  # production deploy

2. Minimal netlify.toml (repo root)

[build]
  base = "."             # base directory (where package.json lives)
  command = "npm run build"
  publish = "dist"       # the deploy-ready output directory

[functions]
  directory = "netlify/functions"

🧩 Common recipes

Recipe: SPA fallback (client-side routing)

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Recipe: Proxy /api to a backend

[[redirects]]
  from = "/api/*"
  to = "https://api.example.com/:splat"
  status = 200
  force = true

Recipe: Security headers

[[headers]]
  for = "/*"
  [headers.values]
    X-Frame-Options = "DENY"
    Content-Security-Policy = "frame-ancestors 'none'"

Recipe: Per-context build (production vs preview vs branch)

[context.production]
  command = "npm run build"
[context.deploy-preview]
  command = "npm run build:preview"
[context.branch-deploy.environment]
  NODE_ENV = "development"

Recipe: A serverless function

// netlify/functions/hello.ts
export default async (req: Request) => {
  return new Response(JSON.stringify({ ok: true }), {
    headers: { "content-type": "application/json" },
  });
};

🚀 Ship to production

  • Secrets set as environment variables in the Netlify UI (scoped, audited) — not in netlify.toml.
  • publish points to the real build output; command builds successfully in CI.
  • SPA fallback / redirects verified so deep links don't 404.
  • Security headers configured for /*.
  • Custom domain + HTTPS configured; deploy previews reviewed before merge.
  • Remember: netlify.toml settings override UI settings when both exist.

🔐 Security & secrets

  • Don't store secrets in netlify.toml (it's committed). Use UI/CLI/API env vars, and include the Builds scope if you need them at build time.
  • Env var interpolation like key = "$VAR" is NOT supported in netlify.toml (except signed proxy redirects).
  • redirects/headers in netlify.toml are global; use _headers/_redirects files for per-deploy rules.

🐛 Common errors & fixes

SymptomLikely causeFix
Deep links 404 on a SPANo fallback redirectAdd /* -> /index.html 200
Site shows old buildWrong publish dirPoint publish at the actual output folder
Secret missing at buildVar lacks Builds scopeSet the env var with Builds scope in the UI
UI setting ignorednetlify.toml overrides itChange the value in netlify.toml
Function not foundWrong functions directoryMatch [functions] directory to your folder

📚 Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.