netlify-access-control

netlify-access-control is a cursor rule for Cursor from netlify/context-and-tools. It costs 150 tokens per session (2,700 once invoked), scanned C, original, MIT.

A guide for choosing the correct Netlify protection setting for a deployed website, preview, project, or team.

In plain words
What is it for?
Use it when password-protecting a site or preview, restricting a project to a team, changing visibility, or requiring SSO to view a site.
Why use it?
It prevents confusion between protecting a site from visitors, controlling project visibility, and requiring team SSO, which is the login system for an organization.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when password-protecting a site or preview, restricting a project to a team, changing visibility, or requiring SSO to view a site.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/netlify/context-and-tools/netlify-access-control
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.

Clone the repo
git clone --depth 1 https://github.com/netlify/context-and-tools

Made for: Cursor.

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-access-control

README.md
[![agentmods](https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-access-control/github.svg)](https://agentmods.dev/rules/netlify/context-and-tools/netlify-access-control)
Your own site
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-access-control"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-access-control/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for netlify-access-control

Your own site · 80×15
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-access-control"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-access-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,700 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00150 $0.02700
Opus 5.5 $0.00060 $0.01080
Sonnet 5.5 $0.00030 $0.00540
Haiku 4.5 $0.00015 $0.00270

Measured 26d ago against content hash 3f1175141ec6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

netlify-access-control scanned grade C with 2 findings 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 26d ago.

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/access-control/system.md — human-owned, merged by ctx-gen; edit system.md, not this section -->

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

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 cha
cursor/rules/netlify-access-control.mdc · 137 lines

How it starts

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

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.

  1. Netlify Identity — "who is this user inside my app." Issues nf_jwt. → route to the netlify-identity skill; not covered here.
  2. Password Protection / project visibility — "can this request load the site at all." Covered here.
  3. 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.

Want company-wide app SSO with a single sign-in (no double login)? Recommend the 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 (Pro, Credit-based).
  • 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.
  • 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/

Read the full file on GitHub · 137 lines

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. 26d ago Changed · +18 lines 3f1175141ec6
  2. 29d ago Changed · -47 lines · +13 tokens per session ae2d808b4878
  3. 1mo ago First seen · 166 lines · 137 tokens per session scan C c6d1a24b47d0

Subscribe to this mod's changes

netlify-access-control is a cursor rule published in the GitHub repository netlify/context-and-tools (41 stars, last pushed 2d ago), licensed MIT. It adds 150 tokens to every session and 2,700 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it C with 2 findings (hidden instructions, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.