auth-change
Skill2 starsChanged 21 days agoMITView on GitHub
Change accounts and authentication in this repo (Better Auth). Use when adding an account action such as changing a name, email or password, when changing the Better Auth config (plugins, user fields, rate-limit storage), or when creating users.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- berntpopp/genefoundry-routertheir own version, first seen Jul 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- berntpopp/genefoundry-router★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- add-featureSkill
- add-pageSkill
- api-changeSkill
- database-changeSkill
- shadcnSkill
- upgrade-prerelease-depsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read src/server/AGENTS.md first: it lists the Better Auth rules this code depends on.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Auth change
Read src/server/AGENTS.md first: it lists the Better Auth rules this code depends on.
New account action
The browser reaches Better Auth only through server functions; which surface an operation belongs on is ADR 0013. An account action is:
- A server function in
src/lib/auth.functions.tsthat validates its input with Effect Schema (.validator(Schema.toStandardSchemaV1(...)); a lint rule rejects any other validator) and callscallAuthEndpoint. Its schema lives insrc/lib/account-input.ts, where the forms reuse it; a string that reaches Postgres (a name, an email, a token) starts its checks withisFreeOfNul. - Its
METHOD /pathinEXPOSEDinsrc/server/http/auth-endpoints.ts. Not inHTTP_ENDPOINTS, which/api/auth/*answers from outside. - A hook in
src/features/auth/api/built onuseAuthMutation(auth-action.ts), aschange-password.ts. - Any new Better Auth error code in
BETTER_AUTH_CODES(src/server/http/auth-handler.ts), the closed set ofAuthFailureCodes;pnpm typecheckthen fails untilsrc/features/auth/utils/describe-auth-failure.ts(in the 100% coverage gate) gives it a message. - Mail goes through
authMail(src/server/mail/); its text lives inauth-messages.ts. - Tests: component tests through
authFunction(name, answer)andauthCalls(name), integration tests throughcallAuthFunction(name, ...)on a throwaway account (readtests/integration/AGENTS.md).
Auth config change
For plugins, user fields and rate-limit storage:
- Edit
src/server/auth.ts, thensrc/server/db/schema/auth.tsby hand (timestamps staytimestamptz), then follow thedatabase-changeskill. pnpm auth:check(Better Auth'sauth check schema, also run bypnpm check) fails until every table, column, nullability and default the configuration writes exists.- To see what Better Auth would generate, run
pnpm exec auth generate --config src/server/auth.ts --output /tmp/auth-schema.ts -yand port the difference by hand. Its output stays in/tmp;auth.tsis written by hand only.
Users
pnpm user:create <email> <name> creates a verified account; in production, the image's bundled copy does
(node .output/create-user.mjs <email> <name>, docs/operations.md, "First account"). The password comes from
CREATE_USER_PASSWORD, otherwise from stdin: a hidden prompt (asked twice) in a terminal, or the whole input of a
pipe. Public sign-up is AUTH_SIGN_UP=closed by default
(ADR 0003).
Done when
pnpm check and pnpm build && pnpm verify:app pass.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

