
netlify-access-control
Picks the right Netlify site-protection layer and disambiguates the three unrelated "auth" concepts users conflate — app-user login (Netlify Identity), site-load gating (Password Protection / project visibility), and dashboard SAML SSO. Use it when asked to password-protect a site or Deploy Preview, make a project private/public, restrict a site to your team, require SSO to view a site, set up company-wide or internal-app SSO, invite users to a private project, or know which team member made a request to a private site. Also use it for SSO-session symptoms on protected sites: "logged out mid-session", 401s after about an hour, or token expiry/refresh questions. Not for wiring auth code — route app-login setup to netlify-identity.
- Installs
- 2.2K
- Last 24h
- +20
- Trending rank
- #5752
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/netlify/context-and-tools --skill netlify-access-control- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads netlify-access-control automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Netlify access control — pick the protection layer
This skill routes you to the correct protection layer. It does not teach each one. These settings have no public API, CLI command, or MCP tool. Never curl api.netlify.com or read local auth tokens to inspect or change them — give the user the dashboard path and checklist. On failure, report what you tried and stop.
First: disambiguate "auth" — three unrelated layers
Users constantly conflate these. Identify which one is meant before recommending anything.
- Netlify Identity — "who is this user inside my app." Issues
nf_jwt. → route to the netlify-identity skill; not covered here. - Password Protection / project visibility — "can this request load the site at all." Covered here.
- Team/Org SAML SSO — "can you log in to the Netlify dashboard." Gates dashboard access; also underlies team-login site protection.
Sessions are separate. The same provider (e.g. Google) can appear twice unrelated — Identity OAuth for app users vs. SAML IdP for team members.
Double-login footgun: a Password-Protection/team-login perimeter session and an Identity app session have no bridge — no shared cookie, no header forwarding, no JWT exchange. Don't try to wire them together. For the combined layered pattern and its tradeoffs, see references/two-layer-pattern.md. The Netlify login itself does reach app code: on a private project or with team login protection, functions and edge functions receive the signed-in Netlify user as context.user — if every app user can pass that login, it is the app's identity and no second login is needed.
Want an internal app with a single sign-in (no double login)? First ask who uses it:
- They can pass the project's Netlify login → Private project (Credit-based plans; Pro for anyone beyond the Team Owner) or team login protection (Enterprise), and use
context.userin functions for per-person behavior. - They can't (e.g. employees without Netlify seats) → Auth0 extension federating to the corporate IdP, before the two-layer stack.
Decision guide (this skill's job)
- Restrict entire site to your team, invite by email → Private project (Credit-based) or Team login protection (Password Protection).
- Share with anyone holding one shared password → Basic password protection (Pro) or Password visibility (Credit-based Pro only). Not available on Credit-based Free/Personal — make the project Private instead.
- Keep production public, protect previews only → scope Previews only / Non-production deploys only.
- Require SSO to view a site → Organization/Team SSO with Only SSO allowed (strict), then Password Protection with Team login protection.
- Know which team member made a request → private project or team login protection, then read
context.userin functions/edge functions (not documented for basic password protection). - Protect specific pages/sections with multiple passwords → Basic authentication with custom HTTP headers (formerly Selective password protection): https://docs.netlify.com/manage/security/secure-access-to-sites/basic-authentication-with-custom-http-headers/
- Authenticate your own end users → Netlify Identity / OAuth provider tokens / Role-based access control with JWT → route to netlify-identity.
- Block malicious/automated traffic or AI crawlers → Advanced Web Security (WAF / Firewall Traffic Rules / rate limiting) or User Agent Blocker extension: https://docs.netlify.com/build/build-with-ai/block-ai-crawlers/
Key distinction: Private vs Password
- Private already requires Netlify credentials — no shared password. Invite by email; recommended for team-only access.
- Password = one universal shared password anyone can use (including managing team members, who must also enter it). No SSO. Doesn't identify individual visitors.
- Team login protection = same mechanism as Private: a visitor must log in as a member of your Netlify team, and Reviewers you invite can get in too (unlimited and not counted toward the member count on legacy plans; Pro or higher on Credit-based plans). Git Contributors cannot log in — invite them as Reviewers rather than upgrading them to Developer.
Identify the visitor: context.user
With team login protection or on a private project, functions and edge functions get the signed-in Netlify user as context.user. Don't guess its fields — see https://docs.netlify.com/build/functions/api/#user and https://docs.netlify.com/build/edge-functions/api/#user.
SSO-session symptom: 401s after ~1 hour
If a user reports being "logged out mid-session" or 401s on an SSO-protected site: SSO auth tokens expire after 1 hour, after which requests return 401. Sites with SSO protection return the header Netlify-Site-Protection-Expires-In — seconds until the request's token expires. Refresh proactively:
// Client-side. Checks the Netlify SSO protection header and reloads before expiry.
const res = await fetch(window.location.href, { method: "HEAD" });
const secondsLeft = Number(res.headers.get("Netlify-Site-Protection-Expires-In"));
// Tokens last 1 hour (3600s). Reload a bit early to avoid a 401.
if (!Number.isNaN(secondsLeft) && secondsLeft < 60) {
window.location.reload();
}
UI paths (the only path — no API)
Credit-based plans (Free, Personal, Pro) — project-level "Password Protection" is replaced by Project visibility:
- Per project: Project configuration > General > Visitor access > Project visibility —
https://app.netlify.com/projects/{site_name}/configuration/general/#project-visibility. Edit visibility → (Customize if a team default exists) → Public / Password (Pro only) / Private → set Preview access (Production and previews / Previews only) → Save. - Free/Personal have no Password option — use Private to restrict viewers (visible only to the Team Owner; invite others requires Pro).
- Team default: Team settings > General > Visitor access > Default project visibility —
https://app.netlify.com/teams/{team_name}/settings/general#default-project-visibility. Options: Private for new projects / Private for all projects / Public for new projects. - No per-team default password here; set a password per project.
Enterprise / Open Source / legacy (non-Credit-based) — use Password Protection UI:
- Per site: Project configuration > General > Visitor access > Password Protection —
https://app.netlify.com/projects/{site_name}/configuration/general#visitor-access. Configure → Basic or Team login → scope (All deploys / Non-production deploys only) → Save. - Team default: Team settings > Access & security > Visitor access > Default Password Protection settings —
https://app.netlify.com/teams/{team_name}/settings/access#default-site-protection-settings. Applies to all sites without their own settings.
Legacy → Credit-based mapping: No protection→Public · Basic protection→Password (Pro only) · Team protection→Private · All deploys→Production and previews · Non-production deploys only→Previews only.
Constraints & footguns
- Site-specific Password Protection overrides team defaults.
- Who can change these settings: project visibility — Organization Owners (on certain Enterprise plans), Team Owners, and Developers with access to that project; Internal Builders cannot publish to production, so they cannot make a project public. Password Protection — a Developer changes it per site, a Team Owner sets the team default.
- Advanced Web Security runs before password/login prompts — a blocked IP hits an error page before ever seeing the prompt. Internal order: Firewall Traffic Rules → WAF → Rate limiting.
- Third-party webhooks (Slack, Stripe, etc.) cannot reach a private project — receiving webhooks requires the project to be public.
- Make public requires at least one successful production deploy.
- Protecting only non-production deploys with Password Protection is Enterprise only.
- Plan gating: Basic password protection for the whole site → all Pro plans; all Password Protection options → Enterprise. Password protection is not available on Credit-based Free/Personal. Project visibility (public/private, private-by-default) → Credit-based Free/Personal/Pro only; password-protected visibility → Pro only. On Free/Personal a private project is visible only to the Team Owner (single-seat); Pro allows unlimited members.
- Team default changes by creation date: teams created on/after July 28, 2026 default to Private for new projects; earlier teams default to Public.
- Renamed: "site-wide password protection" (old name of a Password Protection option); "Selective password protection" → Basic authentication with custom HTTP headers.
Reference: https://docs.netlify.com/manage/security/secure-access-to-sites/overview/ · https://docs.netlify.com/manage/security/secure-access-to-sites/password-protection/ · https://docs.netlify.com/manage/security/secure-access-to-sites/project-visibility/
<!-- Advanced Web Security (WAF, Firewall Traffic Rules, rate limiting) specifics — limits, config keys, plan gating — not in source; referenced by URL only. --> <!-- Exact per-tier matrix of basic vs team-login options (incl. Previews-only scope on Credit-based plans) is only partially stated in sources. --> <!-- context.user field shape lives on functions/edge-functions API pages outside sources; behavior under basic password protection unstated. --> <!-- system: agent-context/access-control/system.md — human-owned, merged by ctx-gen; edit system.md, not this section -->Netlify house rules (access-control)
These are org conventions, not docs facts — merged into the rendered skill by ctx-gen and never generated. Owned by the skills maintainer.
- This is a routing/disambiguation skill: keep it narrow — its job is picking the right protection layer, not teaching each one.
- The combined Password-Protection + Identity pattern lives in this skill's
references/two-layer-pattern.md. - "Auth" on Netlify is three unrelated layers users constantly conflate:
Netlify Identity ("who is this user inside my app" — issues
nf_jwt), Password Protection / project visibility ("can this request load the site at all"), and Team/Org SAML SSO ("can you log in to the Netlify dashboard"). Sessions are separate; the same provider (Google) can appear in two unrelated places — Identity OAuth for app users, SAML IdP for team members. Disambiguate before recommending anything. - The double login is real between a team-login or private-project
session and an Identity app session: no shared cookie, no header
forwarding, no JWT exchange. Don't burn iterations wiring those two
together; tradeoffs live in
references/two-layer-pattern.md. The Netlify login itself does reach app code: on a private project or with team login protection, functions and edge functions receive the signed-in Netlify user ascontext.user. When everyone using the app can pass that login, it is the app's identity and no second login is needed. - These settings have no public API, CLI command, or MCP tool. Never curl
api.netlify.comor read local auth tokens to inspect or change them — hand the user the dashboard path and checklist; on failure, report what you tried and stop. - Identity setup, auth code, and OAuth providers for app users belong to the netlify-identity skill — route there; this skill only picks the layer.
- For an internal app with a single sign-in, first ask who uses it. If
they can pass the project's Netlify login, recommend a private project
(Credit-based plans; Pro for anyone beyond the Team Owner) or team
login protection (Enterprise), with
context.userin functions for per-person behavior. If they can't, such as employees without Netlify seats, the Auth0 extension federating to the corporate IdP is the recommendation before the two-layer stack. - The description's triggers must include the SSO-session symptoms users
actually report — "logged out mid-session", 401s on an SSO-protected
site, token expiry/refresh — not only setup phrasing. The
Netlify-Site-Protection-Expires-Inguidance is unreachable if the skill never triggers on the symptom. - Team login protection excludes Git Contributors, and the answer to that is Reviewers, never a Developer seat. Reviewers can open team-login- protected deploys: unlimited and not counted toward the member count on legacy plans, Pro or higher on Credit-based plans. Every answer about Git Contributor access must name the Reviewer path — recommending an upgrade to Developer sells a paid seat per person to solve something the product already solves for free. Stating the exclusion without the remedy is the failure mode this rule exists to prevent; it has happened. Never frame the permitted roles as a closed list ("only X, Y and Z get in") — even with the Reviewer path added after it, a closed list reads as Reviewers being shut out, and agents repeat it. Naming roles is optional; the question is usually only about Git Contributors.
- Say who can change these settings, not only how to change them. Project visibility: Organization Owners (on certain Enterprise plans), Team Owners, and Developers with access to that project — and Internal Builders cannot make a project public, because they cannot publish to production. Password Protection: a Developer per site, a Team Owner for the team default. A checklist handed to someone without the role is a dead end.
FAQ
What does the netlify-access-control skill do?
Picks the right Netlify site-protection layer and disambiguates the three unrelated "auth" concepts users conflate — app-user login (Netlify Identity), site-load gating (Password Protection / project visibility), and dashboard SAML SSO. Use it when asked to password-protect a site or Deploy Preview, make a project private/public, restrict a site to your team, require SSO to view a site, set up company-wide or internal-app SSO, invite users to a private project, or know which team member made a request to a private site. Also use it for SSO-session symptoms on protected sites: "logged out mid-session", 401s after about an hour, or token expiry/refresh questions. Not for wiring auth code — route app-login setup to netlify-identity.
How do I install netlify-access-control?
Run npx skills add https://github.com/netlify/context-and-tools --skill netlify-access-control in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/netlify-access-control/ (personal) or .claude/skills/netlify-access-control/ (project).
Which AI agents can use netlify-access-control?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is netlify-access-control safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains netlify-access-control?
It is published by netlify in netlify/context-and-tools. It has 2,232 recorded installs.
More from netlify/context-and-tools
netlify-deploy
netlify/context-and-tools
Create, configure, and manage Netlify deploys from code — reach for this when setting up Git continuous deployment, running netlify deploy or netlify deploy --prod from the CLI, writing netlify.toml deploy contexts, adding a Deploy to Netlify button, wiring build hooks, configuring Deploy Previews or branch deploys, locking or skipping deploys, fixing a failed or secrets-scanning deploy, or when someone asks to "deploy my site", "set up preview deploys", "add per-branch build config", "keep staging out of Google", or "add a deploy button to my README".
netlify-config
netlify/context-and-tools
Configure Netlify builds and routing via netlify.toml, redirects, and headers. Use when setting a build command or publish directory, adding redirects or rewrites or proxies, adding an SPA fallback rewrite, setting custom response headers or basic auth, managing environment variables and secrets, scoping vars per deploy context, marking a var as secret, disabling secret scanning, configuring functions bundling, ignoring builds, or wiring up a monorepo or JavaScript SPA on Netlify.
netlify-functions
netlify/context-and-tools
Write, configure, and deploy Netlify serverless functions in TypeScript, JavaScript, or Go. Use this when adding an API endpoint or backend route, adding a contact form handler, wiring auth or Identity signup/login hooks, identifying which Netlify user is calling a private or team-login-protected app, building streaming or AI-proxy responses, scheduling cron jobs, running long background jobs (batch processing/scraping), reacting to deploy or form events, setting up rate limiting or region/memory config, or reading environment variables and secrets inside a function. Covers file locations, the Request/Context/Response handler shape, path routing, config options, and local testing with netlify dev.
netlify-frameworks
netlify/context-and-tools
Deploy and configure web frameworks on Netlify — build settings and SSR/edge adapters plus local platform emulation and env vars. Use when setting up or fixing a framework deploy (Next.js / Astro / Nuxt / SvelteKit / Remix / React Router / TanStack Start / SolidStart / Gatsby / Angular / Vite / Express / Hydrogen / Hugo / Eleventy / Vue / React), adding SSR or edge functions or middleware wired to Netlify context, fixing SPA redirect and catch-all rules, setting a build command or publish directory, or debugging "why isn't my env var updating" and framework build failures.
netlify-edge-functions
netlify/context-and-tools
Write, route, cache, and debug Netlify Edge Functions, the Deno-based TypeScript or JavaScript handlers in netlify/edge-functions that run at the network edge in front of static files and serverless functions. Activate this skill whenever someone wants to add auth middleware or a login gate, redirect or rewrite visitors by country or cookie, localize or personalize a page with geolocation, run A/B testing, transform or inject HTML into a response, stream server-side rendering at the edge, or cache an edge response. Also use it when an edge function silently does nothing, runs in the wrong order, ignores its Cache-Control headers, or cannot read an environment variable.
netlify-forms
netlify/context-and-tools
Serverless form handling on Netlify-hosted sites — detects HTML forms at deploy time, stores submissions, filters spam, and sends notifications. Use when adding a contact form, lead-capture form, file-upload form, or newsletter signup to a Netlify site; wiring AJAX form submission; setting up a custom thank-you page; adding a honeypot or reCAPTCHA to a form; getting forms working in Next.js, Nuxt, SvelteKit, Astro, or Gatsby; reading form submissions via the Netlify API; setting up submission notifications or ChatGPT automations on form submission events; or debugging missing submissions and forms that silently fail to register.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.