agentsclimarketplace

Edge functions

Skill Ampli-Group/agentic-mobile-blueprint/.agents/skills/edge-functions

The production-ready foundation for shipping mobile and web apps. Auth, deployment, monitoring, and CI/CD — already wired together.

Install
npx -y skills add Ampli-Group/agentic-mobile-blueprint --skill edge-functions

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Supabase Edge Function development patterns with Deno runtime. Use when creating, modifying, or debugging edge functions. For Langfuse tracing see the langfuse-tracing skill. For Sentry error handling see the sentry-integration skill.

SKILL.md

2.1 KB, as published. Nobody here has run it

Supabase Edge Functions

Runtime

Deno. Entry point: Deno.serve(). Files live in supabase/functions/<name>/index.ts.

New Function Scaffold

import { initSentry, handleError } from "../_shared/sentry.ts";

initSentry();

const corsHeaders = {
  "Access-Control-Allow-Origin": "*",
  "Access-Control-Allow-Headers": "authorization, x-client-info, apikey, content-type",
};

Deno.serve(async (req: Request) => {
  if (req.method === "OPTIONS") return new Response("ok", { headers: corsHeaders });

  try {
    const body = await req.json();
    const result = { message: "Hello" };
    return new Response(JSON.stringify(result), {
      headers: { ...corsHeaders, "Content-Type": "application/json" },
    });
  } catch (error) {
    return handleError(error, { functionName: "my-function", corsHeaders });
  }
});

For AI calls, wrap with withTrace() — see the langfuse-tracing skill.

Imports

  • Shared code: ../_shared/sentry.ts, ../_shared/langfuse/gemini.ts
  • External: via import map in supabase/functions/deno.json
  • Convention: npm: prefix for npm packages, URLs for Deno packages

Calling from Frontend/Mobile

const { data, error } = await supabase.functions.invoke('my-function', {
  body: { prompt: 'Hello' },
});

Database Migrations

Path: supabase/migrations/. Naming: 00000000000000_slug.sql.

Rules:

  • Enable RLS on every table
  • Policies use auth.uid() for row-level access
  • Add updated_at trigger for mutable tables
  • Index foreign keys and common filter columns
  • Storage bucket policies: auth.uid()::text = (storage.foldername(name))[1]

Local Development

mise run supabase:function   # Starts functions with hot reload

Env vars for functions go in supabase/functions/.env.local.

Deploy

supabase functions deploy <function-name>

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.