Skip to content
Merged
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
25 changes: 25 additions & 0 deletions .agents/skills/deploying-app/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: deploying-app
description: deploy the Wasp app to Railway or Fly.io using Wasp CLI.
---

# deploying-app

## Pre-Deployment

1. Run a pre-deployment check via [validating-pre-deployment](./validating-pre-deployment.md) to validate configuration.
2. Present the list of supported `wasp deploy` providers under the "Wasp Deploy" section of the docs and ask the user to choose one.
3. Follow the steps from the chosen provider's guide to deploy the app.

## OAuth Redirect URLs

If they user is using OAuth providers, inform them that they need to add the redirect URLs to the OAuth providers in the provider's dashboard.
For example: https://your-server-url.com/auth/google/callback

More info can be found in the Wasp Social Auth Providers docs.

## Deployment Interrupted

Safe to rerun: `wasp deploy <provider> deploy`

**DO NOT rerun**: `wasp deploy <provider> launch` commands (one-time only)
106 changes: 106 additions & 0 deletions .agents/skills/deploying-app/validating-pre-deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
name: validating-pre-deployment
description: validate configuration and test production build before deploying.
---

# validating-pre-deployment

Pre-deployment validation checks that catch common issues before deploying with the [deploying-app skill](../deploying-app/SKILL.md).

## Before Starting

1. Verify user is in the app directory (check for the Wasp config file: `main.wasp` or `main.wasp.ts`)
2. Ask: "Would you like me to run pre-deployment checks on your app?"

## Validation Steps

Run these checks in order. Report all issues found, then ask the user if they want to proceed or fix issues first.

### Step 1: Wasp Config Metadata

1. Check the Wasp config file (`main.wasp` or `main.wasp.ts`) for placeholder values:
- URLs are actual live URLs, not placeholder values set during the setup wizard.
- Email provider and default from address are actual live email addresses

Report format:

```
## Configuration Issues Found

### Critical (must fix):
- [ ] issue description

### Warnings (recommended to fix):
- [ ] issue description

### Passed:
- [x] check that passed
```

### Step 2: Environment Variables

Based on the Wasp config file and the app's features, generate a checklist of required env variables, found in the "Env Variables" section of the docs, for the user to verify.

Note that the following env vars are auto-set by Wasp when using `wasp deploy` to deploy to Railway or Fly.io automatically:

- `DATABASE_URL`
- `WASP_WEB_CLIENT_URL`
- `WASP_SERVER_URL`
- `JWT_SECRET`
- `PORT`

### Step 4: Database Migrations

Check for pending migrations:

```bash
# List migration files
ls -la migrations/
```
Comment on lines +52 to +59

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .agents/skills/deploying-app/validating-pre-deployment.md

Repository: cameronapak/dotflowy

Length of output: 3851


Fix sequencing error and improve migration verification commands.

The step numbering is incorrect (jumps from Step 2 to Step 4). Additionally, ls -la migrations/ only lists migration files and fails to verify if the database state is actually synchronized (pending vs. applied).

Please renumber to Step 3 and replace the command with actual migration status checks relevant to the app stack (e.g., npx prisma migrate status or knex migrate:status).

- ### Step 4: Database Migrations
+ ### Step 3: Database Migrations

  Check for pending migrations:

  ```bash
  - # List migration files
  - ls -la migrations/

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/deploying-app/validating-pre-deployment.md around lines 52 -
59, The migration section has a sequencing mistake and a weak verification
command. In the validating-pre-deployment workflow, renumber the current “Step
4: Database Migrations” to Step 3 so the steps stay in order, and replace the
ls -la migrations/ check with a real migration status command appropriate to
the stack, such as the app’s Prisma or Knex status check, so it verifies applied
versus pending migrations instead of just listing files.


</details>

<!-- fingerprinting:phantom:triton:quartz -->

<!-- cr-indicator-types:potential_issue -->

<!-- cr-comment:v1:5adebd2ddabd92827d85658e -->

<!-- This is an auto-generated comment by CodeRabbit -->


Remind user:

- Production automatically applies pending migrations on server start
- Ensure migrations are committed to version control
- Test migrations work locally before deploying

### Step 5: Production Build Test

Ask user: "Would you like to test the production build locally? This catches environment-specific issues."

If yes, guide them through the "Testing the build locally" section of the docs.

### Step 6: Final Checklist

Present summary:

```
## Pre-Deployment Summary

### Configuration Status:
- App Name: [name]
- App Title: [title]
- Email Provider: [provider]
- Auth Methods: [list]
- Other integrations: [list]

### Issues to Resolve:
[list any issues from steps 1-4]

### Before Deploying:
- [ ] All configuration placeholders replaced
- [ ] Production email provider configured
- [ ] Required env vars ready for deployment
- [ ] Production build tested locally (optional but recommended)
- [ ] Database migrations committed

