/be:image-handlingfrom Backend Skills
User-uploaded images on Firebase Storage — caps in one module, files validated by their bytes and decoded within a pixel limit, no user SVG, buckets chosen by who may read them, display images through the API and large originals straight to a reserved path, URLs derived at read time with a version for cache-busting, short signed links for private files, a worker that normalises, strips EXIF and derives, deletes and orphan reaping, and the cost meters. Use when adding an upload, an image slot, a signed link or a storage bucket.
Ships in Backend Skills. 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.
Read when SKILL.md points to them.
Every byte a user uploads is untrusted until the server has read it, and every byte stored has a record that owns it. The browser makes uploads cheap — early checks, compression — but the server is the only gate; who may read a file decides where it lives; heavy work runs off the request path; and anything without an owner record is reaped.
Before applying this skill, read the project's root AGENTS.md, the AGENTS.md closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
contentType and the file extension are whatever the client says. The server reads the file's first bytes (file-type) and checks the real type against the allowlist, then stores that type as the object's contentType.sharp's limitInputPixels) and refuse anything over it, or that doesn't decode at all.{ownerId}/avatar), so a replace overwrites.status: "pending", the exact path, the declared size — and the browser uploads to that path with a resumable upload; the storage rules allow the write only when it matches the record. Streaming 100 MB through the API buys latency and memory for nothing.?v= on public files.updatedAt, or a counter): a replace writes new bytes to the same path, and browsers and CDNs still hold the old ones (public objects default to an hour's caching), so only a new query string makes them fetch again. After the mutation, the page refreshes so the new URL reaches it (nextjs).Content-Disposition: attachment.onObjectFinalized), never on the upload request: the person waits for the bytes to arrive, nothing more.status tracks the file — pending → uploaded → processing → ready, or failed, plus deleting. The UI shows only ready; the retry job and the reaper key off the rest.sharp for Cloud Functions has no HEIC support), then mark the output with custom metadata and skip it in the trigger, or the worker processes its own output in a loop.sharp().rotate() before re-encoding. Photos carry GPS coordinates and device serials, and no delivered file may. Fields worth keeping (capture time, camera) are picked from an allowlist, with GPS off.cloudinary's where a project uses it.deleting; retries are capped (3 to start), then failed, for a retry job to sweep.deleting and answers 202; a trigger deletes the file, then the record, then reverses counters. File first: a failed file delete leaves the record visible and retrying, never silent orphaned bytes. A missing file is fine (ignoreNotFound).pending past a day (an abandoned upload) are deleted. A reconciliation job lists the bucket against the records; it should find nothing, so anything it finds raises an alert rather than being quietly deleted.Storage bills on three meters; know which one a choice moves (current prices):
?v=), put a CDN in front of hot images, and keep workers in the bucket's region.A worked example — caps, the browser and server checks, a fixed-slot replace, a signed link behind its check — is in references/example.md.
contentType or the extension; accept user SVG; mix public and private files in a bucket; name objects by the user's filename; store a URL, signed or not; mint a signed link anywhere the access check didn't just run; process on the request path; delete the record before the file.The Admin client and the store firestore · upload routes and the 202 api-architecture · per-account upload limits rate-limiting · server threats and file access (BOLA) backend-security · delivery transforms cloudinary · next/image and refresh after a mutation nextjs · generated images (ImageResponse) seo-aeo-geo · alt text accessibility · slot and asset names naming.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timonwa/engineering-skills --plugin be22 skills in this plugin
/access-controlAccess control for a Next.js API on Firebase — roles, relationships and attributes (RBAC, ReBAC, ABAC) behind permission verbs and one pure can(); guards as the only gate, 404 before 403; tenant scoping; invitations; escalation limits; two-person approval and access reviews; stale claims; API-key scopes; share links and passcodes; where plan and flag checks sit; UI gates that only hide; and tests. Use when adding a permission, role, guarded route, API key, share link, or a control only some people see./access-control-auditManually invoked. Access-control audit — guards on every route and Server Action (BFLA), 404 before 403 and tenant scoping (BOLA), allowlisted writes and projected reads (BOPLA), verbs never role names, roles that add up, escalation and invitations, claims and revocation, sessions and sign-in, API keys and share links, the plan and flag order, UI gates, data rules and the tests. Verifies each finding and writes a prioritised report./api-architectureHow an API route is built in a Next.js API — the fixed order of rate limit, authorise, validate, delegate, audit, respond; thin routes over services; the response envelope and typed errors; caching headers; concurrent edits; long-running work; cursor pagination and allowlisted sorts; resource paths, versions, deprecation and state-transition sub-routes; and what every new route ships with. Cron, webhooks and audit logs are references. Use when adding, changing or reviewing a route handler or the API layer's structure.Other plugins' skills for the same job