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.
git clone --depth 1 https://github.com/netlify/context-and-toolsWrote 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.
[](https://agentmods.dev/rules/netlify/context-and-tools/netlify-identity)<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-identity"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-identity/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.
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-identity"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-identity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00126 | $0.03774 |
| Opus 5.5 | $0.00050 | $0.01510 |
| Sonnet 5.5 | $0.00025 | $0.00755 |
| Haiku 4.5 | $0.00013 | $0.00377 |
Grade C, and why
netlify-identity 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 27d 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/identity/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.
> **Identity config is dashboard-only. There is no public API.** Never curl `api.netlify.com` to flip or read Identity settings, never read tokens from local Netlify config, and never probe undocumented endpoints. Enable How it starts
The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Netlify Identity
Use @netlify/identity (npm). For new projects it replaces the legacy netlify-identity-widget and gotrue-js. Do not reach for those.
npm install @netlify/identity
Framework examples (Next.js/Astro/Remix/SvelteKit) and the full API reference are in the @netlify/identity README on npm.
Identity does not run under
netlify dev. Test all auth flows on a deploy. Deploy Previews work. Local dev will not complete signup/login/OAuth.
Identity config is dashboard-only. There is no public API. Never curl
api.netlify.comto flip or read Identity settings, never read tokens from local Netlify config, and never probe undocumented endpoints. Enable and configure Identity athttps://app.netlify.com/projects/{site_name}/identity.
Never build a from-scratch OAuth flow alongside Identity. No provider app registration in code, no
client_id/secretin source, and no custom callback token exchange. UseoauthLogin()+handleAuthCallback(). Raw OAuth beside Identity is the most common source of rework.
Client auth (browser)
import { signup, login, logout, getUser, oauthLogin, handleAuthCallback } from '@netlify/identity'
// Register — confirmation email sent by default (unless autoconfirm is on)
const user = await signup('[email protected]', 'securepassword', { full_name: 'Jane Doe' })
// Log in / out
await login('[email protected]', 'securepassword')
await logout()
// Current user or null
const current = await getUser()
if (current) console.log(`Logged in as ${current.email}`)
// External provider — redirects the browser; provider is one of
// 'google' | 'github' | 'gitlab' | 'bitbucket'
oauthLogin('github')
handleAuthCallback()is mandatory on your landing page. Without it, OAuth redirects, email-confirmation links, password-recovery links, and invite links never complete. Call it on page load.
Invites are NOT logged in by
handleAuthCallback(). For an invite it returnstype === 'invite'with the token inresult.tokenandresult.user === null. The account does not exist yet. You must collect a password and callacceptInvite(result.token, password). If you skip this step, invited users never get an account.
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.
- 27d ago Changed · +30 lines · +5 tokens per session 4d9984970a27
- 2mo ago Changed · +6 lines c4bf0ab593ee
- 2mo ago Changed · -32 lines · -2 tokens per session 4d79bd826276
- 3mo ago First seen · 294 lines · 123 tokens per session scan C c163aafc1aee
netlify-identity is a cursor rule published in the GitHub repository netlify/context-and-tools (58 stars, last pushed 4d ago), licensed MIT. It adds 126 tokens to every session and 3,774 once invoked, about $0.0005 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.
netlify-identity compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| netlify-identitynetlify/context-and-tools | Cursor rule | 58 | 4d ago | MIT | C | 126 | Cursor |
| djangosanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 8d ago | CC0-1.0 | A | 2,043 | Cursor |
| api-property-optionality-hygienenovuhq/novu | Cursor rule | 40k | today | none | A | 0 | Cursor |
| cursormrwogu/promptscript | Cursor rule | 324 | yesterday | MIT | A | 53 | Cursor |
| pythonPatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 734 | Cursor |
| gosupertokens/create-supertokens-app | Cursor rule | 24 | 4d ago | Apache-2.0 | A | 0 | Cursor |
| ehs-ims-conventionsSafetyMP/Autonomous-EHS-Management | Cursor rule | 9 | 2d ago | Apache-2.0 | A | 722 | Cursor |