agentleFS
Atlas-AuthorizationAtlas-Authorization/atlas-claude-skills/skills/atlas-setup/SKILL.md

atlas-setup

Skill0 starsChanged 42 days agoMITView on GitHub

Add Atlas (atlasauth.net) sign-in/auth to a web app — install the right @atlasauth/* package for the framework (Next.js, React/Vite, Vue, Svelte, Astro, etc.), wrap the app in AtlasProvider or add atlasMiddleware, set the publishable + secret key env vars, and drop in SignIn / UserButton / SignedIn / SignedOut. Use when the user wants to add login, authentication, "sign in with Atlas", or set up Atlas in a frontend project.

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. curv-institute/atlas★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read package.json for next, react+vite, vue, @sveltejs/kit/svelte, astro, nuxt, solid-js, @builder.io/qwik, @tanstack/react-start, …

    line 11
  2. Very specific:

    Start the dev server, visit /sign-in, complete a sign-in, confirm <UserButton /> shows the session.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up Atlas auth in an app

Atlas is a Clerk/Auth0-style auth platform. Keys: publishable (pk_live_…/pk_test_…, browser-safe) and secret (sk_live_…/sk_test_…, server-only). Each instance has a per-instance Frontend API (FAPI) host https://<slug>-fapi.atlasauth.net; the Backend API (BAPI) is https://api.atlasauth.net.

1. Detect the framework

Read package.json for next, react+vite, vue, @sveltejs/kit/svelte, astro, nuxt, solid-js, @builder.io/qwik, @tanstack/react-start, expo/react-native. Pick the matching package.

FrameworkPackageAlso installs
Next.js@atlasauth/nextjs@atlasauth/react
React (Vite/CRA)@atlasauth/react
Vue 3@atlasauth/vue
Svelte/SvelteKit@atlasauth/svelte
Astro@atlasauth/astro
Nuxt@atlasauth/nuxt
SolidJS@atlasauth/solid
Qwik@atlasauth/qwik
Expo / React Native@atlasauth/expo / @atlasauth/react-native

Install with the project's package manager, e.g. npm i @atlasauth/nextjs @atlasauth/react (or pnpm add / yarn add). Tip: npm create @atlasauth/atlas-app scaffolds a pre-wired Next.js or React+Vite starter.

2. Set env vars

Frontend keys are PUBLIC-prefixed; the secret key is server-only (never a NEXT_PUBLIC_/VITE_ prefix).

  • Next.js (.env.local):
    NEXT_PUBLIC_ATLAS_PUBLISHABLE_KEY=pk_test_...
    NEXT_PUBLIC_ATLAS_FRONTEND_API=https://<slug>-fapi.atlasauth.net
    ATLAS_JWKS_URL=https://<slug>-fapi.atlasauth.net/.well-known/jwks.json
    ATLAS_ISSUER=https://<slug>-fapi.atlasauth.net
    ATLAS_SECRET_KEY=sk_test_...
  • Vite/React (.env): VITE_ATLAS_PUBLISHABLE_KEY=pk_test_... and VITE_ATLAS_FRONTEND_API=https://<slug>-fapi.atlasauth.net.

3. Wrap the app in the provider

React / Vite — mount <AtlasProvider> at the root:

import { AtlasProvider } from '@atlasauth/react';
<AtlasProvider
  publishableKey={import.meta.env.VITE_ATLAS_PUBLISHABLE_KEY}
  frontendApi={import.meta.env.VITE_ATLAS_FRONTEND_API}
>
  <App />
</AtlasProvider>

Next.js (App Router) — a client component Providers mounted in app/layout.tsx:

'use client';
import { AtlasProvider } from '@atlasauth/react';
export function Providers({ children }) {
  return (
    <AtlasProvider
      publishableKey={process.env.NEXT_PUBLIC_ATLAS_PUBLISHABLE_KEY!}
      frontendApi={process.env.NEXT_PUBLIC_ATLAS_FRONTEND_API!}
    >{children}</AtlasProvider>
  );
}

Vue — install the plugin in main.ts: app.use(createAtlas({ publishableKey: import.meta.env.VITE_ATLAS_PUBLISHABLE_KEY })) (from @atlasauth/vue).

4. Next.js middleware (protect routes at the edge)

middleware.ts at the project root:

import { atlasMiddleware } from '@atlasauth/nextjs';
import { NextResponse, type NextRequest } from 'next/server';
const handle = atlasMiddleware({
  jwksUrl: process.env.ATLAS_JWKS_URL!,
  issuer: process.env.ATLAS_ISSUER!,
  publishableKey: process.env.NEXT_PUBLIC_ATLAS_PUBLISHABLE_KEY,
  signInUrl: '/sign-in',
  publicRoutes: ['/', '/sign-in(.*)'],
});
export function middleware(req: NextRequest) {
  return handle(req as any, NextResponse as any);
}
export const config = { matcher: ['/((?!_next/static|_next/image|favicon.ico|.*\\..*).*)'] };

authMiddleware is a Clerk-parity alias of atlasMiddleware. In server components/route handlers use auth() / currentUser() from @atlasauth/nextjs/server (they read the ambient request; need ATLAS_JWKS_URL + ATLAS_ISSUER).

5. Drop in UI components (@atlasauth/react, same names in Vue/Svelte)

  • <SignIn />, <SignUp /> — full multi-step hosted-style flows (email/password, OAuth, passkeys, MFA).
  • <UserButton /> — avatar + account menu + sign-out; <UserAvatar />.
  • <SignInButton>, <SignUpButton>, <SignOutButton>, <RedirectToSignIn>.
  • <SignedIn> / <SignedOut> — conditionally render by auth state; <AtlasLoading>/<AtlasLoaded>.
  • <Protect condition={...}> — gate UI on a role/permission/plan/feature.
  • Orgs: <OrganizationSwitcher />, <OrganizationProfile />, <CreateOrganization />.
  • Hooks: useUser(), useAuth(), useSession(), useOrganization(), useSignIn(), useSignUp().

Example page: route app/sign-in/[[...rest]]/page.tsx renders <SignIn />; a header renders <SignedIn><UserButton /></SignedIn><SignedOut><SignInButton /></SignedOut>.

6. Verify

Start the dev server, visit /sign-in, complete a sign-in, confirm <UserButton /> shows the session. For protected API routes / backends, hand off to the atlas-verify-backend skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.