dentvega/firebase-agent-skills/firebase-storage
Claude Code and agent skill by dentvega/firebase-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Configures and uses Cloud Storage for Firebase — provisioning buckets, writing security rules, uploading/downloading files from web and React Native, generating signed URLs from Cloud Functions, and integrating with Expo ImagePicker. Use whenever the user needs to store user-uploaded files, images, video, or any binary blob.
Install
npx vskill@latest install dentvega/firebase-agent-skills/firebase-storageSKILL.md
The same SKILL.md was published earlier as dentvega/firebase-agent-skills/firebase-storage.
Cloud Storage for Firebase
Minimum viable example
Path scoped to the user (rules enforce ownership). putFile streams from disk so it works for large files without OOM.
1. Initialize storage
A default bucket is auto-created with each project. List existing buckets:
If you need a secondary bucket (e.g. for public CDN content vs. user-private uploads):
Initialize Storage in your project root:
This creates storage.rules.
2. Security rules
Default-deny, anchor to auth. Two common patterns:
Deploy:
The request.resource.size and contentType checks happen before the upload is admitted — they cap bandwidth and reject malicious uploads cheaply.
For cross-references with Firestore (firestore.get(...)), each call costs one Firestore read billed to your project.
3. Client SDK — Web
For resumable uploads of large files:
4. Client SDK — Expo / React Native
putFile accepts a local file URI (no need to load the bytes into memory). For very large files this is dramatically more memory-efficient than the web SDK's uploadBytes.
For Expo ImagePicker integration see references/expo-image-picker.md.
5. Signed URLs from Cloud Functions
Download URLs from the client SDK are tied to a token that lives in the file's metadata. To revoke access, you have to rotate the token (delete + reupload, or call updateMetadata with firebaseStorageDownloadTokens deleted). For controlled access, generate signed URLs from a Cloud Function instead:
Signed URLs work without the Firebase SDK and expire on a deadline you choose.
6. Cost & performance
- Caching: set
Cache-Control: public, max-age=31536000in metadata for immutable assets (hashed filenames). Reduces egress bills significantly. - Resize on the fly: install the official Resize Images extension (
npx -y firebase-tools@latest ext:install firebase/storage-resize-images) to auto-generate thumbnails. - Delete on user deletion: hook
beforeUserDeleted(seefirebase-cloud-functionstriggers) and bulk-delete the user's prefix, otherwise files orphan forever and keep billing. - Don't list large prefixes from the client.
listAll()returns up to 1000 entries per page and is slow + expensive at scale. Maintain a Firestore index of file paths instead.
7. Common mistakes
- Storing download URLs in Firestore long-term. They include a token that may rotate or be revoked. Store the path and call
getDownloadURL(ref(storage, path))at read time, or use signed URLs. - Not setting `contentType` on upload. Browsers refuse to display files served with the wrong MIME. The web SDK infers from the
Fileobject; manual uploads must set it explicitly. - Skipping size checks in rules. Without
request.resource.size < N, a single attacker can upload terabytes and bill you. - Mixing `gs://` URIs and HTTPS URLs. The SDK accepts both via
ref()but third-party tools (CDNs,<img src>) need the HTTPS download URL.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/firebase-storage/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dentvega/firebase-agent-skills/firebase-storage)