### Ready to Deploy?
```

## Completion

If all checks pass or user chooses to proceed:

- Summarize what was validated
- Ask: "Would you like to proceed with deployment? I can guide you through deploying to providers like Railway or Fly.io automatically with Wasp's CLI commands."
- If yes, transition to [deploying-app skill](../deploying-app/SKILL.md)
12 changes: 12 additions & 0 deletions .agents/skills/expert-advice/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: expert-advice
argument-hint: "[advice-request]"
description: Get advice on app improvements and functionality from a Wasp expert. Takes optional arguments for more specific requests e.g. `/expert-advice how can I improve account management?`.
---

1. Explore the current codebase
2. Fetch the Wasp docs for the current project version
3. Decide on a few improvements (if the user supplies arguments in the command, use them as a starting point, if not, your ideas can be app features, code improvements, enhancements, etc.)
4. Present the improvements to the user with their names, descriptions, and pros and cons

**User's assist request:** $ARGUMENTS
86 changes: 86 additions & 0 deletions .agents/skills/start-dev-server/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: start-dev-server
description: Start the Wasp dev server and set up full debugging visibility. This includes running the server (with access to logs), and connecting browser console access so the agent can see client-side errors. Essential for any development or debugging work.
---

## Step 0: Get User Preferences

- [ ] Ask the user if they want to start the dev server(s) as a background task in the current session, or on their own in a separate terminal:
- Starting as a background task
- Pros: The agent has more autonomy, can respond directly to dev server logs (warnings, errors).
- Cons: Certain actions can be slower, and the user has less direct control. Server logs are only visibile to the user from within the `background tasks` tab.
- Starting externally (User)
- Pros: The user has more direct control over app development and the Wasp CLI commands. Can be advantageous for more advanced users.
- Cons: Debugging and feature discovery can be slower, as the agent doesn't have direct access to dev server logs (warnings, errors) or Wasp CLI commands.
- [ ] Depending on the user's choice, follow the steps below and run the commands for the user as background tasks, or guide them through running them manually in a separate terminal.

### Step 1: Ensure the Development Database is Running

Grep the `.env.server` file for `DATABASE_URL`. If no line starts with `DATABASE_URL`, continue following this step.
If the user does have their own DATABASE_URL env var set, move on to [Step 2](#step-2-start-dev-server).

Check the `schema.prisma` file in the project root for the `datasource` block to see which database is being used.

#### SQLite

**Skip to [Step 2](#step-2-start-dev-server):** SQLite stores data in a local file, no database server needed.

#### PostgreSQL

Start the managed database container as a background task:

```bash
wasp start db
```

**Docker needs to be installed and running** for the managed Postgres database container (`wasp start db`) to work.

Run this as a background task in the current session.
Wait 5-15 seconds for the database to be ready.

### Step 2: Start Dev Server

Start the Wasp development server as a background task:

```bash
wasp start
```

If this is the first time starting the app, or if there are pending migrations, run the following command:

```bash
wasp db migrate-dev --name <migration-name>
```

### Step 3: Verify Server is Running

Confirm client (`localhost:3000`) and server (`localhost:3001`) are running by checking the background task output.

**If started as background task in current session:** Listen to the output for development and debugging information.
**If started externally:** Instruct the user to check the output of the external terminal and share its output with you.

### Step 4: Connect Browser Console Access (Important!)

**This step is critical for effective development and debugging.** Without browser console access, the agent cannot see client-side errors, warnings, or React issues that occur in the browser.

Ask the user (via the AskUserQuestion tool) which method they'd like to use for giving the agent visibility into the browser console:

| Option | Description |
| ------------------------------------- | ----------------------------------------------------------------------------------- |
| **Chrome DevTools MCP (recommended)** | Must be installed |
| **Built-in Chrome** | Use Claude Code's built-in browser connection (check status with `/chrome` command) |
| **Manual** | User will manually copy/paste console output when needed |
| **Other** | User has another preference |

For the Chrome DevTools MCP option, if not already installed, add the following config to their mcp client:

```json
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
```
59 changes: 59 additions & 0 deletions .agents/skills/wasp-plugin-help/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: wasp-plugin-help
description: Shows the Wasp plugin's available features, commands, and skills.
---

1. run the [check-wasp-init hook](../../hooks/check-wasp-init.js) using the Bash tool with `node` command to check if the Wasp plugin has been initialized.
2. let the user know if the Wasp plugin has been initialized or not.
3. if the Wasp plugin has not been initialized (the hook outputs JSON), let the user know they should take care of this first by running `/wasp-plugin-init`:

```markdown
⚠️
The Wasp plugin hasn't been initialized for the current project.
Run `/wasp-plugin-init` to get the plugin's full functionality.
```

4. display the [Wasp Plugin for Claude Code](#wasp-plugin-for-claude-code) section to the user exactly as it is below.

--- --- 🐝 🐝 🐝 --- ---

# 🐝 Wasp Plugin for Claude Code

## What This Plugin Does

This plugin makes Claude Code, Codex, Copilot, etc. work better with Wasp by:

1. **Using the right documentation** — Automatically fetches the correct Wasp docs for your project's version
2. **Avoiding common mistakes** — Provides Wasp-specific tips, patterns, and best practices so the agent doesn't hallucinate or use outdated approaches
3. **Guided workflows** — Skills and commands so the agent can walk you through setting up Wasp's batteries-included features (auth, email, database, styling) and deploying
4. **Full debugging visibility** — Start managed databases, dev servers, and connect browser console access so the agent has full development and debugging visibility across the entire stack

The result: The agent actually understands Wasp instead of guessing.

## Quick Reference

Skills:
`add-feature` - Add Wasp's built-in features (auth, email, database, styling)
`deploying-app` - Guided deployment to Railway or Fly.io
`expert-advice` - Get advice on app improvements and functionality from a Wasp expert
`start-dev-server` - Start dev environment with full debugging visibility (db -> server -> browser console)
`wasp-plugin-init` - Adds Wasp knowledge, LLM-friendly documentation fetching instructions, and best practices to your project's CLAUDE.md or AGENTS.md file

## 💬 Example Prompts

- _"Add Google authentication to my app"_
- _"Help me add ShadCN UI to my app"_
- _"Migrate the database from SQLite to PostgreSQL and start it for me"_
- _"Set up email sending with SendGrid"_
- _"Solve the errors in the browser using the Chrome DevTools MCP server"_
- _"Why isn't my recurring job working?"_
- _"Deploy my app to Railway"_

## 📖 Documentation Access

The plugin ensures Claude detects your project's Wasp version and references the correct, LLM-friendly documentation.

## 🫂 Community & Contribute

Join the [Wasp Discord](https://discord.gg/rzdnErX) for help and web dev discussion.
Submit issues, feedback, or PRs: [Wasp Agent Plugins](https://github.com/wasp-lang/wasp-agent-plugins)
43 changes: 43 additions & 0 deletions .agents/skills/wasp-plugin-init/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: wasp-plugin-init
description: Adds Wasp knowledge, LLM-friendly documentation fetching instructions, and best practices to your project's CLAUDE.md or AGENTS.md file
---

0. inform the user that this process will give their agent (Claude, Codex, Copilot, etc.) access to knowledge on Wasp's features, commands, workflows, and best practices by importing the [`general-wasp-knowledge.md`](./general-wasp-knowledge.md) file into the user's AGENTS.md or CLAUDE.md file. Use the AskUserQuestion tool (or equivalent) to: a) ask the user if they want to continue, b) ask if they are using Claude Code (CLAUDE.md) or other agents like Codex, Gemini, Copilot, etc. (AGENTS.md).
1. if the user is using Claude Code, follow the [Claude Code memory](#claude-code-memory) instructions. If the user is using other agents, follow the [Other agents memory](#other-agents-memory) instructions.
2. inform the user that process is complete and they can run `/wasp-plugin-help` to see the plugin's available skills and features.
3. recommend the user do the following for the best Wasp development experience with Claude, Codex, Copilot, etc.:
- **Start the dev server**: Tell it to run the 'start-dev-server' skill to start the Wasp app and give it access to server logs, build errors, and Wasp CLI commands
- **Enable Chrome DevTools**: Prompt it to *`use the Chrome DevTools MCP server`* to give it visibility into browser console logs, network requests, and runtime errors

Explain that together these provide end-to-end insight (backend + frontend) for faster debugging and development.


## Claude Code memory
- get the plugin version from [`${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json`](${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json) (`version` field). Use it below as `{VERSION}`.
- check if `.claude/wasp/.wasp-plugin-initialized-v{VERSION}` already exists. If it does, inform the user the plugin is already initialized for this version and skip the remaining steps.
- check for any old marker files matching the pattern `.wasp-plugin-initialized*` in `.claude/wasp/`. If found, remove them — this is a version upgrade:
```bash
rm -f .claude/wasp/.wasp-plugin-initialized*
```
- copy [`general-wasp-knowledge.md`](./general-wasp-knowledge.md) to the user's project root `.claude/wasp` directory:
```bash
mkdir -p .claude/wasp && cp ./general-wasp-knowledge.md .claude/wasp/general-wasp-knowledge.md
```
- if the CLAUDE.md file does not already contain a `# Wasp Knowledge` section, append it as an import:
```markdown
# Wasp Knowledge

Wasp knowledge can be found at @.claude/wasp/general-wasp-knowledge.md
```
- create the versioned marker file so the plugin knows this version's init has been run:
```bash
touch .claude/wasp/.wasp-plugin-initialized-v{VERSION}
```

## Other agents memory
- get the plugin version from [`${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json`](${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json) (`version` field). Use it below as `{VERSION}`.
- if the AGENTS.md file already contains a section starting with `# Wasp Knowledge [GENERATED BY WASP`, remove that entire section (from the heading to the next `#` heading or end of file) before adding the new one.
- append the entire contents of [`general-wasp-knowledge.md`](./general-wasp-knowledge.md) into the user's AGENTS.md file:
- Append a new section at the end of the file with the title `# Wasp Knowledge [GENERATED BY WASP v{VERSION}]`.
- Copy and paste the contents of [`general-wasp-knowledge.md`](./general-wasp-knowledge.md) into this new section.
Loading