Guided co-pilot to set up, health-check ("doctor"), add, or extend the connectors/credentials for the CURRENT project (Firebase, Linear, Stripe, Twilio, AWS, pal, …). Does everything it can automatically, then hands Simon numbered steps for the rest and waits. Use for "connect Slack", "message someone when work is done", or "send a Slack completion message"; also when connectors aren't working ("can't access Firebase/Stripe/Linear", "not enough permissions"), when first setting up a machine/p...
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 Setup Connectors?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/skowalskidev-setup-connectors-dotagents)
---
name: setup-connectors
description: Guided co-pilot to set up, health-check ("doctor"), add, or extend the connectors/credentials for the CURRENT project (Firebase, Linear, Stripe, Twilio, AWS, pal, …). Does everything it can automatically, then hands Simon numbered steps for the rest and waits. Use for "connect Slack", "message someone when work is done", or "send a Slack completion message"; also when connectors aren't working ("can't access Firebase/Stripe/Linear", "not enough permissions"), when first setting up a machine/project, when adding a new connector, to enable a one-off prod write, or to audit the existing setup for insecure credential handling (world-readable key files, a secret inside a repo, a CLI profile defaulting to the wrong work/personal account) and fix it. Reads the local connector registry through bin/connector_registry.py (one root per boundary, one file per provider); the deep spec is references/connectors-setup.md.
argument-hint: "[add | migrate | enable-prod-write <platform>] — no arg = setup + doctor for the current project"
---
# Set up / doctor the connectors for this project
The premise: connectors + credentials are declared once in the local registry (one root per boundary,
`connectorRoots` in `identity.local.json`; one `<provider>.json` per provider, projects in
`projects/<project>.json`), read only through `~/.agents/bin/connector_registry.py`, and driven by a
generic engine (`~/.agents/bin/connectors-provision.sh` + the guard + the SessionStart hook). This skill is the guided front door. On a plain `/sk:setup-connectors` (no args) it AUTOMATICALLY takes
care of the whole setup for the current project — provisions what it can, diagnoses the rest
green/yellow/red (like `flutter doctor`), AND audits for insecure local approaches to migrate — then
proposes everything (auth steps + migrations) in ONE consolidated pass and waits for Simon's decisions.
He never needs to remember a sub-command; figure out what's needed and propose it. Always follow the
auth-gate protocol in `rules/connectors.md`: ask FIRST, numbered steps, then wait; never grind around a
missing connector.
The default (no arg) already does **setup + doctor + migration audit**. The named modes are optional
focused shortcuts: `add` = register a new connector; `migrate` = run ONLY the audit + migration proposal;
`enable-prod-write <platform>` = turn on a separate, temporary prod-write pathway.
## Official account connectors and completion messages
DO use the reference's **Official account connectors and completion messages** procedure for hosted
Slack setup and requested work notifications. Inspect the active host's tools before provisioning.
DO handle a message through an already connected account directly, without auditing unrelated services.
DO run `connector_registry.py resolve <capability>` first and use its first unblocked route, recording
the outcome; a shared-account work route applies even when no project record exists. An unrelated
personal checkout does not authorize work-resource access. An explicit work-message request targets
the work root and still requires checking the connected workspace and recipient.
DO record a request such as "message someone when work is done" in the living plan with its recipient,
completion condition and message purpose. After verification, send once under that authorization and
return the message link. If the work is unfinished, retain the request; do not announce completion.
TEST: official setup needs no custom Slack app by default; a requested completion message is delivered
once with a receipt, or remains visibly blocked with the exact missing recipient, access or tool.
## Mode: setup + doctor (default)
1. **Resolve the project.** `~/.agents/bin/connectors-provision.sh --manifest` prints this project's
effective connector set (its routes, then the shared-account routes); `connector_registry.py roots`
shows both roots. If nothing matches, show the repo's `git remote get-url origin` and collect the
missing setup in `add` mode. A shared-account route needs no duplicate project record.
2. **Provision what's automatable.** Run `~/.agents/bin/connectors-provision.sh`. It registers the
registry's MCP servers at local scope and warns about any declared key file that is missing. It
fetches nothing — there is no vault. If it reports "NEW MCP servers were registered", they load
NEXT session — per the auth-gate, tell Simon up front: "restart the session/app to load <servers>,
then reply restarted", and wait.
3. **Diagnose each connector (green / yellow / red).** Run `~/.agents/bin/connectors-provision.sh --check`
and combine with live signals:
- **mcp-\*** — `registered` + not in `~/.claude/mcp-needs-auth-cache.json` = green; `registered` +
flagged = yellow (needs `/mcp` re-auth); `missing` = yellow (provisioned, restart to load).
- **account connectors** — installation is not tool access. Follow the official account procedure
above; verify the current host, workspace and supported action before reporting green.
- **secret-backed** (`key-missing`) — nothing fetches it, so missing = red: relay that connector's
`auth.steps`, which are the commands that mint the key. Present = green.
- **cli** (stripe/firebase) — check the profile/login is the right account. `firebase login:list`,
run INSIDE the directory being worked in (the account is per-directory). For Stripe use
`grep -E '^\[|display_name|account_id' ~/.config/stripe/config.toml` — **never `stripe config
--list`, which prints live and test SECRET KEY VALUES into the transcript.** Then confirm the
route's `cli.profile` exists and its `display_name` matches this repo's boundary; a profile
that is missing, or whose `[default]` belongs to the other boundary, is red not yellow, because a
bare command silently falls through to it. Logged in and correct = green.
- **env** (twilio) — reachable via AWS at app startup = green; if AWS creds are stale = yellow (`aws sso login`).
4. **Do the automatable parts yourself** for every non-green connector, and collect the manual ones with
their exact `auth.steps` from the route (numbered). Record each verified result with
`connector_registry.py record <provider> <route> ok|fail --reason ...`.
5. **Auto-audit for migrations (ALWAYS — no sub-command needed).** Run the scan + assessment from the
*migrate* procedure below and fold any proposed migrations into the same plan; Simon never has to
remember to ask for it.
6. **Present ONE consolidated plan, then act.** A single table covering everything at once: each
connector's status (green/yellow/red), what you'll do automatically, the numbered steps you need Simon
to do, AND any migration proposals (finding | risk | proposed move | why) with the choose
all / mixture / specific / none options. Do the automatable parts, wait for the manual + decision
items, re-verify (never mark green on trust), then report what's done and what's outstanding (incl.
prerequisites below).
### Prerequisites only Simon can do (report as red with these exact steps)
- GCP (your work cloud project, prod): a **read-only** service account (roles `datastore.viewer` +
`firebasedatabase.viewer`); mint its key to `~/.config/firebase-keys/work-prod-readonly.json` and
`chmod 600` it. The exact `gcloud` commands are in that connector's `auth.steps`.
- Stripe: one named profile per boundary — `stripe login --project-name=work-sandbox`,
`--project-name=work-prod`, and a personal one per that project's stripe route. Never leave a repo
relying on `[default]`.
- AWS: ensure creds are active (`aws sso login` or your configured refresh) so `dogfood()` provides Twilio.
## Mode: add (register a new connector — any kind, boundary-aware)
1. Gather: `provider`, its `capabilities`, `scope` (shared-account when one account serves every
project of the boundary; per-project with `serves` when the key reaches one project's resource),
then per route: `id`, `name`, `kind` (mcp-http | mcp-stdio | cli | api/service-key | env |
claude-connector | codex-app — open; if it's a new
kind, capture how to provision/authenticate/guard it), `env` (dev/prod/sandbox/production),
`readOnly`/`gated` (true for prod reads/gated writes), the `mcp` block or
`cli` block (`{name, profile}`), an optional `secret` (`{path}` — where the key lives, not where to
fetch it from), and `auth.steps` (the numbered fix, including the command that mints the key).
Pick the root: the `common` root ONLY when the route holds no key, account, CLI profile or
project (a local tool's MCP gateway, e.g. Docker MCP Toolkit from `connectors/common-docker.json.example`);
otherwise the root of this repo's boundary. Add `repoFiles` globs when the repo carries its own
setup for the provider (`references/connectors-setup.md` § Lookup layers).
2. Add the route to `<root>/<provider>.json` in the chosen root (create it from
`~/.agents/connectors/provider.json.example`; create `<root>/projects/<project>.json` with a `match`
from the git origin if the project has none). An existing provider gets a new route in preference
order, never a second file. **jq-validate** the file, then run `connector_registry.py list`.
3. Run the default mode to provision + diagnose the new connector. The data-driven guard covers its
boundary automatically — no guard edit. NEVER write a secret value into the registry; only a
machine-local path.
## Mode: migrate (audit the existing setup + propose secure migrations)
(The default `/sk:setup-connectors` runs this audit automatically as part of its pass; `migrate` runs
ONLY this.) Scan the CURRENT project for insecure credential handling and propose fixes.
NEVER print a secret VALUE — work with names, paths, and presence only. Recommend, give steps, and let
me choose — never force.
**There is no secret manager in this setup, and proposing one is not a finding.** Machine-local
plaintext under `~/.config/**`, in a gitignored `.env*`, or in a key file outside the repo is the
INTENDED design: the provider's IAM is the source of truth and a key is minted on demand. So the
remediation vocabulary is scope, file mode, location and rotation — never "move it into a vault".
Suggest a secret manager only if Simon asks for one.
1. **Scan (values never printed):**
- Gitignored `.env*` files: list only secret-looking var NAMES, e.g.
`grep -oE '^[A-Za-z0-9_]+=' <file> | sed 's/=$//' | grep -iE 'TOKEN|KEY|SECRET|AUTH|PASSWORD|CREDENTIAL'`.
- On-disk key/cert/credential files (`*serviceAccountKey*.json`, `*.pem`, `*.p12`, `*credentials*.json`):
note each path + whether it is gitignored and tracked.
- Hardcoded secrets in tracked source — prefer the repo's own scanner or `gitleaks` if installed.
- **File modes** on every credential file and its directory (`stat -f '%Sp %N'`). A `644` key is a
real finding; this is the check that actually fires most often.
- **CLI profiles that default to the wrong boundary** — e.g. `[default]` in
`~/.config/stripe/config.toml` belonging to work while the repo is personal. A bare command
falls through to it silently, so this is red.
2. **Assess.** Classify each: (a) acceptable as-is — gitignored or outside the repo, `600`, correct
boundary, has a committed `.example`; or (b) needs fixing — world-readable, inside a repo, tracked,
over-scoped, or pointing at the wrong boundary.
3. **Propose per item, in this order of preference:** tighten the mode (`chmod 600` file, `700` dir) →
move it outside the repo (`~/.config/**`) or into the gitignored env file → narrow the key's scope
(a viewer-only IAM key, a restricted key) → pin the correct CLI profile → rotate if it was exposed.
Show a table: finding | risk | proposed fix | why.
4. **Let me choose — never force:** offer migrate ALL, a MIXTURE (I pick which), specific items, or NONE
("leave it, it's fine"). Present it clearly and wait for my reply.
5. **Apply each chosen item (secrets never pass through your output):**
- `chmod`/`mv` are yours to run directly — you never need to read the value to fix the mode or the
location, so do it and verify with `stat`, not with `cat`.
- Anything that needs the VALUE (creating a profile, minting a key, rotating) is Simon's step:
give the exact command from the connector's `auth.steps` and wait.
- **Record it in the registry route** (`<root>/<provider>.json`) so it is remembered on every
future worktree: a `secret.path` (+ `secret.var`, the variable name inside an env file) for a key
file, a `cli.profile` for a CLI. The guard reads those,
so declaring it is what makes the boundary enforceable rather than remembered.
- If a secret was exposed (world-readable, committed, or pasted anywhere), recommend ROTATING it —
tightening the mode does not un-expose what was already readable.
6. **Report** what changed, what was left as-is (and why), and sync tracked config changes under `rules/self-healing-config.md`. Keep the registry roots local.
## Mode: enable-prod-write <platform> (separate, on-demand, confirmed, ephemeral)
Prod is read-only by default; a write goes through a SEPARATE pathway that must be enabled, confirmed,
and torn down. A database migration is not a key-minting connector: for one, follow
`references/connectors-setup.md` § "A schema change in production" (pipeline first, Simon by hand
second, agent-run only as the gated exception). For the platform's `enabledOnDemand` write connector
(e.g. `firebase-prod-write`):
1. Mint its write key from the provider's IAM using that connector's own `auth.steps`, to
`<secret.path>` (`chmod 600`). Nothing is pulled from a store; the key does not exist until now.
2. Register it: `claude mcp add-json <name> "<mcp-block>" -s local` (from the route record).
3. Tell Simon: name the EXACT change and ask him to confirm ("yes, write <X> to prod"). Only after his
explicit yes, run the guard's confirmation for that write (the write-guard requires `AGENT_PROD_WRITE_OK=1`
for the gated tool — set it only for the confirmed write).
4. **Tear down** immediately after: `claude mcp remove <name> -s local`, `rm -f "<secret.path>"`, and
**delete the key at the provider too** (`gcloud iam service-accounts keys delete …`) — a deleted file
whose key is still valid in IAM is not a torn-down pathway. Clear the flag, confirm it is gone. One
confirmed write, then off.
## Pickup timing
A brand-new skill FOLDER needs a Claude Code restart to appear in the slash menu; edits to an existing
SKILL.md are live. Newly-registered MCP servers load on the NEXT session (advise a restart). After any
tracked change under `~/.agents`, finish `/sk:agent-config-sync` within the repair policy above. Never commit secrets or ignored overlays; the registry roots are local and never committed.