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

firebase

Firebase for web and mobile apps: projects per environment, Authentication, Firestore and Storage security rules tested in the Emulator Suite, App Check, Cloud Functions, Hosting, and cost guards. Set up or review a Firebase project.

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

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.4 KB

SKILL.md(원문)

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

Firebase

In Firebase the client talks to the database directly, so security rules are the backend's authorization layer. Most Firebase incidents are rules that allow too much, and most surprise bills are reads nobody counted.

Phase 1: Scope

ModeDoes
setupProjects per environment, SDK config, Auth, Emulator Suite, deploy targets
rulesWrites or reviews Firestore and Storage rules, with tests in the emulator
functionsCloud Functions for Firebase: triggers, secrets, regions, deploys
reviewChecks a project against Phase 6 and gives a verdict

Read firebase.json, .firebaserc, firestore.rules, storage.rules, firestore.indexes.json and the functions folder first. Check firebase --version (firebase-tools) and the SDK versions in the lockfile: APIs differ between majors.

Phase 2: Projects and setup

  • One Firebase project per environment (dev, staging, prod), aliased in .firebaserc and selected with firebase use <alias>. Never test against production.
  • The web config object (apiKey, projectId…) identifies the project and is not a secret; protection comes from rules, App Check and API key restrictions in Google Cloud, not from hiding it.
  • Emulator Suite (firebase emulators:start) for Auth, Firestore, Storage and Functions in local development and in CI tests.

Phase 3: Security rules

// firestore.rules
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId} {
      allow read: if request.auth != null && request.auth.uid == userId;
      // request.resource is the document as it will be after a write: keep write checks in their own rule
      allow update: if request.auth != null && request.auth.uid == userId
        && request.resource.data.get('role', null) == resource.data.get('role', null);
      allow create: if request.auth != null && request.auth.uid == userId;
    }
    match /{document=**} {
      allow read, write: if false;     // deny by default
    }
  }
}
  • Deny by default; open each collection with the narrowest condition. allow read, write: if true or rules based only on request.auth != null (any signed-in user can read everyone's data) are findings.
  • Validate writes: allowed fields, types, sizes, and that users cannot change their own role, owner or price fields.
  • Rules are not filters: a query must be constrained to what the rules allow, or it fails.
  • Test rules with @firebase/rules-unit-testing against the emulator, in CI, for both allowed and denied cases. Storage rules get the same treatment.
  • Server-side code (Admin SDK, Functions) bypasses rules: it needs its own authorization checks.

Phase 4: Auth and App Check

  • Enable only the sign-in providers in use; restrict authorized domains; email enumeration protection on.
  • Custom claims for roles, set only from trusted server code; rules read them from request.auth.token.
  • App Check (Play Integrity, App Attest / DeviceCheck, reCAPTCHA Enterprise on the web) enforced on Firestore, Storage and callable functions once the apps send tokens: it blocks scripts that reuse the public config. Roll out in monitor mode first.

Phase 5: Functions and Hosting

  • Cloud Functions for Firebase 2nd gen run on Cloud Run: set region near the database, maxInstances to cap cost, minInstances only where cold starts hurt.
  • Secrets through defineSecret (stored in Secret Manager), never in source or plain environment config.
  • Background triggers retry only if enabled; make them idempotent either way.
  • Deploy only what changed: firebase deploy --only functions:<name>,firestore:rules.
  • Hosting: preview channels (firebase hosting:channel:deploy <name>) for PR previews; App Hosting for frameworks like Next.js where supported.

Phase 6: Review and cost

AreaBaseline
RulesDeny by default, ownership checks, write validation, tests in CI
App CheckEnforced on data services used by clients
EnvironmentsSeparate projects; no production credentials in dev
CostOn the pay-as-you-go plan, a budget alert in Google Cloud Billing; queries paginated and indexed; no listeners on large collections; maxInstances on functions
BackupsFirestore scheduled backups or PITR enabled for production (/backup-strategy)
VerdictWhen
PASSBaseline met and rules tested
CONCERNSApp Check not enforced, no budget alert, untested rules, functions without maxInstances
FAILRules that let any user read or write other users' data, if true on real data, production used for testing, Admin credentials in client code

Protocol

  • Ask before firebase deploy to production and before changing rules there.
  • Never download or paste production user data to inspect a problem; reproduce it in the emulator.

Next steps

  • /accessibility and /frontend-dev for the client app.
  • /backup-strategy for Firestore backups and restores.
  • /supply-chain-security for the functions' dependencies.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

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

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고