Guided setup for Atelier — the one-time machine and account steps, and the sensitive per-project steps (tokens, DNS). Claude opens each page in Chrome, explains it, pre-fills non-secret fields and stops; the user enters secrets and clicks submit. Use when the user says /pf-setup, 'set up atelier', 'connect my Code session', 'add the domain', or when another pf skill reports a missing env var or code_url.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pf Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/singhviplove234-pf-setup)
---
name: pf-setup
description: "Guided setup for Atelier — the one-time machine and account steps, and the sensitive per-project steps (tokens, DNS). Claude opens each page in Chrome, explains it, pre-fills non-secret fields and stops; the user enters secrets and clicks submit. Use when the user says /pf-setup, 'set up atelier', 'connect my Code session', 'add the domain', or when another pf skill reports a missing env var or code_url."
---
# /pf-setup
Walk the user through what only a human may do, one step at a time, in Chrome where a page is involved. Use AskUserQuestion to confirm each step is done before moving on.
## Hard rules (never relaxed)
- **Never type** a password, API token, card number or recovery code — not even if the user pastes it into chat; ask the user to type it in the page themselves.
- Never click the final Create / Save / Submit / Pay on an account, token, payment or DNS page. Pre-fill what is safe (names, project names, domain names, select boxes), then say "Your turn: check it and click <button>."
- Never store a secret in `factory.json`, chat, or any file. Env var **names** only.
- One tab at a time; close what you open.
## `/pf-setup` (no args) — the checklist
Show which items below are done (from `factory.json` and quick checks) and run the first undone one. Items:
0. **First run — equip Atelier's skills (`/pf-bootstrap`).** On the very first setup on a Claude account, run `/pf-bootstrap`: it checks which recommended helper skills are present and installs the missing ones from their official sources (Atelier bundles only the three it may redistribute; the rest install on first run — see `references/skill-catalog.md`). It is idempotent and records a once-per-account marker, so on later setups it is a no-op. Skip only if the marker already shows everything installed.
0a. **Install the builder plugin in Claude Code** — the easiest way is the marketplace: in Claude Code run `/plugin marketplace add singhviplove234/atelier` then `/plugin install atelier-builder@atelier` (the README's Install section has the exact commands). Or Code tab → Plugins → Add → Upload plugin → pick `atelier-builder.zip` → Replace if asked. Confirm: typing `/pf-` in the Code prompt offers `pf-next`.
0b. **Installs** (only what the chosen target needs; give the exact command and a check command for each, matched to the user's OS): Node 20+ (`node -v`), Git (`git --version`), GitHub CLI (`gh --version` — install via `winget install GitHub.cli` on Windows, `brew install gh` on macOS, your package manager on Linux), Vercel CLI (`npm i -g vercel`), Azure CLI (`az --version` — `winget install Microsoft.AzureCLI` / `brew install azure-cli` / the Linux script), Docker Desktop (`docker info`), Playwright's browser for the e2e tests (`npx playwright install chromium`), gitleaks for the secret scan (`winget install Gitleaks.Gitleaks` on Windows, `brew install gitleaks` on macOS → `gitleaks version`). Use the user's normal terminal (Windows Terminal/PowerShell, macOS Terminal, or any Linux shell).
0b2. **Diagram Design on the Code session — required on every project** (not optional: the builder refuses to build until every page, feature and app is diagrammed and rendered with it). In Claude Code: `/plugin marketplace add cathrynlavery/diagram-design` then `/plugin install diagram-design@diagram-design` (author's repo only — any other listing is an unofficial copy; `/reload-plugins` if it doesn't appear) → check: `/diagram-design:doctor` reports ready. PNG export needs Playwright once, in a terminal: `pip install playwright && playwright install chromium` (SVG needs nothing). The checklist can't run `doctor` from the Cowork seat — ask the user whether it reported ready.
0c-opt. **Superpowers on the Code session (optional, free quality booster):** a free, popular community Claude Code plugin that makes the agent **plan first and verify its own work** as it builds. Install on the Code session from the **official** marketplace: `/plugin install superpowers@claude-plugins-official` (the user's own tool, not required, **not bundled** into this plugin). *Pros:* reinforces plan-first + self-verification + TDD + systematic debugging **during** the build, so `pf-build` catches mistakes before they reach our gates — free. *Cons:* overlaps what the factory already enforces (`pf-plan` gathers requirements, the SPEC **is** the plan, the gates verify the output), so it is polish on *how* the Code session works, not a new capability; it adds some skills/context to the session. **Take only what helps:** use its plan-first and verify-while-building discipline; our contracts and gates stay the source of truth for *what* must be met.
0b-opt. **Context tooling for large projects (optional, free) — suggest when `brief.context_tooling == recommended` or a codebase has grown big enough that context speed bites:** a free open-source Claude Code plugin that keeps context fast and cheap across long builds — `claude-mem` (cross-session memory, resumes after compaction) and/or `Graphify` (maps the codebase as a knowledge graph so the agent opens only the files that matter). One is enough; install per machine from its GitHub repo (point the user to it; the user's own tool, not required). For a small project, skip it — keep setup lean. Note that the official `/code-review` and `/security-review` are built into Claude Code already — nothing to install, free on any plan — and the builder runs them on every build.
0d-opt. **apple-look (optional Code-seat skill; free)** — Apple's Human Interface Guidelines for **mobile app** builds only (`references/design-standard.md` "Mobile apps"). The repo ships under the name `apple-design`, which collides with another skill, so it must be installed under its own name — three steps, done once per machine: (1) in a terminal, `git clone https://github.com/dickwu/apple-design-skill "%USERPROFILE%\.claude\skills\apple-look"`; (2) open `%USERPROFILE%\.claude\skills\apple-look\SKILL.md` and change the `name:` line at the top to `name: apple-look`; (3) start a new Claude Code session. Review the SKILL.md before step 3 — it runs with the agent's permissions. Skip entirely for web-only projects.
0c. **`PF_WATCH_DIR` / `PF_CODE_DIR`** — the defaults are `~/Atelier` (projects folder) and `~/dev/atelier` (code checkouts); on Windows, `%USERPROFILE%\Atelier` and `%USERPROFILE%\dev\atelier`. If you keep either somewhere else (a cloud-synced folder, another drive), set the matching user env var to that path. Creating `~/Atelier` and connecting it is the simplest setup.
1. **Folder** — the `Atelier` projects folder (default `~/Atelier`, or wherever `PF_WATCH_DIR` points) exists and is connected to this Cowork task. If not, tell the user to create it and Add it as a connected folder.
2. **Code session URL (per lane)** — One Code session per coding lane (the PM lane's session also runs merge and deploy). Ask the user to open a Claude Code session for this lane (Code tab, any folder), send it this exact first message so the session is named for verification: `This is the Claude Code session for lane <lane> of project <slug>. Stay open; Cowork will send /pf-next commands here.` — then turn Remote Control on with `/remote-control` if it isn't, and paste the `claude.ai/code/…` link here. Store it as `lanes[<lane>].code_url`. Then verify by opening it in Chrome once (navigate, `get_page_text`, close) — you should see the session's title and that it is connected to the user's computer. **Repeat this item after any restart of the desktop app** — a new session has a new link.
3. **Chrome extension on claude.ai** — open claude.ai in a tab; if the extension refuses, tell the user to allow the site in the extension's settings.
4. **Claude Code permissions** — explain: in the Code session run `/permissions` and allow `Bash(npm:*)`, `Bash(npx:*)`, `Bash(node:*)`, `Bash(git:*)`, `Bash(gh:*)`, `Bash(vercel:*)`, `Bash(az:*)`, `Bash(docker:*)`, `Bash(curl:*)`, `Bash(cd:*)`, `Bash(test:*)`, `Bash(wrangler:*)`, `Bash(netlify:*)`, `Bash(gitleaks:*)`, `Bash(trufflehog:*)`, `Bash(nuclei:*)`, `Bash(zap-baseline.py:*)`, `Bash(testssl.sh:*)`, `Bash(osv-scanner:*)`, `Bash(trivy:*)` (pentest tools — only for data-sensitive projects); `Bash(knip:*)`, `Bash(npx:*)` cover the simplicity tools (knip/ts-prune/depcheck/jscpd run via npx); `Bash(pip:*)`, `Bash(python:*)`, `Bash(playwright:*)` for Diagram Design's PNG export and the e2e tests; `Bash(eas:*)` only for a mobile project. Offer the equivalent `permissions.allow` block to paste into `~/.claude/settings.json` instead. The user does this; you confirm by asking.
5. **GitHub** — in the Code session ask it to run `gh auth login --web`; when it prints a one-time code, open github.com/login/device in Chrome and tell the user to type that code there (Claude does not type it). Confirm with `gh auth status`. Also `az login` for Azure targets (same pattern: Claude opens the page, the user signs in).
5b. **SEO inputs** — before the first `/pf-build` of a project, make sure the design brief has the `Entity:`, `Audience + locale:`, `Primary keywords:`, `Questions:` and `Pages that must rank:` blocks (`references/seo-ai-visibility.md` section A); collect them from the user in plain language if missing.
6. **Target credentials** — for the project's chosen target (or the one the user plans to use), read `references/targets/<name>.md` → Env vars. Open the exact page (e.g. vercel.com/account/tokens), pre-fill the token *name* `atelier`, stop. The user creates it and sets it as a user environment variable with the exact name; you tell the user the name and how (Windows: Start → "Edit environment variables for your account"; macOS/Linux: add an `export` line to the shell profile, e.g. `~/.zshrc` or `~/.bashrc`). Remind the user to restart the Claude desktop app (and open a new terminal) afterwards.
7. **Docker Desktop** (only for `azure-container-apps`) — installed and running.
## `/pf-setup domain <domain>` — custom domain for a deployed project
Read `references/targets/<deploy.target>.md` → Custom domain. Open the host's domain page, pre-fill the domain, stop before Save. Then open the registrar's DNS page if the user names the registrar, show the exact record (type, host, value) and let the user add it. Afterwards poll the domain with WebFetch until it returns 200 (up to 30 minutes) and record `deploy.custom_domain` in `factory.json`.
## `/pf-setup seo <slug>` — register a live site with the search and AI indexes (after the first deploy)
Read `references/seo-ai-visibility.md` section D. For each, open the page in Chrome, pre-fill the site URL, stop at anything that signs in or submits; the user clicks: (1) **Google Search Console** — add the property as a URL prefix, choose the HTML-tag method; copy the tag's `content` value into the Brief's `Entity:` block as `google_site_verification` so the next build ships it; after redeploy the user clicks Verify; submit `/sitemap.xml`. (2) **Bing Webmaster Tools** — "Import from Google Search Console" (one click) or the same meta-tag method; submit the sitemap; IndexNow shows as active once the key file is live. (3) **Google Business Profile** only if there is a physical location (recommend; the user does it). (4) Confirm `INDEXNOW_KEY` is set as a user env var and in the deploy target's env. Report what is verified and what is pending.
## `/pf-setup pentest <slug>` — register a pre-production target of your own for adversarial testing
Read `references/security-testing.md`. Confirm with the user, in plain words, all of: (1) the host is **owned by you or your org** and is a **staging/dev** environment, not production and not a client's system; (2) it holds **synthetic/seed data only** — no real client or financial data; (3) the user **authorizes** attack-testing it. Only then add a record to `factory.json.security_testing.authorized_targets[]` (`host`, `owner: you`, `environment`, `data_state: synthetic`, `registered` date) and set `brief.data_sensitivity: high`. Never register a production host, a custom domain serving users, or anything you cannot confirm is your own pre-production. Remind the user: when client data is later loaded, it goes on a **different** host, and that host is never added here. To use your own PentAGI as part of the run, set `security_testing.pentagi.enabled: true`: help the user stand up the user's self-hosted PentAGI (its official Docker stack, the user's own LLM/API keys typed by the user — never by you, per the hard rules) and store only its **local endpoint** (e.g. `http://localhost:8080`) in `security_testing.pentagi.endpoint`, no secret. During a pentest the factory drives that instance against the one authorized staging host only, bounded to that run; it is never pointed at production or any host with real data, and the agent stops when the run ends.
## `/pf-setup project <slug>` — one-time setup of everything THIS project needs (after the platform is chosen)
Read the project's `factory.json` (`brief.stack`, `brief.deploy_hint` target, `data_sensitivity`, `handoff.mode`) and `references/targets/<deploy_hint>.md`. Derive the exact tools this project needs and run them in **one guided pass**, in order — each step Claude pre-fills the non-secret parts and stops, the user enters secrets / clicks:
1. **Base items** (checklist 0a, 0b, 0b2, 1–4): the builder plugin, the installs, **Diagram Design** (required), the folder; for handoff mode A, the Code session link; Chrome extension; Claude Code permissions.
2. **Version control + host auth for the chosen platform.** GitHub (`gh auth login`), plus the platform's CLI/auth from the target file's Env vars — `az login` (Azure), `aws configure`/SSO (AWS), `gcloud auth login` (GCP), `flyctl auth` (Fly), the Render API key, or SSH to the Oracle VM. Claude opens the page / prints the command; the user signs in; secrets are set as env vars **by name**.
3. **Database.** The chosen DB (Supabase by default, or Neon/PlanetScale/Turso/self-hosted per the stack) — create, store URL + anon key by name; the service-role key never ships to the browser.
4. **Target credentials.** The target file's Env-var tokens, set as env vars by name.
5. **Handoff** (`/pf-setup handoff`); **CI** (`/pf-setup ci`) when `factory.json.ci` is not `hook`; **store accounts** (`/pf-setup mobile`) for a mobile app; and after the first deploy **monitoring** (`/pf-setup monitor`), **backup** (`/pf-setup backup`) and — before the next build of a product with data — the **database split** (`/pf-setup database`).
6. Finish with **`/pf-setup --check <slug>`** so the pass ends on a verified toolchain, not an assumed one.
Show a short checklist of what is done and what is pending (waiting on the user's secret/signup); record progress in `factory.json`. **Claude never types a secret** (the hard rules). This is the single pass that stands up a new project's whole toolchain once the platform is confirmed.
## `/pf-setup handoff [<slug>]` — set up the handoff mode (see `references/handoff.md`)
Explain the two modes with pros/cons/cost from `handoff.md` and record `handoff.mode`. Then enable what the chosen mode needs:
- **Mode A (PR-event wake, default):** the autonomy path — the PM is **woken by the PR**, not polling (`references/handoff.md`). Set up two things so GitHub events reach this session as notifications: (1) **subscribe the session to the repo's pull-request activity** so `ReadNotifications` delivers PR opened / ready / labeled events (via the GitHub integration/connector the session uses; confirm the repo exists with `gh repo view` and that the factory account **watches** its pull requests); (2) **the `needs-input` label** — the builder self-heals it on the first draft PR (`gh label create needs-input -c "#d93f0b" -f`, see `pf-build-from-spec`), so the PM/Cowork seat does **not** need to create it and should not assume it can (it usually has no `gh`). Only if the lane's GitHub App/token can't manage labels is it a one-time manual click (repo → Labels → New label `needs-input`). Nothing is installed and no secret moves. Tell the user honestly: where the surface delivers these GitHub notifications, the PM waits idle and wakes on the event; where it doesn't (e.g. a Cowork seat with no way to subscribe), it falls back to a single long backstop check that reads GitHub + the NEEDS-INPUT file (not a fast poll) — correct, just slower.
- **Mode B (cloud):** the cloud build needs GitHub clone/push and the deploy target reachable **from the cloud** without a stored long-lived secret. Walk the user through: a short-lived/fine-scoped GitHub token or GitHub OIDC; and **Azure Key Vault** holding the deploy credentials with a scoped access the cloud run can assume (the user creates and grants; Claude never types the secret, per the hard rules). Warn plainly that B is **not** for `data_sensitivity: high` projects unless the user has accepted that path, and that B wants the Phase-2 safety net (monitoring + rollback) first. Record only non-secret references (Key Vault name, token scope), never a secret value.
## `/pf-setup monitor <slug>` — the monitoring accounts (after the first deploy, see `references/monitoring.md`)
For the chosen free stack: (1) **Azure Application Insights + Monitor** — via the Azure tools create an App Insights resource in the project's resource group and a Monitor action group to the user's email + Azure-app push; the user confirms the email and installs the Azure app for push; store the App Insights connection string as a user env var by name (Claude pre-fills the name, the user sets the value). (2) **Sentry** (if chosen) — open sentry.io's new-project page, pre-fill the project name, stop; the user creates it and pastes the DSN, stored as an env var by name. (3) **UptimeRobot** (if chosen) — open uptimerobot.com, pre-fill the monitor URL (`/api/health`), stop; the user adds the monitor and the alert email. Record what is set up in `factory.json.monitoring`; secrets only by name, never typed by Claude.
## `/pf-setup backup <slug>` — off-Supabase data backup (free, see `references/maintenance.md` C)
Code is already backed up on GitHub (authoritative). For data beyond Supabase's ~7-day daily backups: set up a free **`pg_dump` logical backup to Azure Blob Storage** (cool tier). Via the Azure tools, create/confirm a storage account + a private `backups` container in the project's resource group; schedule a weekly dump (run by the maintenance schedule, or an Azure Functions consumption timer) writing `<slug>-<date>.sql.gz`; set retention (keep N weeks). Store the storage connection string as a user env var by name (Claude pre-fills the name, the user sets the value). Record in `factory.json.maintenance.backups`; never put a secret in a dump. A restore drill from this backup is run by `/pf-maintain`.
## `/pf-setup --check [<slug>]` — the factory doctor (read-only)
One pass that says whether the whole toolchain is ready, so a first run does not fail on a half-done setup. On the Cowork side, check and list: the `Atelier` projects folder is connected; the Chrome extension answers on claude.ai; each lane's `code_url` is set; the installed plugin version (`.claude-plugin/plugin.json`). For the Code seat — which this seat cannot inspect — drive Chrome per `bridge.md` and type **`/pf-next doctor`** (add the slug to include that project's target), then read `<watch dir>\DOCTOR-RESULT.md` (first line `PF-DOCTOR-RESULT v1`). Show one table — item · ok/missing · the one line that fixes it — and offer to run the first missing item. It changes nothing and needs no approval; if Chrome cannot type it, ask the user to type `/pf-next doctor` in the Code session.
## `/pf-setup ci <slug>` — who checks a push (see `references/verification.md` D)
Explain the three modes in one line each with cost (`hook` — free, default; `self-hosted` — free on your own machine, needed for team and data-sensitive projects; `hosted` — free for public repos, spends the monthly allowance on private ones) and record `factory.json.ci`. For `self-hosted`: open the repo's Settings → Actions → Runners → New self-hosted runner page; the user runs the registration commands GitHub shows on the machine that will be the runner (the registration token is theirs to paste, never Claude's). For any workflow mode: the test-environment values the workflow needs are added by the user as repository secrets, by name; then open Settings → Branches and walk the user through requiring the `verify` check on `main` — the user clicks Save. The next `/pf-build` writes the workflow file.
## `/pf-setup database <slug>` — split test from production (see `references/migrations.md` A)
Required before the first build after go-live (from the first build for `data_sensitivity: high`). Explain in two lines why (a build, a test or a preview must never be able to touch real data). Then, with the user doing every secret step: (1) the database the live site uses now becomes **production** — the user adds its existing values again under the `PROD_`-prefixed names (`PROD_SUPABASE_URL`, `PROD_SUPABASE_ANON_KEY`, `PROD_SUPABASE_DB_URL`, `PROD_SUPABASE_SERVICE_ROLE_KEY`, or `PROD_DATABASE_URL`) as user environment variables; (2) open the database provider's new-project page, pre-fill the name `<slug>-test`, stop — the user creates a second **free** project (confirm the provider's current free-plan project limit on its pricing page first; if a free one is not available, stop and show the price); (3) the user points the unprefixed names at the new test project; (4) restart the desktop app. Record `factory.json.database = "split"`. The next build applies all migrations to the empty test database and seeds it; production is untouched until the next live deploy.
## `/pf-setup mobile <slug>` — store accounts for a mobile app (see `references/mobile-release.md`)
For a project whose target is `expo-eas` or `flutter-stores`. Open Apple's and Google's developer-program pages and read the **current** fee and requirements aloud; the account is created by the user or the client in the publishing entity's own name — never by Claude. Then: an Expo account and an access token set as `EXPO_TOKEN` by name; store credentials added by the user to EAS's own credential store (`eas credentials`), never as env vars. For `flutter-stores`: the Android upload keystore is created and kept by the user (never committed; its path and passwords set as env vars by name), the Play service-account key and App Store Connect API key are files the user downloads and points to by path, and — for iOS — confirm which Mac or cloud macOS builder will be used. Record what is done and what is waiting on him.
## `/pf-setup env <NAME>` — when a skill reported a missing env var
Open the page where that value is created (from the target file), pre-fill the non-secret parts, stop; then the user env var instructions; then "restart the desktop app and re-run the step that failed".
Log every completed item as `{stage: "setup", event: "<item> done"}`.