Requests a workspace-wide service token through chat
Source references: 5When no token is found locally, the Skill explicitly asks the user to paste one into the conversation. The token is not limited to the new project: it grants access to every project, database, and connection in the workspace. Conversation history, agent context, or visible logs may therefore retain a powerful credential.
Anyone or any system that obtains the token could access or operate resources across the whole Prisma workspace, not just the database being created.
When no token is available, the active workflow explicitly asks the user to paste it into the conversation. The reference says this token can access every project, database, and connection in the workspace, so exposure through chat history or agent context affects more than the current project. A user can require a controlled environment variable or secret manager and use a dedicated, short-lived token that is rotated afterward.
**1a. Token in the user's prompt**Check if the user included a service token in their initial message (e.g., "Set up Prisma Postgres with token eyJ..."). If so, use it **exactly as provided** — do not truncate, re-encode, or round-trip it through a file. Store it in a shell variable for subsequent calls.**1b. Token in the environment**Check for `PRISMA_SERVICE_TOKEN` in the environment or `.env` file.**1c. Ask the user to create one**If no token is available, instruct the user:> Create a service token in Prisma Console → Workspace Settings → Service Tokens.> Copy the token and paste it here.Read `references/auth.md` for details on service token creation.Once you have a token, store it in a shell variable (`PRISMA_SERVICE_TOKEN`) and use it for all subsequent API calls.Show 4 other places
Service tokens authenticate server-to-server requests. They are scoped to a workspace and grant access to all resources within it.### Token scopeService tokens are workspace-scoped. A single token grants access to all projects, databases, and connections within the workspace. There are no project-scoped tokens at this time.**1c. Ask the user to create one**If no token is available, instruct the user:> Create a service token in Prisma Console → Workspace Settings → Service Tokens.> Copy the token and paste it here.### Security practices- Store tokens in environment variables or secret managers, never in source code- Add `.env` to `.gitignore` to prevent accidental commits- Rotate tokens periodically via Console → Workspace Settings → Service Tokens- In CI/CD, store tokens as encrypted secrets (e.g., GitHub Secrets)