# Install and operate Passkey for AI (instructions for AI coding agents)

Source: https://passkeyforai.com/install.md. Last updated: 2026-11-30.

You are an AI coding agent (Claude Code, Codex, Antigravity or similar) and a human asked you to set up or operate Passkey for AI on their Mac. This file is the procedure. Follow it exactly, one task at a time. Human page: https://passkeyforai.com/install-with-ai

## Safety rules

These apply to every task.

1. Passkey is a Touch ID gate for Claude Code. It deliberately stops an AI agent from changing its own files, approving its own config, registering or removing its hook, and uninstalling it. Those steps need my fingerprint on the Mac.
2. At every Touch ID step, stop. Tell me exactly what to do (the command to run, the sheet that will appear, what to touch) and wait until I say it is done. Do not continue on your own.
3. Never try to bypass, disable, edit or work around Passkey. If a command is blocked or asks for Touch ID, that is the product working. Do not retry it in another form, do not script around it, do not stop processes, and do not edit ~/.claude/settings.json, ~/.claude/passkey, /usr/local/etc/passkey or /usr/local/libexec/passkey yourself.
4. Never read or print license files, member keys, admin keys or enrollment tokens. Use only what I paste to you in this chat, and do not repeat it back. Do not put a secret into a command you run. Give me the command and I will run it in my own terminal.
5. Do not run a command that changes security settings until I have seen it. Show me the exact command and say what it changes.
6. When you finish, report what you did, what you checked and what the check said, and anything that failed or that you could not do. Do not claim a step worked unless you saw the result.

If you are Claude Code, Passkey guards your own tool calls once it is installed. If you are Codex, Antigravity or another agent, Passkey's hook does not see your tool calls, so these rules bind you by instruction and nothing enforces them. Follow them anyway. An AI agent doing the setup is a convenience. The human still owns every Touch ID approval.

## What works today

- Passkey for AI 1.x is in early release. There is no binary download yet. The installer (install.sh) builds one Swift file on the Mac, so the Mac needs the Xcode Command Line Tools.
- You need the release folder: the folder that holds install.sh, src/passkey.swift and presets/. If I do not have it, ask me where to get it. The README quick start clones https://github.com/shreyvaughn/passkey-for-claude.git for people who have access. Do not download Passkey from anywhere else and do not invent a download URL.

Notation. BIN means the Passkey program: ~/.claude/passkey/bin/passkey for a normal install, /usr/local/libexec/passkey/passkey for a hardened install. It may not be on PATH, so use the full path.

## Tasks

