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 Svelte Component

HankoProfile Svelte Component

Logout Button Component

App.svelte with Router

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. Events: Are Svelte event handlers using on:eventName syntax?
  4. Navigation: Is navigate from svelte-routing used for redirects?
  5. Routing: Are Router and Route components from svelte-routing used?
  6. Lifecycle: Is onMount used correctly for component initialization?
  7. Error Handling: Are register() and logout() calls wrapped with .catch()?
  8. Dependencies: Is svelte-routing installed for navigation functionality?
If any check fails, stop and revise until compliance is achieved.