---
name: "prisma-accelerate-connection-pool"
description: "Scale serverless database connections and cache queries globally using Prisma Accelerate."
metadata:
  author: "Prisma"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup prisma accelerate"
  - "cache query with prisma accelerate"
  - "serverless connection pool prisma"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Prisma Accelerate Global Edge Caching & Connection Pool

Configures Prisma Accelerate: connecting serverless functions to remote databases with pooled connection strings (prisma://), setting per-query cache TTLs (swr, ttl), and managing global cache invalidations.

## When to Invoke
Invoke this skill whenever you need to:
- setup prisma accelerate
- cache query with prisma accelerate
- serverless connection pool prisma

## Execution SOP & Rules
1. Configure DATABASE_URL with Prisma Accelerate connection string (prisma://accelerate.prisma-data.net/...).
2. Install client extension: import { withAccelerate } from '@prisma/extension-accelerate'; prisma.$extends(withAccelerate()).
3. Apply cache strategy to queries: prisma.post.findMany({ cacheStrategy: { ttl: 60, swr: 30 } }).
4. Monitor query execution times and cache hit ratios via Prisma Data Platform metrics.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
