/saas-builder:saas-storagefrom saas-builder
Set up a file storage infrastructure with Supabase Storage for a SaaS application. Bucket configuration, file security with RLS, file uploads, image optimisation, and plan-based storage limits. Use this skill when the user wants anything related to file uploads, images, storage, or profile photos. Phrases like "add file upload", "upload a profile photo", "set up storage" trigger this skill.
Ships in saas-builder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill sets up the file storage layer for a SaaS application using Supabase Storage. Profile photos, user-uploaded documents, product images, or exported reports — file storage is a required layer in most SaaS products.
Supabase Storage is part of the same Supabase project you're already using for the database — no extra service account or configuration required. It provides file-level security via RLS, built-in image transformation, and visual file management in the Dashboard. Free tier: 1 GB storage, 2 GB bandwidth/month.
Dependency: This skill is an optional phase of the saas-launcher orchestrator skill. It can also be used independently. Not every SaaS needs it — only implement when file upload is required.
Related skills:
Files in Supabase Storage are organised in buckets. Each bucket is like a folder.
Recommended bucket structure:
avatars — User profile photos (public)uploads — User files (private — must be protected with RLS)exports — System-generated files (private)Public vs. Private bucket:
Storage buckets are protected with RLS just like database tables:
avatars/{user_id}/)Combine folder structure with RLS: {bucket}/{user_id}/{file} — this way path verification can be done with auth.uid().
Direct upload from the browser using the Supabase Storage client:
Advantage: Simple, no server load. Limit: Default maximum file size in the Supabase client is 5 MB (configurable).
For large files, generate a presigned URL via the server:
Advantage: Server doesn't transport file content, saving bandwidth. Large files are supported.
Perform these checks on file uploads:
File type check: Define allowed MIME types. Only accept expected types.
image/jpeg, image/png, image/webpapplication/pdf, text/plain*/* or all typesFile size check: Define a maximum size.
File name sanitisation: Don't trust the file name sent by the user. Rename with a UUID. Store the original name as metadata.
Magic bytes check (advanced): The MIME type header can be manipulated. Verify the real type by checking the first bytes (magic bytes) of the file.
Apply rate limiting to the upload endpoint:
Content-Disposition: attachment header, not open in browserUnoptimised images multiply page load time. Using a 50 KB optimised version instead of a 5 MB profile photo dramatically improves user experience.
Supabase Storage provides built-in image transformation. Resize, format conversion, and quality adjustments can be made by adding parameters to the URL.
Recommended strategies:
Next.js's <Image> component provides automatic image optimisation:
Add Storage URLs to remotePatterns in next.config.js — otherwise Next.js won't optimise external domain images.
Define different storage limits per plan:
Check the user's total storage usage before every upload. Reject the upload and suggest a plan upgrade when the limit is exceeded.
Maintain total usage as a counter in the database — update it on every upload and deletion. Calculating total size from the Storage API each time is slow.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub carriegale2710/skills-library --plugin saas-builder12 skills in this plugin
/saas-analyticsSet up PostHog analytics and product analysis for a SaaS application. Event tracking, user identification, feature flags, session replay, funnel analysis, and privacy-compliant configuration. Use this skill when the user wants anything related to user analytics, PostHog, event tracking, user behaviour, feature flags, A/B testing, conversion analysis, or metric tracking. Phrases like "set up analytics", "track users", "add PostHog", "create a feature flag" trigger this skill.
/saas-api-securitySet up an API security layer for a SaaS application. Rate limiting, plan-based access control, input validation, error handling, CORS, and health checks. Use this skill when the user wants anything related to API security, rate limiting, authorisation, input validation, error handling, or API protection. Phrases like "secure the API", "add rate limiting", "check the plan", "input validation" trigger this skill.
/saas-authSet up the authentication layer of a SaaS application. Covers Google OAuth, Magic Link, email/password login, JWT session management, and middleware for protected routes. Use this skill when the user wants to add authentication, set up login, or configure user sessions.
Other plugins' skills for the same job