auth
Skill2 starsChanged 9 months agoMITView on GitHub
Generate base authentication feature scaffold with Clean Architecture. Creates shared auth infrastructure (AuthRepository, AuthNotifier, UserProfile, LoginScreen) that /social-login and /phone-auth extend. Run after /core, before specific auth methods.
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
After /core skill completes
- Very specific: line 14
Before adding specific auth methods (/social-login, /phone-auth)
- Distinctive: line 55
Use AskUserQuestion to gather:
- Distinctive: line 62
Create standard Clean Architecture feature:
- Very specific: line 149
After running /auth, run these skills based on your selection:
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Auth - Base Authentication Scaffold
Creates the authentication feature foundation with Clean Architecture. This skill generates shared infrastructure that /social-login and /phone-auth build upon.
When to Use This Skill
- After
/coreskill completes - Before adding specific auth methods (
/social-login,/phone-auth) - Setting up auth from scratch
- User asks to "add authentication" or "create auth"
Questions to Ask
- Backend type: Supabase or Custom API?
- Auth methods: (multi-select) Social Login, Phone OTP, Email/Password
- User profile fields: Custom fields beyond id/email? (e.g., displayName, avatarUrl)
What This Skill Creates
Base auth infrastructure that specific auth skills extend:
| Component | Purpose | Extended By |
AuthRepository | Base interface (signOut, getCurrentUser) | social-login, phone-auth |
AuthNotifier | State management with disposal safety | All auth screens |
AuthState | Sealed states (loading, authenticated, error) | All auth screens |
UserProfile | User model | All auth methods |
AuthResult | Sign-in result with isNewUser flag | social-login, phone-auth |
LoginScreen | Base scaffold for auth UI | Buttons added by methods |
AuthFailure | Base failure types | Extended by methods |
Reference Files
reference/
├── models/ # UserProfile, AuthResult
├── repositories/ # Interface, Supabase impl, mock
├── providers/ # AuthState, AuthNotifier
├── screens/ # LoginScreen scaffold
└── failures/ # Base auth failure typesSee: implementation-guide.md for complete file list.
Workflow
Phase 1: Ask Questions
Use AskUserQuestion to gather:
- Backend type (Supabase vs Custom API)
- Which auth methods needed
- Custom user profile fields
Phase 2: Generate Structure
Create standard Clean Architecture feature:
lib/features/auth/
├── data/ # models/, repositories/
├── domain/ # failures/, repositories/
├── presentation/ # providers/, screens/
└── i18n/ # auth.i18n.yamlSee: implementation-guide.md for complete structure.
Phase 3: Copy Reference Files
- Copy models from
reference/models/ - Copy repository interface from
reference/repositories/ - Copy implementation (Supabase or API base)
- Copy providers from
reference/providers/ - Copy login screen scaffold from
reference/screens/
Phase 4: Register Providers
Add to lib/core/providers.dart:
@riverpod
AuthRepository authRepository(Ref ref) {
if (DebugConstants.useMockAuth) {
return MockAuthRepository();
}
return AuthRepositoryImpl(Supabase.instance.client);
}Phase 5: Add Routes
Add to lib/core/router/app_router.dart:
GoRoute(
path: '/login',
builder: (context, state) => const LoginScreen(),
),Phase 6: Run Build
dart run build_runner build --delete-conflicting-outputsCore API
// Check current auth state
final user = await repository.getCurrentUser();
// Sign out
await repository.signOut();
// Listen to auth changes
repository.authStateChanges.listen((user) => ...);Auth States
| State | When | UI |
initial | App start, checking auth | Splash |
loading | Sign-in in progress | Loading indicator |
authenticated(user) | User signed in | Navigate to home |
unauthenticated | No user / signed out | Show login |
error(message) | Auth failed | Error + retry |
Base Failure Types
| Type | When | UI Action |
AuthNetworkFailure | Connection error | Retry button |
AuthServerFailure | Backend error | Generic error |
AuthSessionExpiredFailure | Token expired | Re-login |
AuthUnknownFailure | Unexpected error | Generic error |
Specific auth methods add their own failure types (see /social-login, /phone-auth).
Next Steps
After running /auth, run these skills based on your selection:
| If Selected | Run | Creates |
| Social Login | /social-login | Google + Apple Sign-In |
| Phone OTP | /phone-auth | Phone verification |
| Email/Password | (built-in) | Email auth methods |
Then:
/i18n auth- Localize strings/design- Polish UI/testing auth- Write tests
Integration Architecture
┌─────────────────────────────────────────────────────────┐
│ LoginScreen │
│ ┌────────────┐ ┌────────────┐ ┌────────────────────┐ │
│ │ Email Form │ │ Social Btns│ │ Phone Number Input │ │
│ │ (built-in) │ │(/social) │ │ (/phone-auth) │ │
│ └─────┬──────┘ └─────┬──────┘ └─────────┬──────────┘ │
└────────┼──────────────┼──────────────────┼─────────────┘
│ │ │
┌────┴──────────────┴──────────────────┴────┐
│ AuthNotifier │
│ signInWithEmail | signInWithGoogle | ... │
└──────────────────┬────────────────────────┘
│
┌──────────────────┴────────────────────────┐
│ AuthRepository │
│ implements: SocialAuthRepo, PhoneAuthRepo │
└───────────────────────────────────────────┘Guides
| File | Content |
| implementation-guide.md | Step-by-step with code examples |
| checklist.md | Implementation verification |
Checklist
- AuthRepository interface created with signOut, getCurrentUser, authStateChanges
- AuthNotifier extends AsyncNotifier with disposal safety
- AuthState is sealed (initial, loading, authenticated, unauthenticated, error)
- UserProfile model created with required fields
- Repository implementation matches backend type (Supabase/Custom)
- Provider registered in
lib/core/providers.dart - Login route added to router
build_runnerexecuted successfully- Mock repository created for testing
Related Skills
/social-login- Google + Apple Sign-In (extends auth)/phone-auth- Phone OTP (extends auth)/core- Run before auth (creates services)/design- Login screen UI polish/i18n- Localized auth strings
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- openai/plugins★ 7.4ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- microsoft/apm★ 4.2ksame name
- danielmeppiel/apm★ 4ksame name
- crbnos/carbon★ 2.8ksame name
- vercel/vercel-plugin★ 323same name
- kagenti/kagenti★ 300same name
- kid-sid/claude-spellbook★ 190same name
- YepAPI/skills★ 8same name
10 more not listed
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.
Used alongsideProjects with it also use error-handling, logging and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 5 projects that use this
diego-tobalinaSkilllogging
Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.
Also in 3 projects that use this
wrsmith108Skilldocker
Container-based development for isolated, reproducible environments. Use when running npm commands, installing packages, executing code, or managing project dependencies. Trigger phrases include "npm install", "run the build", "start the server", "install package", or any code execution request.
Also in 3 projects that use this
SentrySkillgithub-issues
Create, update, comment on, label, and inspect GitHub issues with concise, evidence-backed content. Use when users ask to open, edit, view, close, reopen, or triage GitHub issues — including tracking bugs, features, or tasks. Prefer this skill over generic repository tools for issue operations; do not use for pull requests, branches, pushes, or PR creation order questions.
Also in 3 projects that use this
SentrySkillui-design
Also in 3 projects that use this
MicrosoftSkilltypescript
TypeScript best practices for this monorepo. Use this skill when: (1) writing new TypeScript code, (2) reviewing TypeScript code, (3) working with API responses, fetch calls, or JSON parsing, (4) adding or modifying types and interfaces.
Also in 3 projects that use this
- +1 more from microsoft
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11ySkill
- account-deletionSkill
- analyticsSkill
- ci-cdSkill
- coreSkill
- dataSkill
- deep-linkingSkill
- designSkill
- domainSkill
- feature-initSkill
- flavorsSkill
- force-updateSkill
- i18nSkill
- in-app-purchasesSkill
- initSkill
- local-authSkill
- network-connectivitySkill
- offlineSkill
- phone-authSkill
- planSkill
- presentationSkill
- push-notificationsSkill
- releaseSkill
- skill-createSkill
- social-loginSkill
- testingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

