firebase-storage — Claude Code skill: what it does, how to install
firebase-storage is a skill with guidelines for Firebase Cloud Storage in Flutter apps, covering file uploads, downloads, metadata changes, and storage error handling.
MIT ★ 674 updated 2026-10-29
/plugin marketplace add evanca/flutter-ai-rules
/plugin install flutter-ai-skills@flutter-ai-rulesWhat firebase-storage does
This skill supplies Dart patterns for integrating Firebase Cloud Storage into Flutter applications. It guides the model through creating storage references, streaming uploads via putFile, reading objects in-memory with getData, and removing files.
It covers updating file attributes with SettableMetadata, tracking transfer progress via snapshotEvents, and pausing or canceling active tasks. Firebase Storage requires the Blaze (pay-as-you-go) billing plan. The skill also includes a mapping of FirebaseException error codes, noting when to implement retries for network drops or timeouts.
What it helps with
- upload files in Flutter and retrieve download URLs
- track upload progress and pause or cancel tasks
- attach custom key-value metadata to stored files
- handle
FirebaseExceptionerror codes like quota limits or auth failures
Example prompts for the agent
- Write a Flutter upload function for Firebase Storage with progress tracking
- Implement error handling for storage/object-not-found and quota errors
- Show how to update custom metadata on a Cloud Storage reference
How to install firebase-storage
1Plugin marketplace
/plugin marketplace add evanca/flutter-ai-rules/plugin install flutter-ai-skills@flutter-ai-rulesThis installs the whole flutter-ai-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-storage -a claude-code3Manually: put the files in place
~/.claude/skills/firebase-storage/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/firebase-storage/
1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-storage -a codex2Manually: put the files in place
.agents/skills/firebase-storage/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-storage -a cursor2Manually: put the files in place
.cursor/skills/firebase-storage/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install evanca/flutter-ai-rules skills/firebase-storage2Manually: put the files in place
.github/skills/firebase-storage/SKILL.md1Skills CLI (Vercel)
npx skills add evanca/flutter-ai-rules --skill firebase-storage -a gemini-cli2Platform CLI
gemini skills install https://github.com/evanca/flutter-ai-rules --path skills/firebase-storageManually: put the files in place
.devin/skills/firebase-storage/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about firebase-storage
How do I install firebase-storage in Claude Code?
Run /plugin marketplace add evanca/flutter-ai-rules, then run /plugin install flutter-ai-skills@flutter-ai-rules.
What does firebase-storage do?
It instructs coding agents on best practices for Firebase Cloud Storage in Flutter, covering file operations, metadata, and error handling.
Does Firebase Storage work on the free Spark plan?
Cloud Storage operations require upgrading your Firebase project to the pay-as-you-go Blaze plan.
Source text
SKILL.md · MIT
---
name: firebase-storage
description: "Use when setting up Storage, uploading/downloading files, managing metadata, handling errors, or applying security rules."
license: MIT
---
# Firebase Cloud Storage Skill
This skill defines how to correctly use Firebase Cloud Storage in Flutter applications.
## When to Use
Use this skill when:
* Setting up Cloud Storage in a Flutter project.
* Uploading or downloading files.
* Managing file metadata.
* Handling Storage errors and monitoring upload progress.
---
## 1. Setup and Configuration
```
flutter pub add firebase_storage
```
```dart
import 'package:firebase_storage/firebase_storage.dart';
final storage = FirebaseStorage.instance;
// Or specify a bucket explicitly:
// final storage = FirebaseStorage.instanceFor(bucket: "gs://BUCKET_NAME");
```
- Firebase Storage requires the **Blaze (pay-as-you-go) plan**.
- Run `flutterfire configure` to update your Firebase config with the default Storage bucket name.
> **Security note:** By default, a Cloud Storage bucket requires Firebase Authentication for any action. Configuring public access may also make App Engine files publicly accessible — restrict access again when you set up Authentication.
---
## 2. File Operations
**Create a reference:**
```dart
final storageRef = FirebaseStorage.instance.ref();
final fileRef = storageRef.child("uploads/file.jpg");
```
**Upload:**
```dart
final uploadTask = fileRef.putFile(file);
final snapshot = await uploadTask;
final downloadUrl = await snapshot.ref.getDownloadURL();
```
**Download (in-memory):**
```dart
final data = await fileRef.getData();
```
**Download URL:**
```dart
final downloadUrl = await fileRef.getDownloadURL();
```
**Delete:**
```dart
await fileRef.delete();
```
---
## 3. Metadata Management
**Get metadata:**
```dart
final metadata = await fileRef.getMetadata();
print('Content type: ${metadata.contentType}');
print('Size: ${metadata.size}');
```
**Update metadata:**
```dart
final newMetadata = SettableMetadata(
contentType: "image/jpeg",
customMetadata: {'uploaded_by': 'user123'},
);
await fileRef.updateMetadata(newMetadata);
```
Use **custom metadata** to store additional key/value pairs with your files.
---
## 4. Error Handling
Use `try-catch` with `FirebaseException`. Key error codes:
| Code | Meaning |
|---|---|
| `storage/object-not-found` | File doesn't exist at the reference |
| `storage/bucket-not-found` | No bucket configured for Cloud Storage |
| `storage/project-not-found` | No project configured for Cloud Storage |
| `storage/quota-exceeded` | Storage quota exceeded |
| `storage/unauthenticated` | User needs to authenticate |
| `storage/unauthorized` | User lacks permission |
| `storage/retry-limit-exceeded` | Operation timeout exceeded |
- For `quota-exceeded` on the Spark plan, upgrade to Blaze.
- Implement retry logic for network-related errors and timeouts.
---
## 5. Performance and Best Practices
**Monitor upload progress:**
```dart
final uploadTask = fileRef.putFile(file);
uploadTask.snapshotEvents.listen((TaskSnapshot snapshot) {
print('Progress: ${(snapshot.bytesTransferred / snapshot.totalBytes) * 100}%');
});
```
- **Cancel** uploads with `uploadTask.cancel()`.
- **Pause / resume** with `uploadTask.pause()` and `uploadTask.resume()`.
- Optimize file sizes before upload to reduce costs and improve performance.
- Use Cloud Storage with Firestore for comprehensive data management.
- Use the **Firebase Local Emulator Suite** for local development and testing.
---
## 6. Security
- Use **Firebase Security Rules** to control access to files.
- Combine Storage rules with **Firebase Authentication** for user-based access control.
- Test security rules thoroughly before deploying to production.
---
## References
- [Firebase Cloud Storage Flutter documentation](https://firebase.google.com/docs/storage/flutter/start)
- [Upload files](https://firebase.google.com/docs/storage/flutter/upload-files)
- [Download files](https://firebase.google.com/docs/storage/flutter/download-files)
- [Handle errors](https://firebase.google.com/docs/storage/flutter/handle-errors)
© Ivanna Kaceviča · MIT · evanca/flutter-ai-rules