edge-function-architect

Scaffold Supabase Edge Functions with mirrored Vitest tests for Deno and Node.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/sf-bcca/PromptArchitect-Studio --skill edge-function-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: edge-function-architect
Source: https://github.com/sf-bcca/PromptArchitect-Studio/tree/main/.gemini/skills/edge-function-architect
Command: npx skills add https://github.com/sf-bcca/PromptArchitect-Studio --skill edge-function-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Scaffolds the creation of Supabase Edge Functions alongside a mirrored test setup to keep Deno and Node runtimes aligned, reducing context-switching and enabling reliable cross-runtime validation from day one.

Core Features & Use Cases

  • Scaffolds a new Edge Function directory with both backend scaffolding (Deno) and a mirrored Vitest-based test.
  • Ensures validation rules and basic structure are shared across runtimes, improving testability and consistency.
  • Ideal for teams building mixed-runtime serverless backends who need quick, reproducible bootstraps for new functions.

Quick Start

Run the scaffold_edge_function script with a function name to generate the edge function and mirrored test scaffolds.

Frequently Asked Questions about edge-function-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Supabase edge function with mirrored test logic?

To scaffold a Supabase edge function with mirrored test logic, run the scaffold script with a function name to automatically generate both the Deno backend directory and a mirrored Vitest-based test harness.

Why do I need mirrored tests for Deno and Node runtimes in serverless backends?

Mirrored tests for Deno and Node are needed to keep validation rules synchronized across runtimes, reducing context-switching and enabling reliable cross-runtime validation from day one in mixed-runtime serverless backends.

Can I use this to generate a Vitest test harness for existing edge functions?

Generating a Vitest test harness applies to new edge function scaffolding, creating both backend structure and mirrored tests together. It does not retroactively apply mirrored test logic to existing standalone edge functions.

What's the best way to keep validation rules consistent across Deno and Node runtimes?

The best way to keep validation rules consistent across Deno and Node is to scaffold edge functions with mirrored test logic, enforcing shared basic structure and validation rules across both runtimes through automated templates.

Does scaffolding edge functions with mirrored logic require manual test setup?

Scaffolding edge functions with mirrored logic does not require manual test setup, as the scaffold script automatically generates a minimal test harness alongside the backend code to enforce consistent validation.

When should I not use mirrored test logic for edge function scaffolding?

You should not use mirrored test logic for edge function scaffolding if your backend operates on a single runtime without cross-runtime validation needs, as the mirrored structure adds unnecessary test synchronization overhead.