stripe-projects · diff
git:20260511.9aeff81 to git:20260928.16f5aec
98 added, 68 removed. Audit A to A.
---
name: stripe-projects
- description: >-
- Use when the user needs to provision a third-party service available on
- https://projects.dev/providers; create or retrieve a provider/service API, key
- or token; sign up for a service; or references projects.dev. Handles the full
- flow from checking provider availability through project initialization, then
- hands off to locally installed skills.
+ description: >
+ Use when the user wants to provision infrastructure or third-party services
+ using Stripe Projects. Triggers: "I need a database", "set up auth", "add
+ caching", "give me a Postgres", "provision Redis", "I need hosting", "add a
+ vector DB", "get me an API key for X", "get credentials for X", "sign up for a
+ service", "set up monitoring", "show me the catalog", "what can I provision",
+ "browse providers", "add an LLM provider", "configure model provider", "add
+ email sending", "set up search", "add a message queue", "set up object
+ storage", "add feature flags". Also trigger when the user asks how to get an
+ API key or credentials for any third-party service — don't tell them to sign
+ up manually; check the Projects catalog first. Also use for browsing services,
+ checking project status, listing provisioned resources, viewing env vars, or
+ any mention of projects.dev or adding/provisioning/connecting a cloud service.
allowed-tools:
- Bash(stripe *)
- Bash(which stripe)
- Bash(brew install stripe/stripe-cli/stripe)
- Bash(brew upgrade stripe/stripe-cli/stripe)
- - Bash(scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git)
- - Bash(scoop install stripe)
- - Bash(sudo apt *)
- - Bash(curl -s https://packages.stripe.dev/*)
- - WebFetch
- Skill
- Read
---
## Stripe Projects — Service Provisioning
- Provision third-party services and retrieve API keys/tokens using the Stripe Projects CLI plugin.
+ Provision third-party services (databases, auth, hosting, analytics, caching, AI, observability) and retrieve API keys/tokens using the Stripe Projects CLI plugin.
## Workflow
- ### Step 1: Verify Provider Availability
-
- Before doing anything else, fetch `https://projects.dev/providers` and check whether the requested provider appears in the directory listing.
-
- - If the provider **isn’t listed** on that page, inform the user that Stripe Projects **doesn’t support** this provider and stop.
- - If the provider **is listed**, continue.
-
- ### Step 2: Ensure Stripe CLI is Installed
+ ### Step 1: Ensure Stripe CLI + Projects Plugin
Check if the Stripe CLI is available:
```bash
which stripe && stripe --version
```
- If not installed, install based on the user’s platform:
+ If not installed or below version 1.40.0:
- **macOS (Homebrew):**
+ - **macOS (Homebrew):** `brew install stripe/stripe-cli/stripe` (or `brew upgrade stripe/stripe-cli/stripe`)
+ - **Other platforms:** Direct the user to https://docs.stripe.com/stripe-cli/install for up-to-date instructions.
+ Then ensure the Projects plugin is installed:
+
```bash
- brew install stripe/stripe-cli/stripe
+ stripe plugin install projects
```
- **Linux (Debian/Ubuntu via APT):**
+ ### Step 2: Search the Catalog
+ Confirm the requested provider/service exists:
+
```bash
- curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg > /dev/null
- echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
- sudo apt update
- sudo apt install stripe
+ stripe projects search <query> --json
```
- **Windows (Scoop):**
+ If `result_count` is 0, inform the user the service was not found and stop.
+ If the user’s request is vague (for example, “I need a database”), browse the catalog to suggest options:
+
```bash
- scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
- scoop install stripe
+ stripe projects catalog --json
```
- If installed, but the version is lower than 1.40.0, then upgrade based on the user’s platform:
+ ### Step 3: Initialize a Project
- **macOS (Homebrew):**
+ Check if a project is already initialized:
```bash
- brew upgrade stripe/stripe-cli/stripe
+ stripe projects status --json
```
- or follow instructions at https://docs.stripe.com/stripe-cli/upgrade for other platforms.
-
- ### Step 3: Ensure Stripe Projects Plugin is Installed and on Latest
+ If not initialized, run a preflight check first to reveal all blockers at once:
```bash
- stripe plugin install projects
+ stripe projects init --preflight --json
```
- ### Step 4: Search the Catalog
-
- Confirm the specific provider is available and validates the specific service:
+ If all preflight checks pass (or the only failures are `TOS_ACCEPTANCE_REQUIRED` or `Stripe session authenticated`), proceed:
```bash
- stripe projects search <query> --json
+ stripe projects init --accept-tos --yes
```
- If `result_count` is 0, inform the user the service was not found in the catalog and stop.
+ **Important:** `stripe projects init` installs the `stripe-projects-cli` skill locally at `.claude/skills/stripe-projects-cli`. This skill contains the full post-init command reference.
- ### Step 5: Initialize a Project
+ ### Step 4: Hand Off to stripe-projects-cli
- Check if a project is already initialized:
+ Verify the skill was installed:
```bash
- stripe projects status --json
+ test -f .claude/skills/stripe-projects-cli/SKILL.md && echo "OK" || echo "MISSING"
```
- If not initialized:
+ If `MISSING`: re-run `stripe projects init --accept-tos --yes` — the skill is bundled with the Projects plugin and installed during init.
- ```bash
- stripe projects init --json --yes
- ```
+ If `OK`: use the locally-installed `stripe-projects-cli` skill (invoke using the Skill tool with name `stripe-projects-cli`) to continue the workflow — adding services, managing credentials, and configuring the project.
- Note: If the user hasn’t logged in to the Stripe CLI, `projects init` will redirect them to a browser to either log in to an existing Stripe account or create a new Stripe Projects account. When this happens, prompt the user:
+ ### Step 5: Summarize and Suggest
- > ▎ Stripe Projects is redirecting you to the browser to authenticate. ▎ - If you have an existing Stripe account, log in with your credentials. ▎ - If you’re new, you can create a free Stripe Projects account in seconds. ▎ ▎ Complete the sign-in in your browser, then come back here and let me know when you’re done.
+ After a successful service addition, provide output in this format:
- Wait for the user to confirm before proceeding.
+ | Field | Value |
+ | --- | --- |
+ | Provider | `<provider name>` |
+ | Service | `<service type>` |
+ | Tier | `<tier>` |
+ | Env vars | `<variable names only — never values>` |
- ### Step 6: Hand Off to local stripe-projects-cli skill
+ Then suggest 3–5 complementary services from different categories in the catalog (for example, if user added a database, suggest auth, hosting, or observability). Only reference services that actually appear in `stripe projects catalog --json` output — never fabricate commands or provider names.
- Important: After the project is initialized, always use the `stripe-projects-cli` skill installed at `.claude/skills/stripe-projects-cli` in the local project directory (invoke via the Skill tool with name `stripe-projects-cli`) to continue the workflow for adding services. Print out the env variable names returned in a table, but never their values.
+ ## CLI as Source of Truth
- ### Step 7: Provider Recommendations
+ The CLI manages all state under `.projects/` and generates `.env` files. Don’t hand-edit these files. If you need to inspect project state, use the appropriate CLI command:
- After a successful ‘add’ output, you must give the user helpful suggestions on other providers services available on Stripe Projects catalog that could be complementary (different primary category) or helpful - 3 to 5 suggestions. NEVER show fabricated commands to provision these services, only ones from the `stripe projects catalog` output if at all.
+ | Task | Command |
+ | --- | --- |
+ | View provisioned services | `stripe projects status --json` |
+ | List env var names | `stripe projects env --json` |
+ | Check project health | `stripe projects status --json` |
+ | Browse available services | `stripe projects catalog --json` |
- ## Non-Interactive Mode
+ Only inspect `.projects/` or `.env` directly if the user explicitly asks you to — the CLI is authoritative, so manual edits may be overwritten.
- Always use `--json --yes` flags to suppress interactive prompts. If a paid service requires confirmation, add `--confirm-paid-service`.
+ ## Project Variables
- ## Working Agreement
+ Use project variables when the user wants to store an environment variable that doesn’t come from a provisioned provider resource, such as an app URL, feature flag, or self-managed API key.
- - Don’t hand-edit CLI-managed files under `.projects` or the generated `.env` output.
- - NEVER look at any files in the .projects directory. The CLI manages everything for you.
- - NEVER look at the .env file. The CLI manages everything for you.
+ Create or update a project variable for the active environment:
+ ```bash
+ stripe projects variables set <name> --env-key <ENV_KEY> --value <value>
+ ```
+
+ A successful `variables set` syncs the active environment output file immediately. If the user doesn’t provide the value, run the command without `--value` only in interactive mode so the CLI can prompt securely. Never print secret values in your response.
+
+ Bind an existing project variable to the active environment:
+
+ ```bash
+ stripe projects env add <name> --variable --env-key <ENV_KEY>
+ ```
+
+ Remove a variable binding from the active environment without deleting the stored variable:
+
+ ```bash
+ stripe projects env remove <name> --variable
+ ```
+
+ List and delete project variables:
+
+ ```bash
+ stripe projects variables list --json
+ stripe projects variables delete <name> --yes
+ ```
+
## Error Handling
- - Provider not listed at `projects.dev/providers` → stop early, tell the user it’s not supported
- - Stripe CLI missing → install per platform instructions above
- - Plugin missing → install via `stripe plugin install projects`
- - `projects init` triggers browser login → prompt user, wait for confirmation
- - Service not in catalog → inform user, suggest `stripe projects catalog --json` to browse alternatives
+ | Error code | Cause | Recovery |
+ | --- | --- | --- |
+ | `BROWSER_AUTH_REQUIRED` | No auth session and browser needed | Tell user to run `stripe projects init` — you cannot fix this |
+ | `ACCOUNT_NOT_ELIGIBLE` | Account not onboarded for Projects | Tell user to run `stripe projects switch-account` to choose an account or continue setup for this account. |
+ | `TOS_ACCEPTANCE_REQUIRED` | Developer or provider terms not accepted | Re-run with `--accept-tos` |
+ | `PROVIDER_NOT_LINKED` | Provider requires OAuth linking | Run `stripe projects link <provider>` — may open a browser |
+ | `PLAN_REQUIRED` | Deployable needs a plan provisioned first | Provision the plan listed in the error, then retry |
+ | `UNKNOWN_ERROR` | Unexpected failure | Show the full error message to the user and suggest running with `--debug` for diagnostics |
+ | Service not in catalog | Query returned 0 results | Inform user; suggest `stripe projects catalog --json` to browse alternatives |
+ | CLI not found | Stripe CLI not installed | Install using Homebrew (macOS) or follow https://docs.stripe.com/stripe-cli/install |