Agent skill
prisma-postgres
Prisma Postgres API for database. Use when user mentions "Prisma Postgres", "Prisma database", or asks about Prisma acceleration.
Install this agent skill to your Project
npx add-skill https://github.com/vm0-ai/vm0-skills/tree/main/prisma-postgres
SKILL.md
Prisma Postgres Management API
Manage Prisma Postgres projects, databases, connections, backups, and usage metrics via the Management API.
Official docs:
https://www.prisma.io/docs/postgres/introduction/management-api
When to Use
- Create and manage Prisma Postgres projects and databases
- Create and manage database connections (pooled, direct, accelerate)
- List available regions for deploying databases
- View database usage metrics (operations and storage)
- Manage database backups and restore from backups
Prerequisites
To obtain a token manually:
- Go to Prisma Console
- Navigate to your workspace Settings > Service Tokens
- Click New Service Token and store the generated token securely
Core APIs
List Projects
curl -s "https://api.prisma.io/v1/projects" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, name, createdAt}'
Docs: https://www.prisma.io/docs/postgres/introduction/management-api
Get Project Details
Replace <project-id> with the actual project ID:
curl -s "https://api.prisma.io/v1/projects/<project-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '{id, name, createdAt}'
Create Project
Write to /tmp/prisma_request.json:
{
"name": "my-project",
"region": "us-east-1",
"createDatabase": true
}
curl -s -X POST "https://api.prisma.io/v1/projects" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d @/tmp/prisma_request.json | jq '{id, name, databases}'
Available regions can be listed with the regions endpoint below.
Update Project
Replace <project-id> with the actual project ID.
Write to /tmp/prisma_request.json:
{
"name": "updated-project-name"
}
curl -s -X PATCH "https://api.prisma.io/v1/projects/<project-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d @/tmp/prisma_request.json | jq '{id, name}'
Delete Project
Replace <project-id> with the actual project ID:
curl -s -X DELETE "https://api.prisma.io/v1/projects/<project-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" -w "\nHTTP Status: %{http_code}\n"
Returns HTTP 204 on success.
List Databases
List all databases, optionally filtered by project:
curl -s "https://api.prisma.io/v1/databases?projectId=<project-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, name, region, createdAt}'
Get Database Details
Replace <database-id> with the actual database ID:
curl -s "https://api.prisma.io/v1/databases/<database-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '{id, name, region, connections}'
Create Database
Replace <project-id> with the actual project ID.
Write to /tmp/prisma_request.json:
{
"name": "my-database",
"region": "us-east-1"
}
curl -s -X POST "https://api.prisma.io/v1/projects/<project-id>/databases" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d @/tmp/prisma_request.json | jq '{id, name, region, connections}'
Update Database
Replace <database-id> with the actual database ID.
Write to /tmp/prisma_request.json:
{
"name": "renamed-database"
}
curl -s -X PATCH "https://api.prisma.io/v1/databases/<database-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d @/tmp/prisma_request.json | jq '{id, name}'
Delete Database
Replace <database-id> with the actual database ID (cannot delete default databases):
curl -s -X DELETE "https://api.prisma.io/v1/databases/<database-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" -w "\nHTTP Status: %{http_code}\n"
Returns HTTP 204 on success.
List Connections
List all connections for a specific database. Replace <database-id>:
curl -s "https://api.prisma.io/v1/databases/<database-id>/connections" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, name, endpoints}'
Create Connection
Create a new connection string for a database. Replace <database-id>:
curl -s -X POST "https://api.prisma.io/v1/databases/<database-id>/connections" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d '{"name": "my-connection"}' | jq '{id, name, endpoints}'
The response includes connection strings for direct, pooled, and accelerate endpoints.
Delete Connection
Replace <connection-id> with the actual connection ID:
curl -s -X DELETE "https://api.prisma.io/v1/connections/<connection-id>" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" -w "\nHTTP Status: %{http_code}\n"
Returns HTTP 204 on success.
List Database Backups
Replace <database-id> with the actual database ID:
curl -s "https://api.prisma.io/v1/databases/<database-id>/backups?limit=10" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, createdAt}'
Restore Database from Backup
Replace <target-database-id> with the database to restore into.
Write to /tmp/prisma_request.json:
{
"source": {
"type": "backup",
"databaseId": "<source-database-id>",
"backupId": "<backup-id>"
}
}
curl -s -X POST "https://api.prisma.io/v1/databases/<target-database-id>/restore" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" --header "Content-Type: application/json" -d @/tmp/prisma_request.json | jq '{id, name, status}'
Cannot restore to default databases.
Get Database Usage Metrics
Replace <database-id> with the actual database ID:
curl -s "https://api.prisma.io/v1/databases/<database-id>/usage?startDate=2025-01-01T00:00:00Z&endDate=2025-01-31T23:59:59Z" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq .
Returns operations (ops) and storage (GiB) metrics for the specified period.
List Available Regions
curl -s "https://api.prisma.io/v1/regions/postgres" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, displayName, status}'
List Workspaces
curl -s "https://api.prisma.io/v1/workspaces" --header "Authorization: Bearer $(printenv PRISMA_POSTGRES_TOKEN)" | jq '.[] | {id, name}'
Guidelines
- Default database: Projects created with
createDatabase: trueinclude a default database that cannot be deleted - Regions: Choose the region closest to your application; databases cannot be moved after creation
- Connection types: Each database connection provides direct, pooled, and accelerate endpoints for different use cases
- Backups: Remote database backups are not supported; use the restore endpoint to restore from existing backups
- Pagination: List endpoints support
cursorandlimitquery parameters for pagination (default limit: 100) - Rate limits: API rate limits apply; if you receive HTTP 429, implement exponential backoff
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
brave-search
Brave Search API for web search. Use when user says "search web", "Brave search", or asks to "find on web" without specifying Google.
supadata
Supadata API for YouTube/web data. Use when user mentions "Supadata", "YouTube data", "channel stats", or web scraping data.
roadmap-planning
Build and prioritize product roadmaps using scoring models like RICE, ICE, and value-effort matrices. Activate when creating a product roadmap, prioritizing features, sequencing initiatives, mapping dependencies, balancing team capacity, choosing between Now/Next/Later or quarterly planning, or communicating roadmap tradeoffs to executives and stakeholders.
qdrant
Qdrant API for vector search. Use when user mentions "Qdrant", "vector database", "semantic search", or embeddings storage.
calendly
Calendly scheduling API. Use when user mentions "Calendly", "calendly.com", "schedule a meeting", "booking link", "event types", or asks about interview scheduling.
stripe
Stripe API for payments. Use when user mentions "Stripe", "payment", "subscription", "billing", "invoice", or asks about payment processing.
Didn't find tool you were looking for?