- [Install Passkey](#install): Check the Mac, choose hardened or normal and the presets, run the installer, register the hook and verify it.
- [Activate a Pro license](#license): Install the signed license file you downloaded and confirm Passkey sees Pro.
- [Join a Team](#join-team): Connect this Mac to your team with a member key or an enrollment token, without the key touching the chat.
- [Set up Team as an admin](#admin-team): Plan members, the enrollment token and MDM profile, the policy and phone approvers, with you doing the portal steps.
- [Add a custom rule](#custom-rule): Draft and validate a rule with the agent, then add it and approve it yourself with Touch ID.
- [Review the audit log](#review-log): Read the local audit log, count decisions and flag anything worth a second look. Read only.
- [Uninstall Passkey](#uninstall): Prepare the removal and verify it afterwards. The removal itself needs your fingerprint and your own terminal.

<a id="install"></a>

## Install Passkey

Install Passkey for AI on my Mac and register its hook in Claude Code.

Steps:

1. Check the Mac. Run sw_vers -productVersion (macOS 13 or later is required), xcode-select -p and swiftc --version. If xcode-select -p fails, tell me to run xcode-select --install in my terminal and wait. Ask me whether this Mac has a Touch ID sensor or a Magic Keyboard with Touch ID. Passkey has no password fallback, so without one, gated actions are refused. Check that Claude Code is installed with claude --version.
2. Find the release folder (see "What works today"). Run ls on it and confirm install.sh, src/passkey.swift and the presets folder are there. Read install.sh and README.md so the commands you give me are exact.
3. Ask me these questions in one message. Hardened or normal? Hardened puts a root-owned binary in /usr/local/libexec/passkey and the config in /usr/local/etc/passkey so Claude cannot edit its own rules, and it asks for my sudo password. It is recommended. Which presets: stripe (free, recommended), git, publish, shell-danger. The last three need a Pro license and stay off without one. Mode: per-call (default, asks every time) or window (one Touch ID, then 1 to 120 minutes, default 15, for that Claude session).
4. Build the install command from my answers: ./install.sh --presets <comma list> with --mode window --window-minutes <n> if I chose window mode and --hardened if I chose hardened. Use --presets none for only the built-in guard. Always pass --presets so the installer does not ask questions on a terminal you do not have.
5. Show me the exact command and what it does: it builds src/passkey.swift with swiftc, copies the program and presets, writes the config, registers the hook in ~/.claude/settings.json (after backing it up to settings.json.bak-passkey) and asks for Touch ID once.
6. Touch ID step. If Passkey is not installed yet and I chose a normal install, you may run the command yourself once I agree. A Touch ID sheet appears on my Mac. Stop and tell me to touch the sensor. For a hardened install, or if Passkey is already installed, give me the command to run in my own terminal in the release folder, because it needs my sudo password or the guard will block you. Wait until I say it finished.
7. Do not try to register the hook, edit settings.json or run passkey approve or install-hook yourself.

Check:

- Run BIN status. Report the approval state, the mode, the presets and the license line it prints.
- Run BIN check-config. It should report no errors.
- Run grep -n passkey ~/.claude/settings.json (read only) and confirm a PreToolUse hook entry points at the Passkey program.
- Ask me to run BIN test-dialog. A Touch ID sheet appears and I touch the sensor. Wait for my answer.

Hand back to the human:

- Tell me to restart Claude Code (or open /hooks) so it loads the hook.
- List the choices that were made (hardened or normal, presets, mode) and what status said.
- Remind me that the audit log is ~/.claude/passkey/audit.log and that git, publish and shell-danger need a Pro license (the next task).

<a id="license"></a>

## Activate a Pro license

Install my Pro license file into Passkey.

Steps:

1. Confirm Passkey is installed: run BIN status. If it is not, do the Install Passkey task first.
2. Ask me for the path of the license file I downloaded after checkout. It is usually ~/Downloads/license.json. Do not open, read or print the file. It is a signed file and its content is not for you.
3. Run BIN license install <path to the file>. This checks the signature on the Mac and installs it, and it makes no network call. If the guard blocks the command or asks for Touch ID, stop and give me the exact command to run in my own terminal.

Check:

- Run BIN status. The license line should say pro. The git, publish and shell-danger presets should now be on if I chose them at install.
- If status still says free, tell me what it printed. Do not guess a cause and do not edit any file.

Hand back to the human:

- Tell me the license works offline on every Mac I own, and that I install the same file on each one.
- If I lost the file, the link in my Stripe receipt downloads it again.

<a id="join-team"></a>

## Join a Team

Join this Mac to my Passkey for AI Team.

Steps:

1. Confirm Passkey is installed: run BIN status. If it is not, do the Install Passkey task first.
2. Ask me which I have: a member key (starts with pkm_) from my team admin, an enrollment token (starts with pke_), or neither. If neither, tell me to ask my admin. A Mac whose MDM profile carries the token enrolls itself when passkey team sync runs, so nothing else is needed.
3. Do not ask me to paste the key or token into this chat, and do not run the command with it. Tell me to run one of these in my own terminal so the secret stays out of this chat and out of any command you run: BIN team join <member key>   or   BIN team enroll <enrollment token>. Wait until I say it finished.

Check:

- Run BIN team sync, then BIN team status. Report the team, the seat, the policy version and the last sync it shows.
- If either command fails, report the message as it was printed and stop.

Hand back to the human:

- Tell me what a Mac on a team sends to passkeyforai.com: the audit log lines (the action summary, the rule name, the decision, the session id and the time), the device name, the version and approval requests. It never sends file contents, command output or prompts.
- Tell me that BIN team leave stops this Mac from syncing with the team.

<a id="admin-team"></a>

## Set up Team as an admin

Help me set up my Passkey for AI Team as its admin.

Steps:

1. Do not ask for the admin key (it starts with pka_). You will not use it. I sign in to the portal myself at https://passkeyforai.com/team and paste the key there, in my browser. If I lost it, the thank-you page shows it for 24 hours after checkout and my Stripe receipt links to it.
2. Ask me for the list of people (email or name), how many Macs each person has, whether the Macs are managed by an MDM, and who should be able to approve from a phone. Check the count against the seats I bought. A seat is a member who is not removed.
3. Members tab: I add each person. Each gets a member key shown once, and I pass it to that person privately. Do not collect the keys.
4. Enrollment and MDM tab, for a fleet: I create an enrollment token (starts with pke_, shown once) and download the .mobileconfig profile. I deploy the profile with our MDM. It sets TeamEnrollToken in the managed preference domain com.passkeyforai.passkey, and each Mac enrolls itself on its next passkey team sync, using one seat. Rotating the token stops the old one. The profile does not install Passkey, so Passkey must already be on the Macs.
5. Policy tab: draft a policy with me and show it as JSON for me to review. Fields: mode (null, always or window), window_minutes (null or 1 to 120), presets (any of stripe, git, publish, shell-danger), rules (extra rules, same format as config.json, action block or auth only), approval (channel touchid, touchid_or_phone or two_person, rules all or a list of rule names, timeout_seconds 10 to 120) and audit (ship true or false). A policy can only add protection. I paste it into the Policy tab and save.
6. Phone approvers: in the Members tab I choose Make approver for a person, which creates a one-time invite link valid for 24 hours. The person opens it on their phone. On iPhone they need iOS 16.4 or later, use Add to Home Screen, open the app from the home screen and allow notifications. The two_person channel needs one approver who is a different person from the member asking, so set it up only when at least two people can approve.

Check:

- Overview tab: seats used matches the people added and the status is active.
- After the first sync from a member's Mac, the Audit tab shows events and the Reports tab builds a report.
- Ask me to confirm each portal step as it is done. You cannot see the portal.

Hand back to the human:

- List what is set up (members, token, profile, policy, approvers) and what is still open.
- Remind me that the member keys, the enrollment token and the admin key are shown once and belong in a password manager.

<a id="custom-rule"></a>

## Add a custom rule

Write a custom Passkey rule for me and prepare it for approval.

Steps:

1. Check BIN status. Custom rules are a Pro feature. If the license line says free, tell me and stop.
2. Read the rule fields at https://passkeyforai.com/docs#rules or in README.md (Write your own rules). The fields are name, tool, field, pattern, not_pattern, scope, max, action (block or auth), reason, describe, amount, live_flag and always_ask. Do not use any other field.
3. Ask me in plain words what to guard: which tool or command, which values, and whether it should block or ask for Touch ID. Prefer an MCP tool over a shell command when one exists, because its inputs are structured.
4. Write the rule as JSON in a scratch file in the current directory named passkey-rule.json. Do not write inside ~/.claude/passkey, /usr/local/etc/passkey or /usr/local/libexec/passkey. The guard blocks that and you must not try.
5. Check the syntax with python3 -m json.tool passkey-rule.json. Show me the rule and say which calls it will match and which it will not.
6. Touch ID step. Tell me to do this in my own terminal: add the rule object to the "rules" array in config.json (~/.claude/passkey/config.json, or /usr/local/etc/passkey/config.json for a hardened install, which needs sudo), then run BIN check-config, then BIN approve. BIN approve shows every changed file and asks for Touch ID. You must not edit the config or run approve yourself. Wait until I say it finished.

Check:

- Run BIN check-config. It should report no errors.
- Run BIN status. The rule count should include the new rule and the approval state should be ok.
- Do not test the rule by running the risky action unless I ask you to.

Hand back to the human:

- Tell me a new rule applies at once, but removing a rule or switching to window mode only takes effect after BIN approve.
- Leave passkey-rule.json in place or delete it as I choose.

<a id="review-log"></a>

## Review the audit log

Review my Passkey audit log and summarize the risky actions.

Steps:

1. Ask me which period to cover. The default is the last 7 days.
2. Read ~/.claude/passkey/audit.log read only. Do not edit, move or delete it. Use tail, grep and wc, and do not paste the whole file into the chat. Each line starts with an ISO timestamp, then a decision: APPROVED[session], APPROVED-WINDOW[session], APPROVED-PHONE[session], APPROVED-TWO[session], DENIED[session], DENIED-PHONE[session] or BLOCKED[session] followed by the tool, :: and the rule name.
3. Summarize: counts per decision, counts per rule for BLOCKED lines, the most blocked rules, every DENIED line, approvals for production, money or deletes, and sessions with unusually many approvals.
4. Flag anything unusual. A BLOCKED line that names Passkey's own files means an agent tried to touch the gate. Quote each flagged line, with anything that looks like a key or token replaced by [redacted].
5. Suggest rule changes if the log shows a gap, but do not change any rule.

Check:

- State the period you covered and the number of lines you read, so I can see it matches the file.

Hand back to the human:

- A short table of counts and a list of the lines I should look at myself.
- Remind me that Touch ID proves I was present, not that I read the dialog, so the log is my second look.

<a id="uninstall"></a>

## Uninstall Passkey

Help me remove Passkey for AI from my Mac.

Steps:

1. Confirm that I want it removed. Say what goes: the hook entry in Claude Code settings, the install folders (and the hardened folders, which need sudo), and the folder ~/.claude/passkey, which holds the license file. The audit log is saved to ~/passkey-audit-<date>.log first. Tell me to keep a copy of my license file (the link in my Stripe receipt downloads it again).
2. Run BIN status and note what is installed, so the report at the end is accurate.
3. Touch ID step. Tell me to run ./uninstall.sh in my own terminal, in the release folder. It asks for Touch ID, and a hardened install also asks for my sudo password. The guard blocks Claude from running removal commands and from editing settings, so you must not try. If the release folder is gone, ask me to get it again, because uninstall.sh is in it. Wait until I say it finished.

Check:

- Run ls ~/.claude/passkey. It should not exist. If I had a hardened install, also run ls /usr/local/libexec/passkey and ls /usr/local/etc/passkey. They should not exist.
- Run grep -n passkey ~/.claude/settings.json. It should show no Passkey hook entry.
- Run ls ~/passkey-audit-*.log to confirm the saved audit log.

Hand back to the human:

- Tell me to restart Claude Code to drop the hook.
- Report which checks passed and anything left behind.

## Reference

- Docs: https://passkeyforai.com/docs
- Team guide: https://passkeyforai.com/team-guide
- Privacy: https://passkeyforai.com/privacy
- Site summary for models: https://passkeyforai.com/llms.txt
