본문으로 건너뛰기
cccskills
무료GitHub에 공개

firebase-development-debug

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".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Firebase
설치 방법 보기

포함된 파일(2)

  • SKILL.md5.6 KB
  • skill-report.json44.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Firebase Debugging

Overview

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:

  • Identify issue type first (emulator, rules, functions, auth, deployment)
  • Use Emulator UI and Rules Playground for diagnosis
  • Export emulator state before restarting
  • Document issues and solutions for future reference

When This Sub-Skill Applies

  • Emulators won't start or have port conflicts
  • Getting Firestore rules violations (PERMISSION_DENIED)
  • Cloud Functions returning errors or not executing
  • Authentication not working in emulators
  • Deployment fails with cryptic errors
  • User says: "debug", "troubleshoot", "error", "not working", "failing"

Do not use for:

  • Setting up new projects → firebase-development:project-setup
  • Adding new features → firebase-development:add-feature
  • Code review without specific errors → firebase-development:validate

TodoWrite Workflow

Create checklist with these 10 steps:

Step 1: Identify Issue Type

Categorize the error:

CategorySymptomsKeywords
Emulator Won't StartPort conflicts, initialization errors"EADDRINUSE", "emulator failed"
Rules ViolationPermission denied on read/write"PERMISSION_DENIED", "insufficient"
Function ErrorHTTP 500, timeout, not executing"function failed", "timeout"
Auth IssueToken errors, not authenticated"auth failed", "invalid token"
Deployment FailureDeploy command fails"deployment failed", "deploy error"

If unclear, use AskUserQuestion to clarify issue type.

Step 2: Check Emulator Logs and Terminal

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

Step 3: Open Emulator UI

open http://127.0.0.1:4000

Use Emulator UI to:

  • View Firestore data and structure
  • Check authenticated users
  • Review function invocation logs
  • Search consolidated logs

Step 4: Test Rules in Playground (If Rules Issue)

In Emulator UI → Firestore → Rules Playground:

  1. Select operation type (get/list/create/update/delete)
  2. Specify document path
  3. Set auth context (uid, custom claims)
  4. Add request data for writes
  5. Run simulation and review evaluation trace

Reference: docs/examples/firestore-rules-patterns.md

Step 5: Add Debug Logging (If Function Error)

Add strategic console.log statements:

  • Function entry confirmation
  • Input data (req.body, req.params)
  • Auth context (userId, API key)
  • Intermediate operation results
  • Error details with stack trace

Watch terminal output while reproducing.

Reference: docs/examples/express-function-architecture.md

Step 6: Verify Auth Configuration (If Auth Issue)

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

Step 7: Check Deployment Config (If Deployment Failure)

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

Step 8: Export Emulator State

Before making fixes:

# Graceful shutdown (Ctrl+C exports automatically)
# Or manual export:
firebase emulators:export ./backup-data

Verify export: ls -la .firebase/emulator-data/

Step 9: Implement and Test Fix

Apply fix based on diagnosis, then:

firebase emulators:start --import=.firebase/emulator-data

Verify:

  • Original error no longer occurs
  • Terminal shows success logs
  • Emulator UI confirms expected behavior

Step 10: Document Issue and Solution

Create entry in docs/debugging-notes.md:

  • Symptom and exact error message
  • Root cause
  • Solution applied
  • Prevention for future

Common Issues Quick Reference

IssueSolution
Port conflictslsof -i :<port>, kill process
Data persistence lostUse Ctrl+C (not kill) to stop emulators
Cold start delaysFirst call takes 5-10s (normal)
Rules not reloadingRestart emulators
Admin vs Client SDKAdmin bypasses rules, client respects them
Missing CORSAdd app.use(cors({ origin: true }))
Emulator connectionSet NEXT_PUBLIC_USE_EMULATORS=true
API key prefixVerify prefix matches actual keys

Integration with Superpowers

If Firebase-specific tools don't reveal root cause, invoke superpowers:systematic-debugging for:

  • Complex multi-service interactions
  • Race conditions or timing issues
  • Call stack tracing beyond Firebase layer

Pattern References

  • Emulator workflow: docs/examples/emulator-workflow.md
  • Rules patterns: docs/examples/firestore-rules-patterns.md
  • Auth patterns: docs/examples/api-key-authentication.md
  • Functions: docs/examples/express-function-architecture.md

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Trigger for: explaining current FAR, DFARS, or agency-supplement text; determining documented acquisition-policy status for an agency and FAR part; comparing codified text, RFO model text, and agency deviations; tracing acquisition rulemaking; finding procurement comment periods; analyzing public comments; refreshing prior policy analysis; or producing an Acquisition Policy Impact Brief. Use published federal sources and supplied policy documents without making legal or procurement-specific applicability determinations. Do not use for clause selection, market research execution, opportunities, pricing, grants, or cooperative agreements.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

Systematic framework for extracting actionable items from documents and organizing them into prioritized, trackable checklists. Use when converting reports, meeting notes, audits, or any document with embedded action items into structured TODO lists.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

Browser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

Run AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

Agile ceremonies and sprint management specialist. Use when running standups, retrospectives, sprint planning, or tracking sprint progress.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aiskillstore/marketplace4392026년 10월 19일 업데이트

aiskillstore의 스킬 모두 보기

이 스킬의 문제 신고