Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion skills/create-agent-tui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ Architecture draws from three production agent systems:
## Prerequisites

- Node.js 18+
- `OPENROUTER_API_KEY` from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys)
- `OPENROUTER_API_KEY` — get one from the [dashboard](https://openrouter.ai/settings/keys), or provision via [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI:
```bash
stripe projects add openrouter/api # creates account + key, writes to .env
```
- For full SDK reference, see the `openrouter-typescript-sdk` skill

---
Expand Down Expand Up @@ -144,6 +147,7 @@ After getting checklist selections, follow this workflow:
- [ ] If ASCII Logo Banner is ON: generate src/banner.ts (see ASCII Logo Banner section below)
- [ ] Generate src/cli.ts entry point (or src/server.ts — see references/server-entry-points.md)
- [ ] Generate .env.example with OPENROUTER_API_KEY=
- [ ] If Stripe CLI is available (`command -v stripe`): offer to run `stripe projects add openrouter/api` to auto-provision the key into .env

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin [suggestion] command -v stripe check omits Projects plugin — stripe projects add will fail if the plugin isn't installed

Details

Why: The Stripe Projects CLI exists as a separate plugin that must be installed with stripe plugin install projects after the Stripe CLI itself. command -v stripe verifies only the CLI binary is in PATH — if the plugin isn't installed, stripe projects add openrouter/api errors with stripe: 'projects' is not a stripe command. The openrouter-typescript-sdk skill already notes this requirement (line 63); this step is inconsistent with it.

Fix: Extend the availability check to also verify the plugin:

- [ ] If Stripe CLI is available (`command -v stripe`) AND Projects plugin is installed (`stripe projects --help >/dev/null 2>&1`): offer to run `stripe projects add openrouter/api`. Otherwise, if only the CLI is present but plugin is missing, suggest: `stripe plugin install projects`

Ref: OpenRouter — Stripe Projects prerequisites — "Install the Projects plugin: stripe plugin install projects"

Reviewed at 4023997

- [ ] Verify: run npx tsc --noEmit to check types
```

Expand Down
6 changes: 5 additions & 1 deletion skills/create-headless-agent/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Scaffolds a headless agent in TypeScript targeting OpenRouter. The generated pro
## Prerequisites

- Bun 1.1+
- `OPENROUTER_API_KEY` from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys)
- `OPENROUTER_API_KEY` — get one from the [dashboard](https://openrouter.ai/settings/keys), or provision via [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI:
```bash
stripe projects add openrouter/api # creates account + key, writes to .env
```
- For full SDK reference, see the `openrouter-typescript-sdk` skill

---
Expand Down Expand Up @@ -114,6 +117,7 @@ After getting the name and checklist selections, follow this workflow:
- [ ] If HTTP server selected: generate src/server.ts (spec in references/entry-points.md)
- [ ] If MCP server selected: generate src/mcp-server.ts (spec in references/entry-points.md)
- [ ] Generate .env.example
- [ ] If Stripe CLI is available (`command -v stripe`): offer to run `stripe projects add openrouter/api` to auto-provision the key into .env

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin [suggestion] command -v stripe check omits Projects plugin — stripe projects add will fail if the plugin isn't installed

Details

Why: Same issue as in create-agent-tui/SKILL.md:150. The Stripe Projects plugin must be installed separately (stripe plugin install projects) before stripe projects subcommands are available. Checking only command -v stripe misses this — a user with the CLI but not the plugin would get stripe: 'projects' is not a stripe command.

Fix: Extend the check:

- [ ] If Stripe CLI is available (`command -v stripe`) AND Projects plugin is installed (`stripe projects --help >/dev/null 2>&1`): offer to run `stripe projects add openrouter/api`. If only the CLI is present but plugin is missing, suggest: `stripe plugin install projects`

Ref: OpenRouter — Stripe Projects prerequisites

Reviewed at 4023997

- [ ] Generate test/agent.test.ts
- [ ] Run `bun install` to fetch dependencies
- [ ] Verify: run `bunx tsc --noEmit`
Expand Down
12 changes: 11 additions & 1 deletion skills/openrouter-typescript-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install @openrouter/sdk

## Setup

Get your API key from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys), then initialize:
Get your API key from the [dashboard](https://openrouter.ai/settings/keys), or provision one with the [Stripe Projects](https://openrouter.ai/announcements/openrouter-on-stripe-projects) CLI (`stripe projects add openrouter/api`). Then initialize:

```typescript
import { OpenRouter } from '@openrouter/agent';
Expand All @@ -48,10 +48,20 @@ The primary authentication method uses API keys from your OpenRouter account.

#### Obtaining an API Key

**Option A — Dashboard:**

1. Visit [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys)
2. Create a new API key
3. Store securely in an environment variable

**Option B — Stripe Projects CLI** (creates account + key + billing in one command):

```bash
stripe projects add openrouter/api
```

This provisions an OpenRouter account linked to your Stripe identity, generates an API key, and writes it to your project's `.env` as `OPENROUTER_API_KEY`. See the [announcement](https://openrouter.ai/announcements/openrouter-on-stripe-projects) for details. Requires the [Stripe CLI](https://docs.stripe.com/stripe-cli) with the Projects plugin (`stripe plugin install projects`).

#### Environment Setup

```bash
Expand Down