Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when troubleshooting Firebase emulator issues, rules violations, function errors, auth problems, or deployment failures. Triggers on "error", "not working", "debug", "troubleshoot", "failing", "broken", "permission denied", "emulator issue".
.claude/skills/aiskillstore-firebase-development-debug/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 102% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 248% | 0% |
This sub-skill guides systematic troubleshooting of Firebase development issues. It handles emulator problems, rules violations, function errors, auth issues, and deployment failures.
Key principles:
Do not use for:
firebase-development:project-setupfirebase-development:add-featurefirebase-development:validateCreate checklist with these 10 steps:
Categorize the error:
| Category | Symptoms | Keywords | |----------|----------|----------| | Emulator Won't Start | Port conflicts, initialization errors | "EADDRINUSE", "emulator failed" | | Rules Violation | Permission denied on read/write | "PERMISSION_DENIED", "insufficient" | | Function Error | HTTP 500, timeout, not executing | "function failed", "timeout" | | Auth Issue | Token errors, not authenticated | "auth failed", "invalid token" | | Deployment Failure | Deploy command fails | "deployment failed", "deploy error" |
If unclear, use AskUserQuestion to clarify issue type.
For running emulators: Watch terminal output while reproducing the issue.
For emulators that won't start:
bashlsof -i :4000 && lsof -i :5001 && lsof -i :8080 # Check ports kill -9 <PID> # Kill conflicting process
For deployment errors: Check firebase-debug.log
Reference: docs/examples/emulator-workflow.md
bashopen http://127.0.0.1:4000
Use Emulator UI to:
In Emulator UI → Firestore → Rules Playground:
Reference: docs/examples/firestore-rules-patterns.md
Add strategic console.log statements:
Watch terminal output while reproducing.
Reference: docs/examples/express-function-architecture.md
Check environment variables:
bashcat functions/.env cat hosting/.env.local # Should have NEXT_PUBLIC_USE_EMULATORS=true
Check emulator connection in client code and API key middleware.
Reference: docs/examples/api-key-authentication.md
bashcat firebase-debug.log # Full error details cat firebase.json # Config issues cat .firebaserc # Project ID firebase target:list # Verify targets
Test predeploy hooks locally:
bashcd functions && npm run build
Before making fixes:
bash# Graceful shutdown (Ctrl+C exports automatically) # Or manual export: firebase emulators:export ./backup-data
Verify export: ls -la .firebase/emulator-data/
Apply fix based on diagnosis, then:
bashfirebase emulators:start --import=.firebase/emulator-data
Verify:
Create entry in docs/debugging-notes.md:
| Issue | Solution | |-------|----------| | Port conflicts | lsof -i :<port>, kill process | | Data persistence lost | Use Ctrl+C (not kill) to stop emulators | | Cold start delays | First call takes 5-10s (normal) | | Rules not reloading | Restart emulators | | Admin vs Client SDK | Admin bypasses rules, client respects them | | Missing CORS | Add app.use(cors({ origin: true })) | | Emulator connection | Set NEXT_PUBLIC_USE_EMULATORS=true | | API key prefix | Verify prefix matches actual keys |
If Firebase-specific tools don't reveal root cause, invoke superpowers:systematic-debugging for:
docs/examples/emulator-workflow.mddocs/examples/firestore-rules-patterns.mddocs/examples/api-key-authentication.mddocs/examples/express-function-architecture.md| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,582 | 6,011 | -64% | 1 | 1 | 0% | 2,775 | 2,017 | -27% | 0 | 0 | — |
case-02 | pass→pass | 13,922 | 13,117 | -6% | 1 | 1 | 0% | 2,458 | 2,762 | +12% | 0 | 0 | — |
case-03 | fail→pass | 15,643 | 4,397 | -72% | 1 | 1 | 0% | 2,587 | 2,119 | -18% | 0 | 0 | — |
case-04 | pass→pass | 5,655 | 3,416 | -40% | 1 | 1 | 0% | 1,097 | 1,984 | +81% | 0 | 0 | — |
case-05 | pass→pass | 3,825 | 3,124 | -18% | 1 | 1 | 0% | 646 | 1,834 | +184% | 0 | 0 | — |
case-06 | pass→pass | 2,674 | 2,506 | -6% | 1 | 1 | 0% | 413 | 1,707 | +313% | 0 | 0 | — |
case-07 | fail→pass | 13,447 | 6,767 | -50% | 1 | 1 | 0% | 2,128 | 2,346 | +10% | 0 | 0 | — |
case-08 | pass→pass | 3,807 | 3,091 | -19% | 1 | 1 | 0% | 432 | 1,807 | +318% | 0 | 0 | — |
case-09 | pass→pass | 5,923 | 3,989 | -33% | 1 | 1 | 0% | 954 | 1,954 | +105% | 0 | 0 | — |
case-10 | pass→pass | 9,870 | 9,620 | -3% | 1 | 1 | 0% | 1,619 | 2,959 | +83% | 0 | 0 | — |
case-11 | pass→pass | 3,141 | 3,284 | +5% | 1 | 1 | 0% | 497 | 1,842 | +271% | 0 | 0 | — |
case-12 | pass→pass | 2,726 | 3,968 | +46% | 1 | 1 | 0% | 446 | 2,024 | +354% | 0 | 0 | — |
case-13 | pass→pass | 6,493 | 11,553 | +78% | 1 | 1 | 0% | 1,159 | 1,981 | +71% | 0 | 0 | — |
case-14 | pass→pass | 18,399 | 6,032 | -67% | 1 | 1 | 0% | 1,400 | 2,236 | +60% | 0 | 0 | — |
case-15 | fail→pass | 5,049 | 4,006 | -21% | 1 | 1 | 0% | 884 | 1,789 | +102% | 0 | 0 | — |
case-16 | fail→pass | 3,991 | 4,047 | +1% | 1 | 1 | 0% | 576 | 2,004 | +248% | 0 | 0 | — |
case-17 | pass→pass | 3,932 | 4,751 | +21% | 1 | 1 | 0% | 578 | 2,080 | +260% | 0 | 0 | — |
case-18 | pass→pass | 7,691 | 2,911 | -62% | 1 | 1 | 0% | 1,167 | 1,815 | +56% | 0 | 0 | — |
case-19 | pass→pass | 5,015 | 3,511 | -30% | 1 | 1 | 0% | 909 | 1,880 | +107% | 0 | 0 | — |
case-20 | pass→pass | 5,770 | 4,574 | -21% | 1 | 1 | 0% | 936 | 1,995 | +113% | 0 | 0 | — |
case-21 | pass→pass | 13,650 | 9,921 | -27% | 1 | 1 | 0% | 2,476 | 3,323 | +34% | 0 | 0 | — |
case-22 | pass→pass | 24,016 | 22,477 | -6% | 1 | 1 | 0% | 4,959 | 5,908 | +19% | 0 | 0 | — |
case-23 | fail→pass | 7,507 | 6,397 | -15% | 1 | 1 | 0% | 1,116 | 2,311 | +107% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +26 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.