supabase/middleware/create-supabase-middleware

Claude Code and agent skill by supabase/middleware

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when creating a new middleware for `@supabase/middleware` — either a built-in inside the middleware repo itself, or a standalone package that anyone can publish. Trigger when the user asks to write, scaffold, or add a middleware; describes a per-request cross-cutting concern they want to reuse ("I want to rate limit", "add request logging", "check an API key on every request"); calls `defineMiddleware`; or adds a new directory under `src/middleware/`. Also trigger when a plan proposes a new middleware, before any file is written.

Install

npx vskill@latest install supabase/middleware/create-supabase-middleware

SKILL.md

The same SKILL.md was published earlier as supabase/middleware/create-supabase-middleware.

Creating a middleware

Before scaffolding anything, check the concern is actually middleware-shaped:

  • Response-only — headers, envelopes, error formatting — belongs in the handler, which owns the response. Not a middleware.
  • Used once, in one handler — inline it. A middleware earns its keep by being composed across handlers.

Then pick the target by reading the nearest package.json:

name isYou are writingFollow
@supabase/middlewarea built-insrc/middleware/README.md — layout, then the three subpath-wiring files
anything elsea standalone packagedocs/authoring-guide.md — the full path, from defineMiddleware through publishing

Both paths use the same defineMiddleware primitive; the difference is only whose package it lives in and whether a subpath export has to be wired up.

Read the guide before writing code, and follow its `## Rules` section — eight MUST/NEVER items covering one-key-per-middleware, getEnv over process.env/Deno.env, declaring prerequisites in In, yielding at most once, and returning a Response to short-circuit rather than throwing. Its code blocks labeled with a path are complete files: write them to disk as given rather than adapting them from memory. Unlabeled blocks are fragments that elide with { ... }. Never write those verbatim.

Paths are repo-relative. When @supabase/middleware is installed as a dependency, prefix them with node_modules/@supabase/middleware/.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/supabase/middleware/create-supabase-middleware/badge)](https://verified-skill.com/skills/supabase/middleware/create-supabase-middleware)

Something wrong with this skill or its page? Tell us.