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

firebase-development-validate

This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

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

연동 도구Firebase
설치 방법 보기

포함된 파일(2)

  • SKILL.md6.0 KB
  • skill-report.json51.8 KB

SKILL.md(원문)

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

Firebase Code Validation

Overview

This sub-skill validates existing Firebase code against proven patterns and security best practices. It checks configuration, rules, architecture consistency, authentication, testing, and production readiness.

Key principles:

  • Validate against chosen architecture patterns
  • Check security rules thoroughly
  • Verify test coverage exists
  • Review production readiness

When This Sub-Skill Applies

  • Conducting code review of Firebase project
  • Auditing security implementation
  • Preparing for production deployment
  • User says: "review firebase", "validate", "audit firebase", "check firebase code"

Do not use for:

  • Initial setup → firebase-development:project-setup
  • Adding features → firebase-development:add-feature
  • Debugging active errors → firebase-development:debug

TodoWrite Workflow

Create checklist with these 9 steps:

Step 1: Check firebase.json Structure

Validate required sections:

  • hosting - Array or object present
  • functions - Source directory, runtime, predeploy hooks
  • firestore - Rules and indexes files
  • emulators - Local development config

Check hosting pattern matches implementation (site:, target:, or single).

Reference: docs/examples/multi-hosting-setup.md

Step 2: Validate Emulator Configuration

Critical settings:

{
  "emulators": {
    "singleProjectMode": true,
    "ui": { "enabled": true }
  }
}

Verify all services in use have emulator entries.

Reference: docs/examples/emulator-workflow.md

Step 3: Review Firestore Rules

Check for:

  • Helper functions at top (isAuthenticated(), isOwner())
  • Consistent security model (server-write-only OR client-write-validated)
  • diff().affectedKeys().hasOnly([...]) for client writes
  • Collection group rules if using collectionGroup() queries
  • Default deny rule at bottom

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

Step 4: Validate Functions Architecture

Identify pattern in use:

  • Express: Check middleware/, tools/, CORS, health endpoint
  • Domain-Grouped: Check exports, domain boundaries, shared/
  • Individual: Check one function per file structure

Critical: Don't mix patterns. Verify consistency throughout.

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

Step 5: Check Authentication Implementation

For API Keys:

  • Middleware validates key format with project prefix
  • Uses collectionGroup('apiKeys') query
  • Checks active: true flag
  • Attaches userId to request

For Firebase Auth:

  • Functions check request.auth.uid
  • Role lookups use Firestore user document
  • Client connects to auth emulator in development

Reference: docs/examples/api-key-authentication.md

Step 6: Verify ABOUTME Comments

All .ts files should start with:

// ABOUTME: Brief description of what this file does
// ABOUTME: Second line with additional context
grep -L "ABOUTME:" functions/src/**/*.ts  # Find missing

Step 7: Review Test Coverage

Check for:

  • Unit tests: functions/src/__tests__/**/*.test.ts
  • Integration tests: functions/src/__tests__/emulator/**/*.test.ts
  • vitest.config.ts and vitest.emulator.config.ts exist
  • Coverage threshold met (60%+)
npm test && npm run test:coverage

Step 8: Validate Error Handling

All handlers must:

  • Use try-catch blocks
  • Return { success: boolean, message: string, data?: any }
  • Use proper HTTP status codes (400, 401, 403, 500)
  • Log errors with console.error
  • Validate input before processing

Step 9: Security and Production Review

Security checks:

  • No secrets in code (grep -r "apiKey.*=" functions/src/)
  • .env files in .gitignore
  • No allow read, write: if true; in rules
  • Sensitive fields protected from client writes

Production checks:

  • npm audit clean
  • Build succeeds: npm run build
  • Tests pass: npm test
  • Correct project in .firebaserc
  • Indexes defined for complex queries

Validation Checklists

Hosting Pattern

  • Pattern matches firebase.json config
  • Sites/targets exist in Firebase Console
  • Rewrites reference valid functions
  • Emulator ports configured

Authentication Pattern

  • Auth method matches security model
  • Middleware/checks implemented correctly
  • Environment variables documented
  • Emulator connection configured

Security Model

  • Server-write-only: All allow write: if false;
  • Client-write: diff().affectedKeys() validation
  • Default deny rule present
  • Helper functions used consistently

Common Issues

IssueFix
Missing singleProjectModeAdd to emulators config
No default deny ruleAdd match /{document=**} { allow: if false; }
Mixed architectureMigrate to consistent pattern
Missing ABOUTMEAdd 2-line header to all .ts files
No integration testsAdd emulator tests for workflows
Inconsistent response formatStandardize to {success, message, data?}
No error handlingAdd try-catch to all handlers
Secrets in codeMove to environment variables

Integration with Superpowers

For general code quality review beyond Firebase patterns, invoke superpowers:requesting-code-review.

Output

After validation, provide:

  • Summary of findings
  • Issues categorized by severity (critical, important, nice-to-have)
  • Recommendations for remediation
  • Confirmation of best practices compliance

Pattern References

  • Hosting: docs/examples/multi-hosting-setup.md
  • Auth: docs/examples/api-key-authentication.md
  • Functions: docs/examples/express-function-architecture.md
  • Rules: docs/examples/firestore-rules-patterns.md
  • Emulators: docs/examples/emulator-workflow.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월 18일 업데이트

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월 18일 업데이트

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월 18일 업데이트

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월 18일 업데이트

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월 18일 업데이트

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

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

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

aiskillstore의 스킬 모두 보기

이 스킬의 문제 신고