skills/2389-research/firebase-development/debug/SKILL.md
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".
npx skillsauth add aiskillstore/marketplace firebase-development-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
lsof -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
open 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:
cat 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
cat firebase-debug.log # Full error details
cat firebase.json # Config issues
cat .firebaserc # Project ID
firebase target:list # Verify targets
Test predeploy hooks locally:
cd functions && npm run build
Before making fixes:
# 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:
firebase 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.mddevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.