Toolverse
All skills

clerk-sdk-patterns

by jeremylongshore

Common Clerk SDK patterns and best practices.\nUse when implementing authentication flows, accessing user data,\nor integrating Clerk SDK methods in your application.\nTrigger with phrases like \

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Security
Views
2

About this skill

Common Clerk SDK patterns and best practices.\nUse when implementing authentication flows, accessing user data,\nor integrating Clerk SDK methods in your application.\nTrigger with phrases like \

How to use

  1. Upewnij się, że masz zainstalowany Clerk SDK i skonfigurowany ClerkProvider owijający całą aplikację. Skill wymaga podstawowej wiedzy o React i Next.js.

  2. Dla autentykacji po stronie serwera (Server Components) użyj funkcji auth() z @clerk/nextjs/server do szybkich sprawdzeń tożsamości i uprawnień. Funkcja zwraca userId, orgId i metodę has() do weryfikacji permisji.

  3. Gdy potrzebujesz pełnych danych profilu użytkownika, użyj currentUser() zamiast auth(). Zwraca kompletny obiekt użytkownika z firstName, lastName, emailAddresses i imageUrl.

  4. Po stronie klienta (Client Components) korzystaj z hooków useUser, useAuth, useClerk i useSignIn z @clerk/nextjs. Skill zawiera przykłady ich zastosowania w komponentach oznaczonych 'use client'.

  5. Wyzwól skill pytaniami lub poleceniami zawierającymi frazy takie jak "clerk SDK", "clerk patterns", "clerk best practices" lub "clerk API usage". Skill dostarczy odpowiedni wzorzec kodu dla Twojego przypadku użycia.

  6. Skill obsługuje operacje Read, Write, Edit i Grep, więc możesz go użyć do przeglądania istniejącego kodu, generowania nowych implementacji lub modyfikowania istniejących rozwiązań.

Related skills

reviewing-code

by CaptainCrouton89

Systematically evaluate code changes for security, correctness, performance, and spec alignment. Use when reviewing PRs, assessing code quality, or verifying implementation against requirements.

Security
1493

google-analytics

by davila7

Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements. Use when the user asks about analytics, website metrics, traffic analysis, conversion rates, user behavior, or performance optimization.

Security
1260

payload

by payloadcms

Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.

Security
50171

software-security

by project-codeguard

A software security skill that integrates with Project CodeGuard to help AI coding agents write secure code and prevent common vulnerabilities. Use this skill when writing, reviewing, or modifying code to ensure secure-by-default practices are followed.

Security
1678

ui-audit

by openclaw

AI skill for automated UI audits. Evaluate interfaces against proven UX principles for visual hierarchy, accessibility, cognitive load, navigation, and more. Based on Making UX Decisions by Tommy Geoco.

Security
1223

gmail-manager

by jeffvincent

Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.

Security
17128