Vibe Coding Prompts

Authentication Flow Implementation Planner

Plan sign-up, sign-in, recovery, session, and authorization behavior for an AI-built app before authentication code is generated.

FreeClaudeChatGPT
Best for

Vibe coders adding authentication who need a complete flow and authorization plan instead of a copied login snippet.

Suitable LLM groups
FrontierReasoning
Download Prompt.md
Prompt
You are an application security engineer who specializes in practical authentication and session flows for small web applications.

Inputs:
1. App, users, and protected actions: {{app_context}}
2. Authentication provider and technology stack: {{auth_stack}}
3. Required sign-up, sign-in, recovery, and account flows: {{required_flows}}
4. Roles, permissions, and sensitive data: {{access_context}}
5. Security, privacy, UX, and deployment constraints: {{constraints}}

Do the following:
1. Map every authentication state, including anonymous, pending verification, authenticated, expired, locked, recovery pending, and signed out, plus the transitions between them.
2. Separate authentication from authorization and define server-side enforcement for every protected resource and action rather than relying on hidden interface elements.
3. Specify session storage, expiration, refresh, logout, device handling, redirect safety, error behavior, rate limits, and account-recovery safeguards using the provider's supported patterns.
4. Define user-facing screens and messages for success, invalid credentials, duplicate accounts, expired links, provider outages, and inaccessible email without exposing account existence unnecessarily.
5. Produce an implementation sequence, route and middleware matrix, state diagram in text, test cases, environment-variable checklist, and security review points. Flag provider-specific details that must be verified against current documentation.

How to use

  1. List protected resources and actions, not only user roles.
  2. Name the actual authentication provider and framework.
  3. Include invitation, recovery, and session-expiry requirements.
  4. Verify provider-specific implementation details before coding.

Example input

App: Private family document vault. Stack: Remix, TypeScript, PostgreSQL, and Clerk. Flows: invitation-only account creation, email sign-in, passwordless recovery, sign out all devices, and invitation expiration. Roles: vault owner and member; only owners can invite or permanently delete files. Constraints: EU hosting, no social login, sessions expire after 12 hours of inactivity, deleted-account emails must not reveal stored filenames.

Example output

The plan defines invitation, verification, active-session, expired-session, revoked-member, and recovery states. Clerk confirms identity, while server loaders and actions enforce vault membership and owner permissions for every resource. It includes safe redirects, generic recovery responses, invitation expiry, all-device revocation, 12-hour idle behavior, and tests for cross-vault access, revoked sessions, expired links, and hidden owner-only controls backed by server denial.

Customization tips

  • Use server-side authorization for every write.
  • Add abuse and cross-account access tests.
  • Define what happens when email access is lost.
  • Keep secrets and callback URLs environment-specific.

Tags

#authentication#session-management#authorization#app-security#vibe-coding

FAQ

What is this prompt for?
It designs the full authentication, session, recovery, and authorization flow for an application.
How should I customize it?
Provide the app, users, provider, framework, account flows, roles, sensitive actions, session rules, and deployment constraints.
Are there any limitations?
It is not a penetration test, and provider APIs or recommended patterns may change; verify the final implementation against current documentation.
How is it different from a basic prompt?
It separates identity from resource authorization and covers every state, redirect, recovery path, session rule, error case, and server-side access test.
Free

AI-Generated Code Change Reviewer

Review an AI-generated patch against the requested behavior, repository conventions, security boundaries, and regression risks before accepting it.

ClaudeChatGPT
#ai-code-review#generated-code#change-review
Free

Database Migration Change Planner

Plan a schema or data change for an AI-built app with compatibility, backfill, validation, rollback, and deployment sequencing.

ClaudeChatGPT
#database-migration#schema-evolution#data-backfill
Free

AI Coding Context Pack Builder

Create a compact, reliable context pack that helps an AI coding assistant understand an existing app before making changes.

ClaudeChatGPT
#vibe-coding#codebase-context#ai-coding

Related Skills

Safety, Privacy & ComplianceFree

Secure Authentication Flow Reviewer

Review authentication and session flows for account security, token handling, authorization boundaries, recovery, abuse, and operational controls.

ClaudeChatGPTCursor
#authentication security#session management#OAuth
API & Integration BuildingFree

API Integration Scaffold Generator

Generates a working code scaffold — auth, request wrapper, error handling, and rate-limit retry logic — for integrating any REST API.

ClaudeChatGPTCursor
#api-integration#rest-api#boilerplate

Related Articles

Article · Vibe Coding

How do I use AI tools like Lovable or Cursor to build an app?

AI app builders work best when users provide a scoped feature request, data model, user flow, UI constraints, acceptance criteria, and test cases.

Jul 9, 20268 min read
Read How do I use AI tools like Lovable or Cursor to build an app?
Article · Vibe Coding

What is vibe coding, and where does it break?

Vibe coding can help users prototype quickly with natural language, but it breaks when requirements, security, data model, testing, and maintainability are ignored.

Jul 9, 20268 min read
Read What is vibe coding, and where does it break?
Article · UI & Web Building

How to Plan a Vibe-Coded App Before Building

Learn how to plan a vibe-coded app before asking AI builders like Lovable, Bolt, Replit, Cursor, Codex, or Claude Code to generate it.

Jul 5, 20269 min read
Read How to Plan a Vibe-Coded App Before Building