Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ab97ac1
Initial commit: wasp-plugins marketplace with wasp-claude-tools
vincanger Dec 11, 2025
be039ec
update json files
vincanger Dec 11, 2025
d0f7e9b
change name
vincanger Dec 11, 2025
ca7c5be
fix relative path
vincanger Dec 11, 2025
a81e40b
remove plugin.json
vincanger Dec 11, 2025
c312bc2
update json
vincanger Dec 11, 2025
da23f03
update json
vincanger Dec 11, 2025
e294f71
add wasp help command
vincanger Dec 11, 2025
1086939
update command
vincanger Dec 11, 2025
3d32c48
test claude.md
vincanger Dec 11, 2025
d2ce063
edit claude.md
vincanger Dec 11, 2025
a7ea88d
add checks for wasp knowledge
vincanger Dec 11, 2025
2bc3fdb
fix path in init.md
vincanger Dec 11, 2025
1c702d8
fix path
vincanger Dec 11, 2025
e0c587f
fix commands
vincanger Dec 11, 2025
7b4d061
add correct path to wasp-knowedlge-init
vincanger Dec 12, 2025
a5b9b2f
more init finessing
vincanger Dec 12, 2025
0a4e5b8
update plugin description
vincanger Dec 12, 2025
a593501
update plugin description again
vincanger Dec 12, 2025
1d282bf
update plugin description again
vincanger Dec 12, 2025
43d791d
update plugin description again
vincanger Dec 12, 2025
c406f20
update plugin description again
vincanger Dec 12, 2025
463be55
update plugin description again
vincanger Dec 12, 2025
7499245
update plugin description again
vincanger Dec 12, 2025
c2f2727
update plugin description again
vincanger Dec 12, 2025
53370e6
update plugin description again
vincanger Dec 12, 2025
053f887
update plugin description again
vincanger Dec 12, 2025
77cdab3
update plugin description again
vincanger Dec 12, 2025
2431ac0
update plugin description again
vincanger Dec 12, 2025
6a96057
update plugin description again
vincanger Dec 12, 2025
a8d949b
add init reminder to user prompt
vincanger Dec 12, 2025
a9afe92
add check to user prompt submit hook
vincanger Dec 12, 2025
4bf4193
refactor wasp feature skill
vincanger Dec 12, 2025
b28e2db
update readme
vincanger Dec 12, 2025
00473f7
add version redirect hook
vincanger Dec 15, 2025
59fdab3
Add Wasp version cache and improve versioned docs redirect
vincanger Dec 16, 2025
50c3baf
Update Wasp plugin docs and initialization workflow
vincanger Dec 16, 2025
7d5c1e4
Refactor Wasp help/init flow and add help skill
vincanger Dec 17, 2025
1fc376d
Add start-dev-server skill and update Wasp plugin docs
vincanger Dec 17, 2025
7c33395
Update Wasp plugin docs for dev server and templates
vincanger Dec 17, 2025
014256b
Update Wasp plugin docs and dev server skill guidance
vincanger Dec 18, 2025
5842386
Update Wasp docs for dev workflow and skill description
vincanger Dec 18, 2025
2b53067
Update general-wasp-knowledge.md
vincanger Dec 18, 2025
3eccc0f
Add expert advice command and update documentation
vincanger Dec 18, 2025
f71950b
Update expert-advice.md
vincanger Dec 18, 2025
90384ad
Update Wasp plugin docs and init command instructions
vincanger Dec 18, 2025
50a5ee1
Update instructions for checking browser console errors
vincanger Dec 19, 2025
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
28 changes: 28 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "wasp-plugins",
"owner": {
"name": "Wasp",
"email": "[email protected]",
"url": "https://wasp.sh"
},
"metadata": {
"description": "Official Wasp framework plugins for Claude Code",
Copy link
Member Author

Choose a reason for hiding this comment

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

Would it be more correct to say "Official Claude Code plugins for Wasp framework"?

Because they are Claude Code plugins, not Wasp framework plugins, right?

"version": "1.0.0"
},
"plugins": [
Copy link
Member Author

Choose a reason for hiding this comment

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

Aha so we directly deifne plugins here.

Beacuse I saw also that you can define plugin manifesto in /plugins/wasp/.claude-plugin/plugin.json. That is how they do it in their official plugins, I also saw that in the plugins docs. Maybe that is a better method, so it is not all grouped here in this file?

Hm actually it is weird, I see now in their repo that they do it in both places, basically duplicating the information. How does that make any sense, why would they do that?

{
"name": "wasp",
"source": "./plugins/wasp",
"description": "Give Claude optimized access to Wasp's documentation, features, workflows, and best practices to help you build full-stack React, NodeJS, and Prisma apps even faster.\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n⚡️ QUICK START\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n🧠 /wasp:init - initial setup (run this first!)\n📖 /wasp:help - view all plugin features",
Copy link
Member Author

Choose a reason for hiding this comment

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

Enhances Claude to give you the optimal experience while developing full-stack web apps with Wasp (React, NodeJS, Prisma, ...).
It does so by providing Claude with curated access to docs, workflows and best practices.

Ok I tried sometihng different here because I thought "Give Claude optimized access" is a bit weird, but I am not sure if this is better, do with it as you like, which can also be nothing.

"version": "1.0.0",
"author": {
"name": "Wasp"
},
"homepage": "https://wasp.sh",
"repository": "https://github.com/wasp-lang/claude-plugins",
"license": "MIT",
"category": "framework",
"keywords": ["wasp", "full-stack", "react", "nodejs", "deployment", "authentication", "web-development"]
}
]
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OS files
.DS_Store
Thumbs.db

