Overview
Every successful skill execution triggers two parallel async chains, both dispatched non-blocking viactx.waitUntil. Credits are only deducted on success — failures and rate-limit blocks never charge the user.
Chain A: Credit Deduction
VERCEL_WEBHOOK_URL) is the bridge to uniskill-web’s Supabase instance, writing the transaction into the persistent ledger.
Chain B: Telemetry (Dual Write)
1. recordSkillCall → Supabase RPC
Captures structured per-call statistics in tri-state format:
record_skill_usage:
2. saveInvocationLog → Supabase REST
Raw payload audit written directly to the invocations table:
Layered Cache Architecture
UUID Safety
Both telemetry chains validate all UUID fields with a strict regex before writing. Any non-UUID value (e.g. skill name strings,"anonymous") falls back to:
p_metadata.