supabase-fn-logs
Query Supabase Edge Function invocations and log lines for the DFL prod project (`yoojxnggaxcqtsyjdrdx`) via the Logflare-backed Analytics API. **Use this skill instead of calling `bash /root/.claude/skills/supabase-fn-logs/run.sh` directly** or hand-rolling the Analytics API curl. Skill-tool route handles project ID, auth, time-range params, and JSON pagination. Use for edge function call counts, error rates, console output, and to verify the 7-day soak gate for retired functions (e.g. invocations of a retired function should drop to zero). Trigger phrases — "supabase fn logs", "edge function logs", "function invocations supabase", "how many times was fn X called", "show me logs for edge function X", "console output of <fn>", "errors on supabase function", "fn X call count", "verify <fn> retired (zero invocations)", "soak gate check", "supabase edge function errors", "logs da edge function X", "quantas vezes <fn> rodou", "function call rate", "is <fn> still being called". Skip for non-edge-function Supabase logs (use `supabase-helpers` SELECT against logs tables if accessible) and for DB query logs (use Supabase dashboard).
Tech stack
Works with
---
name: supabase-fn-logs
description: Query Supabase Edge Function invocations and log lines for the DFL prod project (`yoojxnggaxcqtsyjdrdx`) via the Logflare-backed Analytics API. **Use this skill instead of calling `bash /root/.claude/skills/supabase-fn-logs/run.sh` directly** or hand-rolling the Analytics API curl. Skill-tool route handles project ID, auth, time-range params, and JSON pagination. Use for edge function call counts, error rates, console output, and to verify the 7-day soak gate for retired functions (e.g. invocations of a retired function should drop to zero). Trigger phrases — "supabase fn logs", "edge function logs", "function invocations supabase", "how many times was fn X called", "show me logs for edge function X", "console output of <fn>", "errors on supabase function", "fn X call count", "verify <fn> retired (zero invocations)", "soak gate check", "supabase edge function errors", "logs da edge function X", "quantas vezes <fn> rodou", "function call rate", "is <fn> still being called". Skip for non-edge-function Supabase logs (use `supabase-helpers` SELECT against logs tables if accessible) and for DB query logs (use Supabase dashboard).
license: MIT
---
# supabase-fn-logs
Wraps the Supabase Analytics API (Logflare-backed BigQuery) to query edge function invocations and log lines for DFL prod.
## Trigger phrases
- "supabase fn logs", "edge function logs", "function invocations supabase"
- "how many times was fn X called"
- "show me logs for edge function X"
- "verify dfl-publisher-generate-title-desc has zero invocations" (7-day soak gate)
- "function_edge_logs", "function_logs"
## Auto-trigger
When claude-main needs to verify the 7-day soak gate from the drift cleanup plan:
`dfl-publisher-generate-title-desc` invocations should drop to zero after retirement.
Run: `./query.sh invocations dfl-publisher-generate-title-desc --since 7d`
## CLI usage
```bash
cd /root/.claude/skills/supabase-fn-logs
# Count invocations for a function
./query.sh invocations <fn_name> [--since 7d|24h|1h]
# Show log lines (console output, errors, shutdowns)
./query.sh logs <fn_name> [--limit 50] [--since 1h]
# Examples
./query.sh invocations transcribe-audio --since 24h
./query.sh invocations dfl-publisher-generate-title-desc --since 7d
./query.sh logs dfl-github-webhook --limit 20 --since 1h
```
## Auth
Fetches `SUPABASE_ACCESS_TOKEN` from Infisical at `/supabase/SUPABASE_ACCESS_TOKEN` via `credentials-lookup`. Never written to disk.
## API used
- **Analytics endpoint:** `GET https://api.supabase.com/v1/projects/yoojxnggaxcqtsyjdrdx/analytics/endpoints/logs.all`
- Query params: `sql=<BigQuery SQL>`, `iso_timestamp_start`, `iso_timestamp_end`
- **NOT** the Management API `/functions/{slug}/metrics` — that endpoint returns 404 (does not exist on this plan)
- **NOT** POST body — GET with URL-encoded `sql=` param is the working form
## Log tables (BigQuery-backed)
- `function_edge_logs` — one row per invocation: `event_message` (method|status|url), `metadata[0].function_id`, `metadata[0].execution_time_ms`, `metadata[0].response[0].status_code`
- `function_logs` — one row per log event (console.log, console.error, shutdown, boot): `event_message`, `metadata[0].event_type`, `metadata[0].level`
Filter by function name: `WHERE event_message LIKE '%/functions/v1/<fn_name>%'`
Filter by function_id: `WHERE metadata[0].function_id = '<uuid>'` (use after resolving slug→id via Management API)
## Drift signals
- **Management API `/functions/{slug}/metrics`** — returns 404. This endpoint does not exist in the current Supabase plan or API version.
- **POST body for analytics** — returns 404. Only GET with `sql=` query param works.
- **`SELECT *` is blocked** — analytics returns `restricted wildcard (*) in a result column`. Always name columns explicitly.
- **`metadata.request.path`** — invalid BigQuery syntax (it's an ARRAY). Use `event_message LIKE '%..%'` to filter by URL.
- **Rate limits** — not encountered during initial testing (2026-05-04). The analytics API is BigQuery-backed; very wide time windows + large result sets may time out.
## Soak gate use case
To verify `dfl-publisher-generate-title-desc` retirement (drift cleanup plan):
```bash
./query.sh invocations dfl-publisher-generate-title-desc --since 7d
# Success criterion: count = 0
# If count > 0: function is still being called — retirement is blocked
```More SEO & Marketing skills
ai-video-generation
skills-101/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
skills-101/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image
ai-avatar-video
skills-101/superpowers
Create AI avatar and talking head videos via inference.sh CLI. Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS). Also: OmniHuman, Fabric, PixVerse. Audio: Inworld TTS-2 (100+ languages, emotion steering for characters), ElevenLabs, Kokoro. Capabilities: audio-driven avatars, text-to-avatar, lipsync videos, talking head generation, virtual presenters, UGC content. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos, UGC ads, gaming avatars, NPC dialogue. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human, ugc, ugc video, ugc ad, avatar ugc

