Skip to main content

How to use these prompts

You can copy the prompts and paste them into your AI assistant or IDE. Some ideas on how to use them:
  • Add them as “project rules” in Cursor -> Guide
  • In GitHub Copilot, save the prompt to a file in your project and reference it using #<filename>.
  • In Claude Code, include the prompt in your CLAUDE.md file. (recommend for best results)

Prompt

HankoAuth Solid Component

HankoProfile Solid Component

Logout Button Component

Router Setup

Page Components


4. OUTDATED PATTERNS TO AVOID


5. AI MODEL VERIFICATION STEPS

Before returning any Hanko-related solution, you must verify:
  1. Environment: Is VITE_HANKO_API_URL configured with VITE_ prefix?
  2. Registration: Is register() called in onMount for each component?
  3. Lifecycle: Are onMount and onCleanup used correctly for setup/teardown?
  4. Navigation: Is useNavigate from @solidjs/router used for redirects?
  5. Events: Are session events handled with hanko.onSessionCreated()?
  6. Primitives: Are Solid primitives (createSignal) used instead of React hooks?
  7. Router: Is @solidjs/router used for navigation functionality?
  8. Error Handling: Are register() and logout() calls wrapped with try-catch?
If any check fails, stop and revise until compliance is achieved.