agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/firebase-auth/SKILL.md

firebase-auth

Skill2 starsChanged 5 months agoMITView on GitHub

Use for Firebase Auth email/password, Google Sign-In, anonymous auth, auth state, user profile, error handling and authorization-aware UI/data flows.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create or update an AuthRepository boundary.

    line 27
  2. Distinctive:

    Add fakes/tests and rule checks.

    line 30
  3. Distinctive:

    Do not store passwords or tokens manually.

    line 34
  4. Distinctive:

    Do not call FirebaseAuth directly from reusable Composables.

    line 35
  5. Distinctive:

    Never trust UI checks as authorization.

    line 36
  6. Distinctive:

    Keep errors useful but not secret-revealing.

    line 38
  7. Distinctive:

    Do not assume these companion skills are installed.

    line 52
  8. Distinctive:

    Use $super-android-kotlin-firebase to add Google Sign-In and email login.

    line 90
  9. Distinctive:

    Use $super-android-kotlin-firebase to review auth state handling.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Implement authentication without leaking SDK details or weakening authorization.

When to use

  • Adding login, signup or logout.
  • Handling auth state in ViewModel/UI.
  • Linking user profile data.
  • Mapping Firebase Auth errors safely.

Inputs to inspect

  • Required providers and UX flow.
  • Auth state handling.
  • User profile model.
  • Firestore/Storage rules that depend on auth.

Required workflow

  1. Define providers and session UX.
  2. Create or update an AuthRepository boundary.
  3. Expose auth state to ViewModel.
  4. Map errors to user-safe messages.
  5. Add fakes/tests and rule checks.

Rules

  • Do not store passwords or tokens manually.
  • Do not call FirebaseAuth directly from reusable Composables.
  • Never trust UI checks as authorization.
  • Rules must validate request.auth.uid.
  • Keep errors useful but not secret-revealing.

Related existing skills

Local skills to invoke

  • firebase-core
  • firestore
  • security-privacy
  • ui-state-design
  • testing

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • firebase/agent-skills — use for deeper Firebase product, Firestore, Security Rules or emulator workflow guidance when installed.

Files commonly touched

  • AuthRepository.kt
  • AuthViewModel.kt
  • login Compose screens
  • firestore.rules
  • storage.rules
  • tests/fakes

Commands to validate

./gradlew test
./gradlew assembleDebug
firebase emulators:exec "npm test"

Common mistakes to avoid

  • Persisting provider tokens.
  • Showing raw Firebase exception internals.
  • Creating profile documents without rules.
  • Ignoring anonymous account upgrade flows.

Checklist

  • AuthRepository boundary exists.
  • Auth state observable.
  • Rules checked.
  • Errors mapped.
  • Tests/fakes added.

Example prompts

  • Use $super-android-kotlin-firebase to add Google Sign-In and email login.
  • Use $super-android-kotlin-firebase to review auth state handling.

Expected response style

Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.

References

  • ../../docs/audits/FUENTES_LOCALES.md
  • references/auth-state-and-rules.md
  • templates/auth-repository-template.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.