init-auth
Add sign-in and access control where the data is actually protected.
A login screen is only part of authentication. This skill inspects the application, helps choose a provider, and follows the request all the way to server-side permission checks. The tests should try to get around those checks, too.
When I’d use it
Use it for sign-in, sessions, ownership, roles, or team access in an existing app. It supports Supabase Auth, Clerk, and Better Auth, subject to what your stack can run.
Before you start
Decide who may access which data and how people should sign in. The agent can recommend a provider, but you choose it. If auth already exists, decide whether to extend it or plan a migration.
Install it. Then give it a task.
Run this in your project’s terminal. Choose your coding agent in the installer, then start a new agent session if it needs one to discover the skill.
$ npx skills add akdevsaha-dev/factory-skills --skill init-authOnce installed, send a prompt like the ones below to your agent. These are example requests to adapt to your own project, not terminal commands or recorded results.
If slash commands aren’t available in your agent, write “Use the init-auth skill to…” and describe the same task.
New to skills? Start with the installation walkthroughWhat happens next
- Reads the app, database ownership, deployment shape, and existing auth.
- Recommends a provider with a reason and asks for the choices that matter.
- Checks current official docs and plans the integration.
- Implements the selected flows and verifies server enforcement and adversarial cases.
A few ways to ask
5 examplesCopy the one closest to your task. Replace names, paths, dates, and refs with ones that exist in your project.
Get a grounded recommendation
› /init-auth inspect this app and recommend a provider. I need email OTP, and each user should only see their own data.State the access rule even if you don’t know which provider you want.
Add Google sign-in
› /init-auth with Supabase Auth. Add Google sign-in and resource ownership checks. Ask me for any provider configuration you need.Provider setup may require action in a hosted service. The skill asks before outward-facing writes.
Use an existing TypeScript backend
› /init-auth with Better Auth for this TypeScript backend. Use our existing database. I need email OTP and user/admin roles; confirm the permissions before implementation.Better Auth needs a compatible server and a database. The skill should inspect those prerequisites.
Add team access
› /init-auth with Clerk. I need organizations where members see only their organization’s projects. Help me define owner, admin, and member permissions first.Organization boundaries need to be defined before the agent can enforce them.
Extend current auth
› Use the init-auth skill to inspect our current Supabase Auth integration and add GitHub sign-in. Keep existing users and sessions working; do not replace the provider.Call out continuity when an auth system is already in use.
What to look for in the result
A provider-backed integration with explicit access rules, server checks, and evidence from relevant tests. Missing credentials or untested provider flows should be called out, not waved away.
A thing worth watching
Hiding a button is not authorization. Ask whether the same request is rejected when sent directly by another user. Don’t paste secrets, session tokens, or OTPs into examples.
Use it with
Build a workflow you can repeat.
Follow the step-by-step guide to working with agents.