Migration and generation commands execute an unpinned remote CLI
Source references: 4The workflow repeatedly uses `npx auth@latest`. `npx` may download and execute the currently published CLI rather than the Better Auth version locked by the project. This also conflicts with the Skill's own version-matching guidance.
If the newest release is compromised, affected by a supply-chain incident, or incompatible with the project, it runs with the developer's permissions and may generate an incorrect schema or apply incompatible migrations.
The Skill requires documentation to match the installed project version, yet specifies `auth@latest` for migration and generation. This can run a newer CLI against an older project and alter its database or generated files. Users can require every CLI command to use the resolved compatible version rather than `latest`.
Use documentation that matches the Better Auth version installed in the project. APIs and plugin names can differ across maintained release lines.1. Prefer a version explicitly named by the user.2. Otherwise, inspect the resolved `better-auth` version in the lockfile, falling back to the package manifest when no lockfile is available.3. When the Better Auth MCP is available, call `get_doc` with `/llms.txt` to resolve that package version to a documentation identifier. Pass the identifier to every `search_docs` call and pass result paths to `get_doc` unchanged.4. Without MCP, start at [better-auth.com/llms.txt](https://better-auth.com/llms.txt) and follow the matching version index.5. Use the latest documentation only when the project version cannot be determined or the user explicitly asks about the latest release or an upgrade.Show 3 other places
4. Create route handler for your framework5. Run migrations: - **Built-in adapter:** `npx auth@latest migrate` - **Drizzle:** `npx auth@latest generate --output src/db/auth-schema.ts` then `npx drizzle-kit push` (dev) or `npx drizzle-kit generate && npx drizzle-kit migrate` (prod) - **Prisma:** `npx auth@latest generate --output prisma/schema.prisma` then `npx prisma migrate dev`6. Verify: call `GET /api/auth/ok` — should return `{ status: "ok" }`1. Prefer a version explicitly named by the user.2. Otherwise, inspect the resolved `better-auth` version in the lockfile, falling back to the package manifest when no lockfile is available.3. When the Better Auth MCP is available, call `get_doc` with `/llms.txt` to resolve that package version to a documentation identifier. Pass the identifier to every `search_docs` call and pass result paths to `get_doc` unchanged.5. Run migrations: - **Built-in adapter:** `npx auth@latest migrate` - **Drizzle:** `npx auth@latest generate --output src/db/auth-schema.ts` then `npx drizzle-kit push` (dev) or `npx drizzle-kit generate && npx drizzle-kit migrate` (prod) - **Prisma:** `npx auth@latest generate --output prisma/schema.prisma` then `npx prisma migrate dev`6. Verify: call `GET /api/auth/ok` — should return `{ status: "ok" }`