跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 netlify-access-control

Netlify Access Control

选取正确的Netlify站点保护层,并分解三个不相干的"自动"概念用户拼接——应用用户登录(Netlify Identify),站点负载地标(Password Protection / project handing),以及仪表板 SAML SSO. 当被要求密码保护一个站点或部署预览,使一个项目成为私有/公有,将一个站点限制在您的团队,要求SSO查看一个站点,建立全公司的应用程序SSO,或者邀请用户参与一个私有项目时使用. 也用于被保护地的SSO会场症状:"记录出会中",大约一个小时后401分,或者表示过期/重新提问. 不用于接线认证代码——路由app-login设置以网易识别.

1567 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

选取正确的Netlify站点保护层,并分解三个不相干的"自动"概念用户拼接——应用用户登录(Netlify Identify),站点负载地标(Password Protection / project handing),以及仪表板 SAML SSO. 当被要求密码保护一个站点或部署预览,使一个项目成为私有/公有,将一个站点限制在您的团队,要求SSO查看一个站点,建立全公司的应用程序SSO,或者邀请用户参与一个私有项目时使用. 也用于被保护地的SSO会场症状:"记录出会中",大约一个小时后401分,或者表示过期/重新提问. 不用于接线认证代码——路由app-login设置以网易识别.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Netlify access control — pick the protection layer、First: disambiguate "auth" — three unrelated layers、Decision guide (this skill's job)、Key distinction: Private vs Password、SSO-session symptom: 401s after ~1 hour、UI paths (the only path — no API)。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/two-layer-pattern.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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 app SSO, or invite users to a private project. 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.

Netlify access control — pick the protection layerFirst: disambiguate "auth" — three unrelated layersDecision guide (this skill's job)Key distinction: Private vs PasswordSSO-session symptom: 401s after ~1 hourUI paths (the only path — no API)Constraints & footgunsNetlify house rules (access-control)

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
netlify-access-control
description
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 app SSO, or invite users to a private project. 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.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 1
  • references/two-layer-pattern.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「netlify-access-control」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-45fdfcdd87f9ace0-%E7%BD%91%E7%BB%9C%E5%8C%96%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6.html
请存为 .cursor/skills/netlify-access-control/SKILL.md 或 .claude/skills/netlify-access-control/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/netlify/context-and-tools 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/netlify/context-and-tools' --list

npx skills add 'https://github.com/netlify/context-and-tools' --skill 'netlify-access-control'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: netlify-access-control description: '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 app SSO, or invite users to a private project. 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.' --- # 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/ ## 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. - **Team login protection** = same mechanism as Private; only **Developers, Team Owners, Billing Admins** get in. **Git Contributors cannot log in** — invite them as **Reviewers** instead, which is the documented path: unlimited and not counted toward the member count on legacy plans; Pro or higher on Credit-based plans. Never answer a Git Contributor access question by upgrading them to Developer. ## 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: ```js // 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. - 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 · 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. 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/ # 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. 1. This is a routing/disambiguation skill: keep it narrow — its job is picking the right protection layer, not teaching each one. 2. The combined Password-Protection + Identity pattern lives in this skill's `references/two-layer-pattern.md`. 3. "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. 4. The double login is real: 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 burn iterations wiring them together; tradeoffs live in `references/two-layer-pattern.md`. 5. 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 — hand the user the dashboard path and checklist; on failure, report what you tried and stop. 6. Identity setup, auth code, and OAuth providers for app users belong to the netlify-identity skill — route there; this skill only picks the layer. 7. For company-wide app-level SSO with a single sign-in (no double login), the Auth0 extension — federating to the corporate IdP — is the recommendation before the two-layer stack. 8. 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-In` guidance is unreachable if the skill never triggers on the symptom.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…