kinde-nextjs

kinde-nextjs is a skill for Claude Code, Codex from ski043/kinde-agent-skills. It costs 89 tokens per session (2,129 once invoked), scanned A, original, MIT.

A guide for adding or fixing Kinde sign-in and organization access in an existing Next.js App Router application.

In plain words
What is it for?
It covers setup, protected routes, server and browser session data, organization-aware access, and login or portal links for production and preview environments.
Why use it?
It helps avoid mixing incompatible Next.js and Kinde versions, exposing server secrets, or treating navigation checks as full authorization.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It covers setup, protected routes, server and browser session data, organization-aware access, and login or portal links for production and preview environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ski043/kinde-agent-skills/kinde-nextjs
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.

Any agent
npx skills add ski043/kinde-agent-skills --skill kinde-nextjs
Clone the repo
git clone --depth 1 https://github.com/ski043/kinde-agent-skills

Made for: Claude Code, Codex.

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 kinde-nextjs

README.md
[![agentmods](https://agentmods.dev/badge/skills/ski043/kinde-agent-skills/kinde-nextjs/github.svg)](https://agentmods.dev/skills/ski043/kinde-agent-skills/kinde-nextjs)
Your own site
<a href="https://agentmods.dev/skills/ski043/kinde-agent-skills/kinde-nextjs"><img src="https://agentmods.dev/badge/skills/ski043/kinde-agent-skills/kinde-nextjs/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 kinde-nextjs

Your own site · 80×15
<a href="https://agentmods.dev/skills/ski043/kinde-agent-skills/kinde-nextjs"><img src="https://agentmods.dev/badge/skills/ski043/kinde-agent-skills/kinde-nextjs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00089 $0.02129
Opus 5 $0.00044 $0.01064
Sonnet 5 $0.00018 $0.00426
Haiku 4.5 $0.00009 $0.00213

Measured 10d ago against content hash 25237eb0b2ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

kinde-nextjs scanned grade A with 0 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate-kinde-nextjs.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/kinde-nextjs/SKILL.md · 204 lines

How it starts

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

Kinde authentication for Next.js App Router

Use a setup contract: inspect the project, record the decisions that control the integration, then implement only against that contract.

Boundaries

  • This skill is for an existing Next.js App Router application on Node 20+.
  • Do not apply Pages Router or Kinde SDK v1 examples. If the project is Pages-only or uses v1 imports/routes, identify it and hand off to the matching migration or Pages Router guidance.
  • Keep KINDE_CLIENT_SECRET server-only and out of tracked files, logs, client code, next.config.*, and every NEXT_PUBLIC_* variable.
  • Treat proxy/middleware checks as navigation and token-refresh assistance, not the final authorization boundary. Re-authorize in every Route Handler, Server Action, and server-side data operation.
  • Navbar exception. In nearly every app, fetch shared navbar session state in a small Client Component with useKindeBrowserClient. Do not call getKindeServerSession from a root or shared layout solely to render account navigation; that introduces a request-time cookie dependency across its route tree. Keep page data and authorization server-first while preserving each child route's intended static or dynamic rendering strategy.
  • Preserve existing behavior. Never replace an existing auth route, proxy.ts, or middleware.ts without reading and deliberately merging it.

Read the branch that applies

  • Read SETUP.md when installing the SDK, configuring Kinde, creating the auth route, choosing a compatible version, or selecting proxy.ts versus middleware.ts.
  • Read PATTERNS.md when adding auth links, protected server pages, Route Handler or Server Action checks, client auth state, permissions, audiences, organizations, or portal links.
  • Read DEPLOYMENT.md when configuring production, Vercel previews, custom subdomains, Cloudflare/OpenNext, or another nonstandard runtime.
  • Read TROUBLESHOOTING.md when auth redirects, callback state, cookies, token refresh, static rendering, health checks, or SDK compatibility fail.
  • Read REFERENCES.md when a time-sensitive claim needs re-verification or the installed SDK conflicts with an example. It records the first-party research snapshot and unresolved upstream conflicts.

Read the full file on GitHub · 204 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 204 lines · 89 tokens per session scan A 25237eb0b2ac

Subscribe to this mod's changes

kinde-nextjs is a skill published in the GitHub repository ski043/kinde-agent-skills (2 stars, last pushed 19d ago), licensed MIT. It adds 89 tokens to every session and 2,129 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

implement-saaskit-nextjs

Implements SaaSKit login in the Next.js App Router so an agent can add login, callback, session cookies, and logout. Use when the user wants SaaSKit Next.js or App Router auth. It does not write generic Node login (that's implement-saaskit) or write Django, FastAPI, or Flask auth (that's implement-saaskit-python).

scalekit-inc/skills · 84 tokens

expose-agentkit-mcp

Exposes AgentKit tools over MCP so a client can call them on a per-user instance URL. Use when the user wants to expose AgentKit over MCP, generate a per-user MCP URL, or connect LangChain via MCP. It does not list connectors (that's discover-connectors) or create a connected account and token in app code (that's…

scalekit-inc/skills · 84 tokens

implement-saaskit-python

Implements SaaSKit login in Django, FastAPI, or Flask so an agent can add login, callback, session cookies, and logout. Use when the user wants SaaSKit Django, FastAPI, or Flask auth. It does not write Node or Next.js login (that's implement-saaskit or implement-saaskit-nextjs).

scalekit-inc/skills · 79 tokens

implement-saaskit

Implements SaaSKit login so an agent can add a login route, a callback, session cookies, and logout. Use when the user wants to add SaaSKit login, a callback, or logout. It does not store, validate, refresh, or revoke a session after login (that's manage-saaskit-sessions) or write Next.js App Router auth (that's…

scalekit-inc/skills · 109 tokens

implement-scim

Implements SCIM so an agent can provision users and groups from a directory. Use when the user wants SCIM or to provision users. It does not write SaaSKit login (that's implement-saaskit) or add SSO (that's implement-sso).

scalekit-inc/skills · 60 tokens

implement-sso

Implements Modular SSO so an agent can add SAML/OIDC, IdP-initiated login, and the admin portal. Use when the user wants SSO, SAML, OIDC, Modular SSO, or IdP. It does not write SaaSKit login (that's implement-saaskit) or provision users from a directory (that's implement-scim).

scalekit-inc/skills · 83 tokens