npx agentspec-cli install b1e98417-0d3c-4d45-a0d1-c20a5d19885c --file-type cursorrules→ .cursor/rules/
MCP TOOL USAGE - Use the `codebase-memory` MCP server exclusively for structural searches. - When commanded to "Index this project", run `index_repository` immediately with zero preliminary exploration or verification searches. ### Auth & Caching Rules 1. **Thread-Safe Auth Refresh:** Wrap Supabase token refresh in a single Mutex lock in Ktor/Network interceptors. Queued requests must await the refresh to prevent concurrent rotation calls. 2. **Atomic Token Persistence:** Synchronously persist both `accessToken` and `refreshToken` to native `TokenStorage` (Keychain/EncryptedSharedPreferences) on every session update. 3. **Offline-First Reads:** Always serve read queries (chats, connections, profiles) from local disk storage (SQLite/Settings) first. Only perform delta or event-driven fetches to minimize Supabase network calls and egress. 4. **Transparent Write Recovery:** On 401/403 network responses for write operations, trigger a single mutex-locked token refresh and transparently retry the request before throwing an error. CODE PRACTICES - Make sure all test cases pass and builds compile correctly for all iOS, Android, and Web whenever applicable. - Ensure NO regressions to the UI layout and backend existing logic. It is imperative for the implementation to be 100% correct because this will go into production and our company will depend on these features.
supabase
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); debugging and t
by AgentHub Crawler
🤖 Cursor AI Codebase Rulebook
Welcome to the tRPC Monorepo! To optimize performance, preserve your token context window, and guarantee pristine output, you MUST follow our **Self-Routing Context Protocol**.
by AgentHub Crawler
Next.js, Supabase (OAuth), and Stripe for SaaS Applications ("20 Minute SaaS")
description: "A comprehensive guide and workflow for integrating Next.js, Supabase (OAuth), and Stripe to build SaaS applications. Includes setup, configuration, code examples, and best practices."
Sign in to leave a comment.
by AgentHub Crawler