convex-setup-auth▌
get-convex/agent-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Set up Convex authentication with the right provider, user management, and access control patterns.
- ›Supports multiple auth providers: Convex Auth, Clerk, WorkOS AuthKit, Auth0, and custom JWT, with provider detection from repo signals
- ›Guides you through choosing a provider, configuring client and backend wiring, environment variables, and convex/auth.config.ts setup
- ›Covers authentication checks in protected functions, optional app-level user storage, and authorization patterns for ow
Convex Authentication Setup
Implement secure authentication in Convex with user management and access control.
When to Use
- Setting up authentication for the first time
- Implementing user management (users table, identity mapping)
- Creating authentication helper functions
- Setting up auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom JWT)
When Not to Use
- Auth for a non-Convex backend
- Pure OAuth/OIDC documentation without a Convex implementation
- Debugging unrelated bugs that happen to surface near auth code
- The auth provider is already fully configured and the user only needs a one-line fix
First Step: Choose the Auth Provider
Convex supports multiple authentication approaches. Do not assume a provider.
Before writing setup code:
- Ask the user which auth solution they want, unless the repository already makes it obvious
- If the repo already uses a provider, continue with that provider unless the user wants to switch
- If the user has not chosen a provider and the repo does not make it obvious, ask before proceeding
Common options:
- Convex Auth - good default when the user wants auth handled directly in Convex
- Clerk - use when the app already uses Clerk or the user wants Clerk's hosted auth features
- WorkOS AuthKit - use when the app already uses WorkOS or the user wants AuthKit specifically
- Auth0 - use when the app already uses Auth0
- Custom JWT provider - use when integrating an existing auth system not covered above
Look for signals in the repo before asking:
- Dependencies such as
@clerk/*,@workos-inc/*,@auth0/*, or Convex Auth packages - Existing files such as
convex/auth.config.ts, auth middleware, provider wrappers, or login components - Environment variables that clearly point at a provider
After Choosing a Provider
Read the provider's official guide and the matching local reference file:
- Convex Auth: official docs, then
references/convex-auth.md - Clerk: official docs, then
references/clerk.md - WorkOS AuthKit: official docs, then
references/workos-authkit.md - Auth0: official docs, then
references/auth0.md
The local reference files contain the concrete workflow, expected files and env vars, gotchas, and validation checks.
Use those sources for:
- package installation
- client provider wiring
- environment variables
convex/auth.config.tssetup- login and logout UI patterns
- framework-specific setup for React, Vite, or Next.js
For shared auth behavior, use the official Convex docs as the source of truth:
- Auth in Functions for
ctx.auth.getUserIdentity() - Storing Users in the Convex Database for optional app-level user storage
- Authentication for general auth and authorization guidance
- Convex Auth Authorization when the provider is Convex Auth
Prefer official docs over recalled steps, because provider CLIs and Convex Auth internals change between versions. Inventing setup from memory risks outdated patterns.
For third-party providers, only add app-level user storage if the app actually needs user documents in Convex. Not every app needs a users table.
For Convex Auth, follow the Convex Auth docs and built-in auth tables rather than adding a parallel users table plus storeUser flow, because Convex Auth already manages user records internally.
After running provider initialization commands, verify generated files and complete the post-init wiring steps the provider reference calls out. Initialization commands rarely finish the entire integration.
Core Pattern: Protecting Backend Functions
The most common auth task is checking identity in Convex functions.
// Bad: trusting a client-provided userId
export const getMyProfile = query({
args: { userId: v.id("users") },
handler: async (ctx, args) => {
return await ctx.db.get(args.userId);
},
});
// Good: verifying identity server-side
export const getMyProfile = query({
args: {},
handler: async (ctx) => {
const identity = await ctx.auth.getUserIdentity();
if (!identity) throw new Error("Not authenticated");
return await ctx.db
.query("users")
.withIndex("by_tokenIdentifier", (q) =>
q.eq("tokenIdentifier", identity.tokenIdentifier)
)
.unique();
},
});
Workflow
- Determine the provider, either by asking the user or inferring from the repo
- Ask whether the user wants local-only setup or production-ready setup now
- Read the matching provider reference file
- Follow the official provider docs for current setup details
- Follow the official Convex docs for shared backend auth behavior, user storage, and authorization patterns
- Only add app-level user storage if the docs and app requirements call for it
- Add authorization checks for ownership, roles, or team access only where the app needs them
- Verify login state, protected queries, environment variables, and production configuration if requested
If the flow blocks on interactive provider or deployment setup, ask the user explicitly for the exact human step needed, then continue after they complete it. For UI-facing auth flows, offer to validate the real sign-up or sign-in flow after setup is done. If the environment has browser automation tools, you can use them. If it does not, give the user a short manual validation checklist instead.
Reference Files
Provider References
references/convex-auth.mdreferences/clerk.mdreferences/workos-authkit.mdreferences/auth0.md
Checklist
- Chosen the correct auth provider before writing setup code
- Read the relevant provider reference file
- Asked whether the user wants local-only setup or production-ready setup
- Used the official provider docs for provider-specific wiring
- Used the official Convex docs for shared auth behavior and authorization patterns
- Only added app-level user storage if the app actually needs it
- Did not invent a cross-provider
userstable orstoreUserflow for Convex Auth - Added authentication checks in protected backend functions
- Added authorization checks where the app actually needs them
- Clear error messages ("Not authenticated", "Unauthorized")
- Client auth provider configured for the chosen provider
- If requested, production auth setup is covered too
How to use convex-setup-auth on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add convex-setup-auth
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches convex-setup-auth from GitHub repository get-convex/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate convex-setup-auth. Access the skill through slash commands (e.g., /convex-setup-auth) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★62 reviews- ★★★★★Ren Malhotra· Dec 16, 2024
Solid pick for teams standardizing on skills: convex-setup-auth is focused, and the summary matches what you get after install.
- ★★★★★William Srinivasan· Dec 16, 2024
convex-setup-auth fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Omar Gonzalez· Dec 16, 2024
convex-setup-auth reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Benjamin Tandon· Dec 4, 2024
I recommend convex-setup-auth for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Yuki Robinson· Nov 23, 2024
Solid pick for teams standardizing on skills: convex-setup-auth is focused, and the summary matches what you get after install.
- ★★★★★Shikha Mishra· Nov 11, 2024
Useful defaults in convex-setup-auth — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Carlos Farah· Nov 7, 2024
I recommend convex-setup-auth for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Omar Perez· Nov 7, 2024
We added convex-setup-auth from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Sakura Ramirez· Nov 7, 2024
convex-setup-auth has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Xiao Menon· Oct 26, 2024
Keeps context tight: convex-setup-auth is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 62