- Home
- Skills
- Prompt & Skill Engineering
- User Profile, Media Upload & Onboarding Builder
Works with the AI Agents you already use
User Profile, Media Upload & Onboarding Builder
Build, audit, and fix production user profile editors, cropped + cache-busted avatar/cover uploads, @username uniqueness, self-hiding completeness checklists, and first-run onboarding wizards — includes an offline static scanner for React, Next.js & Supabase.
Free
User Profile, Media Upload & Onboarding Builder
Example session with this skill installed
Audit our Next.js + Supabase /profile and /profile/[id] flows using user-profile-setup, fix any stale-avatar, privacy, or unscoped mutation bugs you find, and add a self-hiding profile completeness card so new users finish setting up their profile.
- Read your context and instructions
- Compiled the user profile media
- Generated the UI component
I have completed the audit of your profile and onboarding flows. I scanned 8 files across app/profile/ and app/onboarding/ using the static analyzer.
Profile & Onboarding Audit — Project-X
Stack: Next.js + Supabase + shadcn/ui · Files scanned: 8
Findings: 3 (High: 1, Medium: 1, Low: 1)
1. [HIGH] MEDIA_CACHE_STALE: Missing Cache-Busting — app/profile/avatar-upload.tsx:42
- What happens: The UI updates the
srcattribute to the same URL immediately after upload without a query token.
User / security impact: The browser continues to show the old avatar from its local cache, leading users to believe the upload failed.
Recommended fix: Append ?t=${Date.now()} to the public URL when updating the local state after a successful storage upsert.
2. [MEDIUM] STATE_ROLLBACK_MISSING: No Cancel Snapshot — app/profile/edit-form.tsx:12
- What happens: The
handleCancelfunction simply closes the modal without reverting the localformstate.
User / security impact: If a user edits a field, cancels, and re-opens the editor, the stale unsaved changes persist in the UI.
Recommended fix: Implement a snapshot ref on mount and call setForm(snapshot.current) within the cancel handler.
3. [LOW] INPUT_TYPE_DATE_INVALID: Raw Date Format — app/profile/experience-list.tsx:88
- What happens: The
monthinput sendsYYYY-MMstrings directly to a Postgresdatecolumn.
User / security impact: Potential for silent insertion failures or malformed data in environments strictly expecting YYYY-MM-DD.
- Recommended fix: Normalize values to
YYYY-MM-01before sending the mutation.
Next steps
- Apply the high-priority fix for avatar cache-busting.
- Refactor the profile editor to use the snapshot-rollback pattern.
- Verify the fixes by re-running the
audit_profile_flow.pyscript.
avatar-upload.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Shipping a user profile and onboarding flow looks simple until real users hit the edge cases: re-uploaded avatars still show the old cached photo, cancelling a crop dialog breaks re-selecting the same image, @username collisions throw generic 500 toasts, sequential queries stall /profile load times, and select('*') on public /profile/[id] pages leaks internal account columns in DevTools.
User Profile, Media Upload & Onboarding Builder (user-profile-setup) gives your coding agent a battle-tested, production-extracted workflow plus an offline static analyzer to build, audit, and refine user profile systems without guesswork or dependency bloat.
Four Operating Modes
- BUILD — Scaffolds or extends
/profileeditors, multi-step/onboardingwizards, avatar/cover crop + upload pipelines,@usernamevalidation, sub-collection managers (skills, tags, work history, pinned/hidden endorsements), and self-hiding completeness cards using your repo's existing UI kit. - AUDIT — Runs the bundled read-only
scripts/audit_profile_flow.pystatic scanner across your codebase, mapping concrete bugs (PF001–PF008) to exactfile:linelocations ranked by severity before touching a single line of code. - REFINE — Applies minimal, surgical patches with snapshot/cancel rollback, optimistic UI updates, and defense-in-depth owner scoping.
- VERIFY — Re-runs the static scanner alongside your project's typecheck/test suite (
tsc --noEmit, Vitest/Jest) and reports a clean before/after delta.
What the Bundled Static Scanner Catches (audit_profile_flow.py)
| Rule | What It Detects |
|---|---|
PF001 | Profile or sub-table update() / delete() calls missing explicit .eq('user_id', user.id) owner scoping |
PF002 | Deterministic upsert: true avatar/cover uploads missing ?t= URL cache-busting (stale image bug) |
PF003 | Hidden <input type="file"> handlers missing e.target.value = '' reset (broken same-file re-select) |
PF004 | Media upload handlers missing client-side file.size guards before network upload |
PF005 | Sequential await waterfalls inside profile/onboarding loaders instead of Promise.all |
PF006 | Icon-only camera/remove/pin <button> controls missing aria-label (WCAG 4.1.2) |
PF007 | @username / handle updates missing Postgres 23505 / Prisma P2002 duplicate-handle feedback |
PF008 | Public /profile/[id] or /u/[handle] routes running select('*') on profiles |
What's Inside the Package
SKILL.md— Stack-adaptive intake + 4-mode workflow (BUILD,AUDIT,REFINE,VERIFY) and strict owner-vs-public route boundariesscripts/audit_profile_flow.py— Pure Python 3 stdlib, 100% offline, read-only CLI scanner (--format textand--format json)references/state-and-save-patterns.md— Snapshot rollback, parallel hydration, handle normalization,<input type="month">SQL date formatting, and pinned-first sub-listsreferences/media-upload-and-cropping.md— Hidden file input wiring, 1:1 & banner crop contracts, cache-busting, and storage bucket policiesreferences/onboarding-and-completeness.md—onboarding_completedmount guard, searchable country/tag pickers, auto-hiding completeness math, and verification eligibility deep-linkingreferences/public-vs-owner-security.md— Public column allowlists, hidden testimonial filtering, owner-scoped writes, and idempotent RLS templatesexamples/real-session-audit-and-patch.md— Complete worked audit-to-verification session
Supported Stacks
Works out of the box with React, Next.js (App & Pages Router), Remix, SvelteKit, and Vue paired with Supabase, Postgres, Prisma, or Drizzle and Tailwind / shadcn / Base UI. Zero external Python packages or network access required.
Does not handle auth provider setup, billing/subscriptions, or global search algorithms. Static scanner requires Python 3.8+. Optimized for Supabase, Prisma, and Drizzle stacks.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 19 days ago
- Free with an Agensi account
Requires