add-2fa
Skill50 starsChanged 20 days agoApache-2.0View on GitHub
Add two-factor authentication (2FA TOTP) to an existing T3 project's login. Orchestrator - asks which authenticator app the user wants, detects whether the project uses admin auth (single fixed login) or user accounts, and delegates to the right setup. Admin mode - 2FA is mandatory for the single admin, secret + backup codes stored in the Bitwarden vault. User mode - 2FA is optional per user, each user enables it from their account page, secrets + backup codes stored per-user in the database. Requires the project to already have hypervibe auth (`/add-auth`).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- flavien-ia/hypervibe-craftword for word, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 1
- flavien-ia/hypervibe-craft★ 50100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository89 other files it gives its agents.
- accessibilitySkill
- add-agent-dashboardSkill
- add-aiSkill
- add-analyticsSkill
- add-authSkill
- add-automationSkill
- add-backup-dbSkill
- add-collabSkill
- add-cronSkill
- add-dark-modeSkill
- add-dbSkill
- add-domainSkill
- add-emailSkill
- add-github-authSkill
- add-google-authSkill
- add-i18nSkill
- _add-keyringSkill
- add-mapSkill
- add-notification-centerSkill
- add-push-notificationSkill
- add-pwaSkill
- add-roleSkill
- add-routineSkill
- add-storageSkill
- add-stripeSkill
- add-testSkill
- bootstrapSkill
- _check-depsSkill
- cleanSkill
- _collect-secretSkill
- _convert-to-turborepoSkill
- _create-agentSkill
- _create-cloudflare-workerSkill
- _create-contact-pageSkill
- _create-render-workerSkill
- _create-routineSkill
- _create-workflowSkill
- delete-projectSkill
- _detect-project-rootSkill
- _dns-brevoSkill
- _dns-cloudflareSkill
- _dns-gandiSkill
- _dns-godaddy-manualSkill
- _dns-hostingerSkill
- _dns-infomaniak-manualSkill
- _dns-ionos-manualSkill
- _dns-lwsSkill
- _dns-namecheapSkill
- _dns-ovhSkill
- _dns-porkbunSkill
- _dns-resendSkill
- _dns-squarespace-manualSkill
- eco-auditSkill
- _ensure-aiSkill
- _ensure-vaultSkill
- _generate-secretSkill
- geoSkill
- _get-secretSkill
- gscSkill
- _hash-passwordSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 16
Use plain, non-technical business language.
- Distinctive: line 17
When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Very specific: line 50
Already installed: if <WEB_DIR>/src/lib/auth-2fa.ts (admin) or a per-user 2FA table already exists → say so and offer to regenerate rather …
≈ “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
Add 2FA - Orchestrator
Adds two-factor authentication (TOTP code from an authenticator app) to the project's login. This skill is an orchestrator: it asks which app to use, detects the auth mode, and delegates to the right sub-skill (hidden, prefixed with _):
- Admin mode (single login) →
_setup-2fa-admin: 2FA mandatory, secret + codes in the Bitwarden vault. - User mode (accounts) →
_setup-2fa-users: 2FA optional per user (each one enables it from their account), secrets + codes in the database per user.
Communication
- Detect the user's language from the conversation (the user's own messages, anywhere in the session - not just this invocation: a bare slash command like
/bootstrapcarries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim. - Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
- When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Show progress as a short natural-language checklist (in-progress and done states).
Step 0 - Detect the project
Invoke _detect-project-root → PROJECT_NAME, WEB_DIR, IS_NEXTJS. Abort if IS_NEXTJS=no.
Step 1 - Detect the auth mode
Read the marker:
[ -f "<WEB_DIR>/src/server/auth.ts" ] && grep -E "^// hypervibe:auth-modes" "<WEB_DIR>/src/server/auth.ts" | head -1No file / no marker → no auth installed. 2FA needs an auth ; offer to install one (don't just stop). Explain:
Two-factor authentication sits on top of an authentication, and your project doesn't have one yet. I can install one now, then add 2FA right after.
Use the askUser tool:
Do you want me to install an authentication first?
- "Yes - an admin interface (a single protected login, for you)"
- "Yes - user accounts (your visitors create an account)"
- "No, not now"
Depending on the answer:
- admin or users → read and execute
add-auth(telling it the chosen mode). Once it's done, re-read the marker (grepabove), recomputeMODE, and continue to Step 2. - no → stop cleanly ("OK, come back whenever:
/add-2faonce the auth is in place").
- Marker =
admin→MODE = admin. - Marker contains
users(usersoradmin, users) →MODE = users. (Foradmin, users, we handle the user 2FA: that's the flow that concerns the accounts; the optional admin login keeps its password.) - Already installed: if
<WEB_DIR>/src/lib/auth-2fa.ts(admin) or a per-user 2FA table already exists → say so and offer to regenerate rather than re-running.
Step 2 - Ask for the authenticator app
Use the askUser tool (this is the first thing we ask):
Which authenticator app do you want to use for the 6-digit codes?
Suggestions: "Google Authenticator", "Microsoft Authenticator", "Authy", "1Password (or another manager)".
Capture in AUTH_APP. TOTP is an open standard → the same QR works everywhere; the answer is used to tailor the final instructions. Don't block if the user names another one.
Step 3 - Delegate to the right sub-skill
Pass PROJECT_NAME, WEB_DIR, AUTH_APP to the sub-skill:
MODE = admin→ read and execute_setup-2fa-admin.MODE = users→ read and execute_setup-2fa-users.
The sub-skill handles everything (installation, secret security, summary). When it hands back, it's done - the orchestrator has nothing to add.
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.