Comment on lines +1 to +4
Copy link
Member Author

Choose a reason for hiding this comment

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

I would kick these out, these should really go into your global user gitignore on your machine, not in the repo here, since they are OS specific.

# Local development
.env
.env.local
Comment on lines +5 to +7
Copy link
Member Author

Choose a reason for hiding this comment

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

What are we using these for? Are we using any .env or .env.local files in this repo? If not maybe remove then for now.

49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Wasp Claude Code Plugins

Official [Claude Code](https://claude.ai/code) plugins for the [Wasp](https://wasp.sh) full-stack web framework.

## Available Plugins

### Wasp

A Claude Code plugin for developing web apps with the Wasp full-stack framework (React, Node.js, and Prisma), providing access to:
- optimized raw text Wasp documentation for LLMs
- integrations guidance
- best practices
- expert advice on app improvements
Comment on lines +7 to +13
Copy link
Member Author

Choose a reason for hiding this comment

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

I would maybe make a relative markdown link here to the wasp plugin dir, and also maybe simplify the description so there is less chance of it becoming incorrect because we will forget to update this 100% :D.

So it can be shorter, like "The main plugin, that enhances Claude Code for optimal experience when developing Wasp apps with it. It does so by enhancing it with curated documentation, workflows and best practices."


## Adding to Your Project
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
## Adding to Your Project
## Adding Wasp Claude Code plugins marketplace


To automatically install this marketplace for all team members, add to your project's `.claude/settings.json`:

```json
{
"extraKnownMarketplaces": {
"wasp-plugins": {
"source": {
"source": "github",
"repo": "wasp-lang/claude-plugins"
}
}
}
}
Comment on lines +17 to +29
Copy link
Member Author

Choose a reason for hiding this comment

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

Oh ok! That is a bit wild one could say hm, not sure if we should recommend this. I imagine they can figure that out on their own if they want, I woul dinstead offer whatever makes most sense for someobdy new, which is to keep it more local and to try out stuff, so probably local per project. But that is for plugin and this is marketplace hm. I don't know, I am not sure I would add this.

```

## Contributing

To add a new plugin:

1. Create your plugin in the `plugins/` directory
2. Add an entry to `.claude-plugin/marketplace.json`
3. Submit a pull request

## License

MIT - See individual plugin directories for specific licenses.

## Links

- [Wasp Framework](https://wasp.sh)
- [Wasp Documentation](https://wasp.sh/docs)
- [Claude Code](https://claude.ai/code)
- [Claude Code Plugin Documentation](https://docs.anthropic.com/en/docs/claude-code/plugins)
Comment on lines +44 to +49
Copy link
Member Author

Choose a reason for hiding this comment

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

Redundant?

8 changes: 8 additions & 0 deletions plugins/wasp/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

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

Hm this looks wrong, is this working?

Because I read this in the docs https://code.claude.com/docs/en/mcp that either you do

{ "chrome-devtools": { ... } } in .mcp.json, or that you do { "name": "my-plugin", ... , "mcpServers": { "chrome-devtools": { ... } } } in plugin.json of that plugin.

But here it seems we have the second thing, but in .mcp.json, so unless claude code is being extra forgiving and allowing this even though not specified in the docs, I don't think this should work.

"mcpServers": {
"chrome-devtools": {
Copy link
Member Author

Choose a reason for hiding this comment

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

What if they don't want to use it, but want instead to use Playwright?
Or, what if they already have chrome-devtools installed as mcp on their own?

I guess this will still get run and used by our plugin? Maybe that is fine for now, just wondering. Because maybe it also means we should not have this here in .mcp.json but instead it we should have it merely as a suggestion. Hm.

"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
21 changes: 21 additions & 0 deletions plugins/wasp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Wasp.sh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
98 changes: 98 additions & 0 deletions plugins/wasp/README.md
Copy link
Member Author

Choose a reason for hiding this comment

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

This file in general needs some updating with the latest changes, you probably mostly already know about that but just mentioning.

Btw if you feel like something is likely to get outdated with time and we will forget to udpate it, I suggest removing it from README and just referencing it, unless it is realy useful to have duplication here, in that case ok we will do our best to keep it up to date.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Wasp Claude Code Plugin

A Claude Code plugin for Wasp framework development, providing optimized raw text Wasp documentation for LLMs, best practices, and tested workflows.

Comment on lines +3 to +4
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's amke this one match whatever we decide to go with in the other places?

Some things I don't like in this one specifically:

  • "wasp framework development" -> that sounds like it is used for developing the wasp itself, not using it for development
  • "raw text Wasp documentation" -> confusing, too low level

## Features

- **Optimized Documentation Access**: Claude grounds its knowledge via up-to-date raw text, versioned Wasp documentation
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
- **Optimized Documentation Access**: Claude grounds its knowledge via up-to-date raw text, versioned Wasp documentation
- **Wasp documentation**: Ensures that Claude is using the right version of the Wasp framework documentation (in sync with your current Wasp project), with additional enhancements (coming in the future: caching, additional knowledge from Wasp Github and Discord, ...).
- **Wasp specific prompts**: Imports curated advice and instructions into your project's CLAUDE.md, that prevent common mistakes and ensure best practices, based on the shared knowledge of the Wasp Team and community.

I am not sure about the rest because I think it changed somewhat, so it will need deleting / updating probably (configuring and deployment).

- **Adds Wasp Knowledge**: Import Wasp best practices and conventions to your project's CLAUDE.md
- **Configures Wasp**: Easily add Wasp framework features like authentication, database, email, styling (tailwind, shadcn), and other integrations
- **Deployment Guidance**: Claude Code will guide you through deploying your Wasp app to Railway or Fly.io via the Wasp CLI

## Installation

### Add the Wasp marketplace

```bash
claude plugin marketplace add wasp-lang/claude-plugins
```

### Install the Wasp plugin

```bash
claude plugin install wasp@wasp-plugins --scope project
```

> [!NOTE]
> We suggest installing the plugin at the `project` scope (`settings.json` are commited to git).
> Or by using the `local` scope (`settings.local.json` are not commited to git).

Or install the plugin interactively in a running Claude Code session:

```bash
/plugin
```

### Configure and Initialize the plugin

After installing, in an active session, run:
```bash
/plugin
```
- select `wasp-plugins` under the `marketplaces` tab
- select the `auto-update` option to enable automatic updates of the plugin
Comment on lines +38 to +43
Copy link
Member Author

Choose a reason for hiding this comment

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

This is about auto-updating the marketplace, not the plugin, and option is called "Enable auto-update". Let's move this from here to above, under "Install the Wasp marketplace", as a "tip"? ANd let's keep focus here on initializing the plugin.


Then run the initialize command to import curated Wasp resources into your project's CLAUDE.md file.

```bash
/wasp:init
```

## Commands

- `/wasp:init` - Initialize the plugin
- `/wasp:help` - Show the plugin's features, commands, and skills
Copy link
Member Author

Choose a reason for hiding this comment

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

Ok we have one more now!


## Skills

This plugin provides skills that Claude will automatically invoke when appropriate:

### 1. Configure Wasp (`configure-wasp`)
Configure Wasp framework features like authentication, database, email providers, CSS and UI styling libraries, and other Wasp integrations.

### 2. Start Dev Server (`start-dev-server`)
Start the Wasp development environment with proper database setup and migrations. Detects your database type (PostgreSQL vs SQLite), handles database migrations, and starts the dev server as a background task.

### 3. Deployment Guide (`deploying-app`)
Let Claude Code guide you through using Wasp's CLI for easy deployment of your Wasp app to Railway or Fly.io.

## Background Hooks

The plugin includes background hooks that:
- Automatically redirect to LLM-friendly Wasp docs (`llms.txt`) instead of HTML pages
- Detect your project's Wasp version for versioned documentation
- Check plugin initialization status on session start

## Recommended Permissions

For the best experience, add these permissions to your project or user settings:

```json
{
"permissions": {
"allow": [
"Bash(wasp start)",
"Bash(wasp db:*)",
"Bash(wasp deploy:*)",
Copy link
Member Author

Choose a reason for hiding this comment

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

Hah I wonder if deployment should indeed be allowed, I tihnk I would prefer to be asked each time :D.

"WebFetch(domain:wasp.sh)",
"WebFetch(domain:raw.githubusercontent.com)"
"Skill(wasp:wasp-plugin-help)",
"Skill(wasp:start-dev-server)",
]
}
}
```

## License

MIT
12 changes: 12 additions & 0 deletions plugins/wasp/commands/expert-advice.md
Copy link
Member Author

Choose a reason for hiding this comment

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

Ha this whole command seems so simple! It is basically just reminding/grounding the LLM to make sure it pulls in all the relevant data and do think through improvements. To me, it looks on the border of "user can just type this on their own if they need it".
But, on the other hand I do see some value in it, 1. for a bit of discoverability "aha ok, yeah I can ask wasp expert for advice" and 2. for ease of use, because you might oftne want to run this and you would probably write your own command otherwise.

What was your decision process, how did you decide to go with it? Motivation, thinking?

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
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. `/wasp:expert-advice how can I improve account management?`.
---

1. Explore the current codebase
2. Check the wasp docs https://wasp.sh/llms.txt
3. Explore this plugin's skills and commands
4. 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.)
5. Present the improvements to the user with their names, descriptions, and pros and cons

**User's assist request:** $ARGUMENTS
10 changes: 10 additions & 0 deletions plugins/wasp/commands/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Shows the Wasp plugin's available features, commands, and skills.
---

Explicitly invoke the `wasp-plugin-help` skill in the Claude Code session for the user.

Example:
```
Run the `wasp-plugin-help` skill.
```
Comment on lines +7 to +10
Copy link
Member Author

Choose a reason for hiding this comment

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

I am curious, what if we didn't have this part, would it still work ok? Why do we need both this "Run ..." line and also instructions above.

14 changes: 14 additions & 0 deletions plugins/wasp/commands/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
description: Add Wasp knowledge to your project's CLAUDE.md
---

0. inform the user that this process will give Claude access to info on Wasp's features, commands, workflows, and best practices by copying the `general-wasp-knowledge.md` file into the project directory and importing it into the user's CLAUDE.md file. Use the AskUserQuestion tool to ask the user if they want to continue.
1. copy the file `${CLAUDE_PLUGIN_ROOT}/general-wasp-knowledge.md` from within the plugin's installation directory to the user's project `.claude/wasp/knowledge` directory using the Bash tool with `cp` command.
2. append it to the user's CLAUDE.md file as an import:
```markdown
# Wasp Knowledge

Wasp knowledge can be found at @.claude/wasp/knowledge/general-wasp-knowledge.md
```
3. inform the user that process is complete and they SHOULD NOT amend the `general-wasp-knowledge.md` file, but should ammend their CLAUDE.md file with their own custom Wasp rules, if desired.
4. also inform the user they can run `/wasp:help` to see the plugin's available commands and skills.
126 changes: 126 additions & 0 deletions plugins/wasp/general-wasp-knowledge.md
Copy link
Member Author

Choose a reason for hiding this comment

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

Main thoughts for this file are: what can be moved to docs and referenced from there? But on the other hand, yeah, I get it, this needs to be here and not in docs, so it is more on top of mind of LLM. Ok yeah. Still, I would maybe like this to be also captured somewhere in the docs, kind of like "Wasp overview" or "Wasp AI overview" or something, so we remember to maintain it, and then just copied over here when we are publising the plugin, otehrwise I think we will forget to maintain this properly.

We dont' have to figur ethat out right now, but let's create a GH issue in this repo that is focused exactly on that -> how do we ensure maintainability of this plugin. I tihnk likely solution will be:

  1. linking to real docs as much as we can
  2. what we can't link, we should copy from the docs in the "build step", and if needed we can even add custom parts to docs aimed for AI
  3. if none of those because it is specific for claude / claude code plugin, then it goes here.

Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Wasp App

This project uses TypeScript and Wasp, a batteries-included framework for building full-stack web apps with React, Node.js, and Prisma.
Copy link
Member Author

Choose a reason for hiding this comment

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

THeir project could be in Javascript, and not in Typescript though, so can we drop the Typescript from here? Why is it important that we mention Typescript here?


## Documentation

Your training data about Wasp may be outdated. You MUST fetch and verify against the current documentation before implementing Wasp features or answering Wasp questions:
- https://wasp.sh/llms.txt (latest)
- https://wasp.sh/llms-{version}.txt (versioned)
Comment on lines +8 to +9
Copy link
Member Author

Choose a reason for hiding this comment

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

What sounds tricky to me here is, how will it know if it should use the latest one, or the one with specific version? Let's say it detects Wasp has version 0.20, how will it know if it needs to use llms-0.20.txt, or llms-0.19.txt?
Ok actually there are more issues here: what if wasp version is 0.19.3, but docs have the version for 0.19.0 only. Because that is how our docs versoins currently go: 0.19.0, 0.18.0, ... . We could be tagging them differently if we want to, but this is what we have right now. So it might try to pull in the docs for 0.19.3 and fail.

Ok this is probably sometihng we should figure outside of the scope of this PR. I think you have another PR where you do the llms.txt versioning, we should probably figure that out there. We could on that side handle things. What are we going to do in the meantime though -> give up on versioning here for now? Tell it to just use the latest?

Actually, for now here, we could do something like this:

For version x.y.z of Wasp, obtain the docs from "https://wasp.sh/llms-x.y.0.txt".
For example, for version `0.19.3`, obtain them from "https://wasp.sh/llms-0.19.0.txt".
Unless it is the latest version of Wasp, in that case just use "https://wasp.sh/llms.txt".

It still doesn't know the latest version of Wasp which sucks, but well this at lest solves it to a degree.

Oh one solution could also be to not have multiple llms-{version}.txt files, but instead, we have just one "llms.txt" file, but inside that one, we have files for all the different wasp versions! So it would be like all those llms-{version}.txt concatentaed in one file. So it doesn't have to try to guess the URL, instead it fetches llms.txt, figures out based on it which docs for which versions are available, and then fetches those. If we feel that makes llms.txt too big, which could be the case, then we could maybe add one extra level of indirection, and have llms.txt contain nothing but links to versioned llms.txt -> llms-0.20.0.txt, llms-0.19.0.txt, ..., and then when it has that info, it can obtain the correct versioned llms.txt and go from there. Yeah I think that is the best solution. But let's do that in that other PR.


## Workflows

### Development Server

Before starting any development task on this Wasp project (coding, debugging, adding features), you MUST check if the dev server is running:
- Check for active background tasks (use `/tasks` command)
- Or check if ports 3000 (client) and 3001 (server) are in use

If not running, invoke the `start-dev-server` skill to start the server as a background task or externally.

### Implementation Checklist
Copy link
Member Author

Choose a reason for hiding this comment

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

It wasn't clear to me what this is, maybe it is to LLM though. But these are recommendations how to approach imelmenting whatever, right? Any way we can make that cleaner from the title? "Implementing a new feature/change"?


1. Fetch https://wasp.sh/llms.txt to verify current syntax (see "Documentation" above)
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if it is better to drop the link from here so it needs to refer to the Documentation above, and has to focus on the concept there are versioned llms.txt files, instead of just being like "oh yeah I will just follow this link regardless of version.".

2. Check if the feature exists in the current codebase or starter template for reference patterns
3. Identify which files need changes: wasp config file (`main.wasp` or `main.wasp.ts`), `schema.prisma`, `src/`
Copy link
Member Author

Choose a reason for hiding this comment

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

How did you decide to put this stuff in, what is the impact?

4. Plan the order: schema → migrate → wasp config file → TypeScript
Copy link
Member Author

Choose a reason for hiding this comment

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

What if there are no schema changes, will this still push it to force them a bit, I hope not?

Btw could be Javascrit potentially and not Typescript. I woudlnt' recommend it, especially with AI, but it is possible.


### Schema Changes

After ANY change to `schema.prisma`:
1. Stop the dev server if running
2. Run `wasp db migrate-dev --name <descriptive-name>`
3. Restart the dev server
Comment on lines +30 to +33
Copy link
Member Author

Choose a reason for hiding this comment

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

Ok ok, but we don't always want it to happen immediately, right? Sometimes you want to update the schema.prisma, and then continue coding, be it in schema or in typescript or whatever, and at one point, you will want to run migrate-dev, but not immediately, only once you are ready.

I am not sure how we should instruct that though. Maybe explain that when changes are done to schema.prisma, they are not actually applied to the database until the wasp db migrate-dev ... is run, and that it will have to run that once it wants to apply them.

Oh and what AI should do, except for being aware of this, is to make sure user is aware of this and knows when migrate-dev hasn't been run, as this is common source of confusion. Wasp dev server will be returning a warning about it, but user might not see it sicne it is background task, so AI should communicate that warning at the appropriate moment.
And then it can also ask user, at the appropriate moment (e.g. they want to test stuff or look at the app in the browser), that they need to yet run wasp db migrate-dev (or it can do it for them like you described here).


## Project Reference

### Structure

```
.
├── .wasp/ # Wasp output (auto-generated, do not edit)
├── public/ # Static assets
├── src/ # Feature code: server `operations.ts` and client `pages.tsx` files
├── main.wasp or main.wasp.ts # Wasp config file: routes, pages, auth, operations, jobs, etc.
├── schema.prisma # Database schema (Prisma)
```
Comment on lines +37 to +46
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder how important is this. What if it differs for whatever wasp version it is using? I don't know, maybe drop this.


### Code Organization

Organize by **feature** (vertical), not by type (client/server):

```
src/
├── tasks/
│ ├── TasksPage.tsx # Page component
│ ├── TaskList.tsx # Component
│ └── operations.ts # Queries & actions
├── auth/
│ ├── LoginPage.tsx
│ └── google.ts
```
Comment on lines +48 to +61
Copy link
Member Author

Choose a reason for hiding this comment

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

I would name this "Recommended code organization" and then go like "Unless user specifies otherwise, we recommend using vertical, per-feature code organization (not per-type), where each feature is organized in one directory, including its client and server code, and possible sub-features.

And then the example(s).


### Starter Templates

Highly recommend that the user chose one of the following templates when scaffolding a new Wasp app (this helps Claude understand Wasp's features and patterns):
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we can drop this part of "helps Claude understand Wasp's features and patterns", that sounds a bit confusing / redundant.

```bash
wasp new my-basic-app -t basic # creates a basic starter app with core Wasp features like auth, operations, pages, etc.
wasp new my-saas-app -t saas # creates a full-featured SaaS starter app with auth, payments, demo app, AWS S3, and more (OpenSaaS.sh)
```

See the **Starter Templates** section in https://wasp.sh/llms.txt for more templates.
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
See the **Starter Templates** section in https://wasp.sh/llms.txt for more templates.
See the **Starter Templates** section in the Wasp documentation for more templates.


### Customization

Wasp provides layers of customization on top of the tools it uses (vite, expressjs, react-query, client and server setup, etc.): see the **Project Setup & Customization** section in https://wasp.sh/llms.txt.
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
Wasp provides layers of customization on top of the tools it uses (vite, expressjs, react-query, client and server setup, etc.): see the **Project Setup & Customization** section in https://wasp.sh/llms.txt.
Wasp provides layers of customization on top of the tools it uses (vite, expressjs, react-query, client and server setup, etc.): see the **Project Setup & Customization** section in the Wasp docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the point here was to let it know that some stuff is not configured as usual, but via Wasp ways. Maybe say that more bluntly / explicitly? Because to me it doesn't seem super straightfowrad, the way it is written right now.


### Advanced Features

Wasp provides **advanced features**:
- custom HTTP API endpoints
- background (cron) jobs
- type-safe links
- websockets
- middleware
- email sending

See the **Advanced Features** section in https://wasp.sh/llms.txt for more details.
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
See the **Advanced Features** section in https://wasp.sh/llms.txt for more details.
See the **Advanced Features** section in Wasp docs for more details.


### Import Conventions

**In TypeScript files:**
Copy link
Member Author

Choose a reason for hiding this comment

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

How did we pick these, why are they so important to be mentioned here?

- ✅ `import type { User } from 'wasp/entities'`
- ✅ `import type { GetTasks } from 'wasp/server/operations'`
- ✅ `import { getTasks, createTask, useQuery } from 'wasp/client/operations'`
- ✅ `import { SubscriptionStatus } from '@prisma/client'` (for Prisma enums)
- ✅ Local code: relative paths `import { X } from './X'`
- ⚠️ Call actions directly using `async/await`. DO NOT use Wasp's `useAction` hook unless optimistic updates are needed.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not import convention, this tip about how to call actions.


**In main.wasp:**
- ✅ `fn: import { getTasks } from "@src/tasks/operations.ts"`
Copy link
Member Author

Choose a reason for hiding this comment

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

I think we also recommend maybe not using .ts extensions? Or do we? I can't remember, but I would confirm it by checking the example apps and following what they do.

- ❌ Never relative paths

**In main.wasp.ts:**
See the **TypeScript Config** section in https://wasp.sh/llms.txt for more details.

## Troubleshooting

### Debugging

When errors occur:
1. Check server terminal for backend errors (localhost:3001)
2. Check client terminal for frontend build errors (localhost:3000)
Copy link
Member Author

Choose a reason for hiding this comment

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

Hm client terminal, what is that :D. Aha ok, for frontend build errors. But localhost:3000 is the app, not client terminal. So this is wrong.

I would say: check the wasp start output for logs and errors from the api server / backend, and for the logs and errors from the client dev server (client building). Also check the browser for client runtime logs and errors, those are not printed by the wasp start.

3. Confirm there are no client app issues in the browser console. Ask the user to choose which tool they'd prefer via the AskUserQuestion tool and run it for the user:
- the `mcp__plugin_wasp_chrome-devtools`
- Claude Code's built-in Chrome browser function

### Common Mistakes
Copy link
Member Author

Choose a reason for hiding this comment

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

Nice


| Symptom | Fix |
|---------|-----|
| `context.entities.X undefined` | Add entity to `entities: [...]` in main.wasp |
| Schema changes not applying | Run `wasp db migrate-dev --name <descriptive-name>` |
| Can't login after email signup with `Dummy` email provider | Check the server logs for the verification link or set SKIP_EMAIL_VERIFICATION_IN_DEV=true in .env.server |
| Types stale after changes | Restart TS server |
| Wasp not recognizing changes | **WAIT PATIENTLY** as Wasp recompiles the project. Re-run `wasp start` if necessary.|
| Persistent weirdness after waiting patiently and restarting. | Run `wasp clean` && `wasp start` |
Loading