vercel/flags — reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript SDK for using feature flags in Next.js and SvelteKit apps. I want it to feel simple for developers, they should be able to install one package, create a secret, define a flag in a small file, and call that flag from pages, server components, middleware, or API routes.
It should work even if someone doesn’t use a hosted flag provider, but also make room for adapters for common providers like LaunchDarkly, Optimizely, and Statsig. Include examples, docs, tests, and a clean monorepo setup so it can support multiple packages and demo apps.
Please make the README friendly and practical, with install steps, how to generate the required secret, a tiny “flag on or off” example, and links or placeholders for fuller docs. Look up current Next.js and SvelteKit docs online if you need to.
Want more depth? Deep Reverse