Authjs

Auth.js (formerly NextAuth.js) is an open-source authentication library that adds OAuth sign-in, magic links, credentials and WebAuthn to Next.js, SvelteKit, Express and other frameworks. Use when a user asks to add login with Google or GitHub, set up NextAuth v5, protect routes with middleware or proxy, add roles to the session, or connect a database adapter such as Drizzle or Prisma. Notes that the project is in maintenance mode under Better Auth.

213 stars 34 forksDatabases

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add TerminalSkills/skills --skill authjs
Manual install
git clone --depth 1 https://github.com/TerminalSkills/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/authjs ~/.claude/skills/authjs

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Auth.js (NextAuth) — Authentication for the Web

## Overview

Auth.js is the successor to NextAuth.js. For Next.js you install `next-auth@beta` (the v5 line; `latest` on npm is still v4.24). Config lives in one root `auth.ts` that exports `handlers`, `auth`, `signIn` and `signOut`; `auth()` replaces `getServerSession`, `getToken` and `withAuth` everywhere (server components, route handlers, proxy). Environment variables use the `AUTH_` prefix and provider credentials named `AUTH_<PROVIDER>_ID` / `AUTH_<PROVIDER>_SECRET` are picked up automatically.

Status to know before choosing it: since September 2025 the project is maintained by the Better Auth team, in maintenance mode (security fixes, no new features), and Better Auth recommends itself for new projects. Existing Auth.js apps keep working; for a greenfield app, mention Better Auth as the alternative and let the user decide.

## Instructions

1. Install and create the secret:

```bash
npm install next-auth@beta
npx auth secret          # writes AUTH_SECRET to .env.local
```

2. Create `auth.ts` at the project root:

```typescript
import NextAuth from "next-auth";
import Google from "next-auth/providers/google";
import GitHub from "next-auth/providers/github";

export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Google, GitHub],   // reads AUTH_GOOGLE_ID/SECRET and AUTH_GITHUB_ID/SECRET
  pages: { signIn: "/login" },
});
```

3. Add the route handler `app/api/auth/[...nextauth]/route.ts`:
Read the full skill on GitHub

Details

Skill name
authjs
Path
skills/authjs/SKILL.md
License
Apache-2.0
Repo updated
8 November 2026

FAQ

What does the Authjs skill do?

Auth.js (formerly NextAuth.js) is an open-source authentication library that adds OAuth sign-in, magic links, credentials and WebAuthn to Next.js, SvelteKit, Express and other frameworks. Use when a user asks to add login with Google or GitHub, set up NextAuth v5, protect routes with middleware or proxy, add roles to the session, or connect a database adapter such as Drizzle or Prisma. Notes that the project is in maintenance mode under Better Auth.

How do I install the Authjs skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add TerminalSkills/skills --skill authjs. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Authjs popular?

It lives in TerminalSkills/skills, which has 213 GitHub stars and 34 forks.

Related skills

3dsmax Rendering

213

TerminalSkills/skills

Scripts and configures production rendering in Autodesk 3ds Max with the V-Ray and Corona renderers: output size and files, render elements, denoising, light mix, batch and command-line rendering, and network rendering. Use when a user asks to set up a production render, render several cameras in one batch, render from the command line or on a render farm, add render passes for compositing, or cut render time for archviz and product shots.

Other34

3dsmax Scripting

213

TerminalSkills/skills

Covers scripting Autodesk 3ds Max, the 3D modeling and rendering application, with MAXScript and Python (pymxs): scene manipulation, object creation, material assignment, camera and light setup, batch operations, and file I/O. Use when tasks involve automating repetitive 3ds Max workflows, batch processing scenes, running scripts headless with 3dsmaxbatch, creating custom tools, or scripting scene setup for archviz, product visualization, or VFX.

Productivity & Notes34

3proxy

213

TerminalSkills/skills

3proxy is a small open-source proxy server that runs HTTP/HTTPS, SOCKS4/5, SNI and TCP/UDP port-mapping proxies from one config file. Use when a user asks to set up an HTTP or SOCKS5 proxy, add proxy users and passwords, write 3proxy access rules, chain or rotate upstream (parent) proxies, limit bandwidth, connections or monthly traffic per user, run 3proxy in Docker, or fix a 3proxy.cfg that will not start.

DevOps & Cloud34

Baserow

213

TerminalSkills/skills

Build database-powered applications with Baserow, the open-source no-code database. Use when a user asks to create spreadsheet databases, build API-connected workflows, manage relational data, or self-host Baserow as an Airtable alternative.

Databases34

Atuin

213

TerminalSkills/skills

Atuin replaces your shell history file with a searchable SQLite database that records directory, exit code, duration and host for every command, and can sync it end-to-end encrypted between machines. Use when a user asks to "search shell history", "replace Ctrl+R", "sync history across machines", "find the command I ran in this directory", "import bash/zsh history", "see my most used commands" or "self-host Atuin".

Databases34

Cache Strategy

213

TerminalSkills/skills

Design and implement caching layers for APIs and web applications using Redis or Memcached. Use when you need to reduce database load, improve response times, or handle traffic spikes. Covers cache-aside, write-through, and write-behind patterns, TTL strategies, cache invalidation, and stampede prevention. Trigger words: cache, Redis, Memcached, TTL, cache invalidation, response time, throughput, rate limiting.

Databases34

Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.