Skip to main content

AI agent setup

Tell your AI agent: "Set up ProdVerdict for this repo."

The agent runs a non-interactive bootstrap — config, scheduled workflow, Cursor MCP, and agent rule — and only asks you for credentials if they are missing from .env.local or your shell.

One command (agent or human)

npx prodverdict setup --yes --format agent --from-env

Returns JSON with:

FieldMeaning
verdictpass, partial, or fail
filesWrittenPaths created or updated
envWiredEnv var names applied from .env.local / .env
missingCredentials still needed (e.g. STRIPE_SECRET_KEY)
nextStepsWhat to do next

MCP tool

If local MCP is already configured, the agent can call bootstrap_prodverdict instead of shelling out.

Args: stack (optional), repoRoot, fromEnv (default true), force, skipWorkflow.

Install agent skills

Before setup (no repo files yet) — global install:

npx skills add prodv-dev/prodverdict-sdk@prodverdict-setup -g -y
npx skills add prodv-dev/prodverdict-sdk@prodverdict-verify -g -y

On bootstrapsetup --yes copies skills into .cursor/skills/ automatically. Skip with --skip-skills.

See Agent skills for details.

Typical agent flow

npx prodverdict scan --format agent
npx prodverdict setup --yes --format agent --from-env
npx prodverdict status --format agent
npx prodverdict doctor --format agent
  1. Scan — detect stack and recommended contracts
  2. Bootstrap — write all files; wire MCP env from existing .env.local
  3. Status — confirm config, workflow, MCP, credentials
  4. Doctor — verify connectivity when credentials are present

When credentials are missing

The agent should guide you (not guess keys):

  • Stripe: dashboard.stripe.com/apikeys — restricted key, Customers + Subscriptions read
  • Postgres: read-only role — export DATABASE_URL=postgresql://prodverdict_readonly:...@host/db
  • GitHub Actions secrets: gh secret set STRIPE_SECRET_KEY, DATABASE_URL, SLACK_WEBHOOK_URL

Re-run bootstrap after exporting vars.

Customize prodverdict.yml

Bootstrap writes placeholder price IDs (price_your_*). The agent should grep your repo for real Stripe price IDs and update prodverdict.yml before the first live check.

Rules for agents

  • Never commit secrets — .env.local and MCP env stay local
  • Fail closed — missing credentials must fail checks, not pass silently
  • Deterministic checks only — no LLM in the evaluation path

Interactive alternative

npx prodverdict setup

Human wizard with billing key and Postgres role helpers (~5 minutes).

See Cursor setup for MCP config details.