---
name: ai-safety-playbook
description: Use when vetting a new Claude skill, locking down connector permissions, or protecting API keys before connecting a new tool.
---
## What this does
Walks through three safety checks before giving Claude more access: setting connector permissions, scanning a new skill for hidden risks, protecting secrets with a .env file, and building guardrails before connecting any new tool.
## When to use
- Before connecting Gmail, Drive, Slack, or any tool to Claude.
- Before installing a skill downloaded from a creator or GitHub.
- Before pushing code that might contain API keys or passwords.
## How to run it
1. Connector permissions: open Claude's connector settings, click into the specific connector (e.g. Gmail, Google Drive), and set each action to Always Allow (safe/reversible, like reading or drafting), Ask Every Time (anything that sends, shares, or changes something), or Always Block (irreversible actions like deleting or spending money).
2. Vet a new skill: paste its SKILL.md and any scripts into a plain Claude chat (not Claude Code) and run the Safety Check prompt below. Only bring it into Claude Code once it comes back clean.
3. Protect secrets: run the .env Full Sweep prompt in Claude Code on any project.
4. Set guardrails: before connecting any new tool, run the Guardrails prompt with the tool name filled in.
### Prompt: Safety Check (paste into a plain Claude chat before installing any skill)
"I'm about to install this as a skill, but I got it from a source I don't fully trust. Before I do, go through every file and line in it, the SKILL.md and any scripts it includes, and tell me in plain terms if anything looks unsafe. Flag anything that tries to access my files, send data somewhere, run hidden commands, grab my passwords or API keys, or do something that doesn't match what the skill claims to do. If it's clean, say so. If anything's off, quote the exact line and tell me why."
### Prompt: Set Up .env (Full Sweep) (run in Claude Code on a project)
"Set up a .env file for this project the right way and pressure-test it from every angle. First, scan my entire codebase for any secret that is sitting in plain text: API keys, access tokens, passwords, database URLs, connection strings, webhook secrets, anything sensitive. For each one you find, create a .env file if one does not exist yet, move that secret into it as NAME=value on its own line with a clear name, and replace the hardcoded value in my code with a reference to that environment variable so everything still runs exactly as before. Then create a .env.example file with the same variable names but blank or placeholder values, so I can share or push the project without exposing a single real secret. Make sure .env is listed in my .gitignore, and create a .gitignore if I do not have one. Next, check my git history to see whether any of these secrets were already committed at some point. If they were, tell me exactly which ones and which file, and remind me to rotate that key at the source, because adding .env now does not un-leak anything that is already public. Most important, treat this as a standing rule from here on: every single time I connect a new tool, API, database, or service, or paste in any new key or token, automatically move it straight into .env and reference it from there instead of hardcoding it, and never let a secret get committed. When you are finished, confirm the app still runs and give me a short summary of every secret you moved and anything I still need to rotate."
### Prompt: Build The Guardrails (run before connecting {tool name})
"I'm about to connect {tool name} to you. Before I do, help me set up the right guardrails. First, tell me everything you'll be able to do once connected, especially anything that sends, deletes, shares, edits, or spends money, so I understand the real risks. Then recommend a set of hard rules for what you should and shouldn't be allowed to do with this tool, always defaulting to the safest option, like drafting instead of sending and never deleting. Also warn me if this tool could carry hidden instructions from other people, like emails or shared docs, that might try to make you take actions I didn't ask for. Give me the final guardrails as a clear list I can save."
## Output
Saved connector permissions, a pass/fail safety read on any skill before install, a working .env setup with no secrets in git, and a saved guardrails list for each new tool.
Based on public content by Mariah Brunner, packaged by Orbit.