diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..9367d3d --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,28 @@ +{ + "name": "wasp-plugins", + "owner": { + "name": "Wasp", + "email": "info@wasp-lang.dev", + "url": "https://wasp.sh" + }, + "metadata": { + "description": "Official Wasp framework plugins for Claude Code", + "version": "1.0.0" + }, + "plugins": [ + { + "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", + "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"] + } + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..204b5b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# OS files +.DS_Store +Thumbs.db + +# Local development +.env +.env.local diff --git a/README.md b/README.md new file mode 100644 index 0000000..edba909 --- /dev/null +++ b/README.md @@ -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 + +## Adding to Your Project + +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" + } + } + } +} +``` + +## 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) diff --git a/plugins/wasp/.mcp.json b/plugins/wasp/.mcp.json new file mode 100644 index 0000000..045baea --- /dev/null +++ b/plugins/wasp/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "chrome-devtools": { + "command": "npx", + "args": ["-y", "chrome-devtools-mcp@latest"] + } + } +} diff --git a/plugins/wasp/LICENSE b/plugins/wasp/LICENSE new file mode 100644 index 0000000..7cafcf4 --- /dev/null +++ b/plugins/wasp/LICENSE @@ -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. diff --git a/plugins/wasp/README.md b/plugins/wasp/README.md new file mode 100644 index 0000000..331ef7f --- /dev/null +++ b/plugins/wasp/README.md @@ -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. + +## Features + +- **Optimized Documentation Access**: Claude grounds its knowledge via up-to-date raw text, versioned Wasp documentation +- **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 + +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 + +## 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:*)", + "WebFetch(domain:wasp.sh)", + "WebFetch(domain:raw.githubusercontent.com)" + "Skill(wasp:wasp-plugin-help)", + "Skill(wasp:start-dev-server)", + ] + } +} +``` + +## License + +MIT diff --git a/plugins/wasp/commands/expert-advice.md b/plugins/wasp/commands/expert-advice.md new file mode 100644 index 0000000..e923bbc --- /dev/null +++ b/plugins/wasp/commands/expert-advice.md @@ -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 diff --git a/plugins/wasp/commands/help.md b/plugins/wasp/commands/help.md new file mode 100644 index 0000000..92da2cf --- /dev/null +++ b/plugins/wasp/commands/help.md @@ -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. +``` diff --git a/plugins/wasp/commands/init.md b/plugins/wasp/commands/init.md new file mode 100644 index 0000000..4b65170 --- /dev/null +++ b/plugins/wasp/commands/init.md @@ -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. diff --git a/plugins/wasp/general-wasp-knowledge.md b/plugins/wasp/general-wasp-knowledge.md new file mode 100644 index 0000000..ea1e8d7 --- /dev/null +++ b/plugins/wasp/general-wasp-knowledge.md @@ -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. + +## 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) + +## 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 + +1. Fetch https://wasp.sh/llms.txt to verify current syntax (see "Documentation" above) +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/` +4. Plan the order: schema → migrate → wasp config file → TypeScript + +### Schema Changes + +After ANY change to `schema.prisma`: +1. Stop the dev server if running +2. Run `wasp db migrate-dev --name ` +3. Restart the dev server + +## 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) +``` + +### 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 +``` + +### 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): +```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. + +### 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. + +### 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. + +### Import Conventions + +**In TypeScript files:** +- ✅ `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. + +**In main.wasp:** +- ✅ `fn: import { getTasks } from "@src/tasks/operations.ts"` +- ❌ 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) +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 + +| Symptom | Fix | +|---------|-----| +| `context.entities.X undefined` | Add entity to `entities: [...]` in main.wasp | +| Schema changes not applying | Run `wasp db migrate-dev --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` | diff --git a/plugins/wasp/hooks/block-wasp-html-docs.js b/plugins/wasp/hooks/block-wasp-html-docs.js new file mode 100644 index 0000000..ed8ad90 --- /dev/null +++ b/plugins/wasp/hooks/block-wasp-html-docs.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +let input = ''; +process.stdin.on('data', (chunk) => (input += chunk)); +process.stdin.on('end', async () => { + try { + const data = JSON.parse(input); + const toolName = data.tool_name || ''; + const toolInput = data.tool_input || {}; + + // We only block WebFetch for Wasp docs and not WebSearch, because + // WebSearch could return blogposts or 3rd-party tutorials, which we don't want to block. + if (toolName === 'WebFetch') { + const url = toolInput.url || ''; + + const isWaspDocUrl = + url.includes('wasp-lang.dev/docs') || + url.includes('wasp.sh/docs'); + + if (isWaspDocUrl) { + console.error(`BLOCKED: ${url}\n\nPlease use https://wasp.sh/llms.txt to find the LLM-friendly documentation. This file contains a map of all Wasp documentation with raw.githubusercontent.com URLs that you can fetch directly.`); + process.exit(2); + } + } + + process.exit(0); + } catch (err) { + process.exit(0); + } +}); diff --git a/plugins/wasp/hooks/check-wasp-init.js b/plugins/wasp/hooks/check-wasp-init.js new file mode 100755 index 0000000..9b77261 --- /dev/null +++ b/plugins/wasp/hooks/check-wasp-init.js @@ -0,0 +1,42 @@ +#!/usr/bin/env node +const fs = require('fs'); +const path = require('path'); + +const styles = { + reset: '\x1b[0m', + yellow: '\x1b[33m', + dim: '\x1b[2m', +}; + +const knowledgeDirectory = path.join(process.cwd(), '.claude', 'knowledge'); +const optOutFilePath = path.join(knowledgeDirectory, '.wasp-init-opt-out'); +const claudeMdPath = path.join(process.cwd(), 'CLAUDE.md'); + +// Check if user has opted out +if (fs.existsSync(optOutFilePath)) { + process.exit(0); +} + +// Check if CLAUDE.md contains the Wasp knowledge import (dynamic detection) +const waspKnowledgeFileName = 'general-wasp-knowledge.md'; +const isInitialized = fs.existsSync(claudeMdPath) && + fs.readFileSync(claudeMdPath, 'utf8').includes(waspKnowledgeFileName); + +if (!isInitialized) { + const result = { + reason: 'Wasp plugin not initialized', + systemMessage: `\n\n⚠️\n${styles.reset}The Wasp plugin hasn't been initialized for the current project.\n${styles.reset}Run ${styles.yellow}/wasp:init${styles.reset} to get the plugin's full functionality ${styles.dim}-- or reply "opt out" to never see this message again.${styles.reset}`, + suppressOutput: true, + hookSpecificOutput: { + hookEventName: 'SessionStart', + additionalContext: `⚠️ Wasp plugin is not initialized. The user should run /wasp:init or opt out. + If the user replies "opt out": + - create the ${knowledgeDirectory} directory using the Bash tool with \`mkdir -p\` command. + - create the ${optOutFilePath} file using the Bash tool with \`touch\` command. + - DO NOT tell the user about creating this file. + `, + }, + }; + console.log(JSON.stringify(result)); +} +process.exit(0); diff --git a/plugins/wasp/hooks/hooks.json b/plugins/wasp/hooks/hooks.json new file mode 100644 index 0000000..6994b60 --- /dev/null +++ b/plugins/wasp/hooks/hooks.json @@ -0,0 +1,33 @@ +{ + "hooks": { + "PreToolUse": [ + { + "matcher": "WebFetch", + "hooks": [ + { + "type": "command", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/block-wasp-html-docs.js\"" + }, + { + "type": "command", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/wasp-llms-version-redirect.js\"" + } + ] + } + ], + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/wasp-version-cache.js\"" + }, + { + "type": "command", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/check-wasp-init.js\"" + } + ] + } + ] + } +} diff --git a/plugins/wasp/hooks/wasp-llms-version-redirect.js b/plugins/wasp/hooks/wasp-llms-version-redirect.js new file mode 100644 index 0000000..ca70d38 --- /dev/null +++ b/plugins/wasp/hooks/wasp-llms-version-redirect.js @@ -0,0 +1,99 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const { LLMS_TXT_URL, CACHE_FILE } = require('./wasp-version-cache.js'); + +const CACHE_MAX_AGE_MS = 1000 * 60 * 60 * 4; + +function loadCache() { + try { + const data = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8')); + if (Date.now() - data.timestamp < CACHE_MAX_AGE_MS) { + return data; + } + return null; + } catch { + return null; + } +} + +function extractVersionFromUrl(url) { + // Match llms-X.Y.Z.txt pattern + const versionMatch = url.match(/llms-(\d+\.\d+\.\d+)\.txt/); + if (versionMatch) { + return versionMatch[1]; + } + if (/llms\.txt$/.test(url)) { + return 'latest'; + } + return null; +} + +let input = ''; +process.stdin.on('data', (chunk) => (input += chunk)); +process.stdin.on('end', () => { + + const data = JSON.parse(input); + const toolInput = data.tool_input || {}; + + const url = toolInput.url || ''; + + // Check if URL matches wasp.sh/llms*.txt pattern + const llmsUrlPattern = /wasp\.sh\/llms[^/]*\.txt/; + if (!llmsUrlPattern.test(url)) { + return process.exit(0); + } + + const cache = loadCache(); + if (!cache) { + console.error('Version cache not available. Run a new session to enable version matching.'); + return process.exit(0); + } + + const { installedVersion, matchedUrl } = cache; + + const effectiveMatchedUrl = matchedUrl || LLMS_TXT_URL; + + // If CLI not installed, allow default llms.txt but warn on versioned URLs + if (!installedVersion) { + if (url === LLMS_TXT_URL) { + return process.exit(0); + } + + const installMsg = ` +Wasp CLI not detected. + +You requested: ${url} +Recommended: ${LLMS_TXT_URL} (latest) + +Reply "latest" to use recommended, or "original" to continue. +`.trim(); + console.error(installMsg); + return process.exit(2); + } + + // If no version mismatch, allow the request through + if (effectiveMatchedUrl === url) { + return process.exit(0); + } + + // Version mismatch detected - block and inform the user + const requestedVersion = extractVersionFromUrl(url); + + const versionMsg = ` +VERSION MISMATCH DETECTED + +You requested Wasp docs for: ${requestedVersion} +Your installed Wasp version: v${installedVersion} +Recommended docs URL: ${effectiveMatchedUrl} + +Please choose how to proceed: +1. Use the recommended URL (${effectiveMatchedUrl}) - matches your installed version +2. Continue with the original URL (${url}) - may have incompatible information + +Tell Claude which option you prefer. +`.trim(); + + console.error(versionMsg); + process.exit(2); // Block the request so user can choose +}); diff --git a/plugins/wasp/hooks/wasp-version-cache.js b/plugins/wasp/hooks/wasp-version-cache.js new file mode 100644 index 0000000..b65c131 --- /dev/null +++ b/plugins/wasp/hooks/wasp-version-cache.js @@ -0,0 +1,151 @@ +#!/usr/bin/env node + +const { execSync } = require('child_process'); +const fs = require('fs'); +const path = require('path'); +const os = require('os'); + +const styles = { + reset: '\x1b[0m', + yellow: '\x1b[33m', + green: '\x1b[32m', + dim: '\x1b[2m', + cyan: '\x1b[36m', +}; + +const LLMS_TXT_URL = 'https://wasp.sh/llms.txt'; +const LLMS_VERSIONED_URL_TEMPLATE = 'https://wasp.sh/llms-{version}.txt'; +const VERSIONS_URL = 'https://raw.githubusercontent.com/wasp-lang/wasp/refs/heads/release/web/versions.json'; +const CACHE_FILE = path.join(os.tmpdir(), 'wasp-claude-version-cache.json'); + +function getWaspVersion() { + try { + const output = execSync('wasp version', { encoding: 'utf8', timeout: 10000 }); + const match = output.match(/(\d+\.\d+\.\d+)/); + return match ? match[1] : null; + } catch { + return null; + } +} + +async function fetchVersions() { + try { + const controller = new AbortController(); + const timeout = setTimeout(() => controller.abort(), 10000); + + const response = await fetch(VERSIONS_URL, { signal: controller.signal }); + clearTimeout(timeout); + + if (!response.ok) return null; + return await response.json(); + } catch { + return null; + } +} + +function findBestMatchingVersion(installedVersion, availableVersions) { + if (!installedVersion || !availableVersions || availableVersions.length === 0) { + return null; + } + + if (availableVersions.includes(installedVersion)) { + return installedVersion; + } + + const [installedMajor, installedMinor] = installedVersion.split('.').map(Number); + + let bestMatch = null; + for (const availableVersion of availableVersions) { + const [vMajor, vMinor] = availableVersion.split('.').map(Number); + + if (vMajor === installedMajor && vMinor === installedMinor) { + bestMatch = availableVersion; + break; + } + + if (vMajor < installedMajor || (vMajor === installedMajor && vMinor <= installedMinor)) { + if (!bestMatch) { + bestMatch = availableVersion; + } + break; + } + } + + return bestMatch || availableVersions[availableVersions.length - 1]; +} + +function getMatchedUrl(installedVersion, availableVersions) { + if (!availableVersions || availableVersions.length === 0) { + return null; + } + + const latestVersion = availableVersions[0]; + const matchedVersion = findBestMatchingVersion(installedVersion, availableVersions); + + if (!matchedVersion) { + return null; + } + + if (matchedVersion === latestVersion) { + return LLMS_TXT_URL; + } + + return LLMS_VERSIONED_URL_TEMPLATE.replace('{version}', matchedVersion); +} + +async function main() { + const installedVersion = getWaspVersion(); + const availableVersions = await fetchVersions(); + + // Default to latest llms.txt if no version info available + const matchedUrl = getMatchedUrl(installedVersion, availableVersions) || LLMS_TXT_URL; + + const cache = { + timestamp: Date.now(), + installedVersion, + availableVersions, + matchedUrl, + }; + + try { + fs.writeFileSync(CACHE_FILE, JSON.stringify(cache, null, 2)); + } catch (err) { + // Cache write failed, continue anyway + } + + if (!installedVersion) { + const result = { + reason: 'Wasp CLI not installed', + systemMessage: `\n\n${styles.yellow}⚠️ Wasp not detected.${styles.reset}\n\nTo install: ${styles.cyan}curl -sSL https://get.wasp.sh/installer.sh | sh${styles.reset}`, + suppressOutput: true, + hookSpecificOutput: { + hookEventName: 'SessionStart', + additionalContext: `Wasp CLI is not installed. Use the raw text docs URL: ${LLMS_TXT_URL} (latest). + +To install Wasp CLI: + - macOS/Linux: curl -sSL https://get.wasp.sh/installer.sh | sh + - Windows: See https://wasp.sh/docs (requires WSL)`, + }, + }; + console.log(JSON.stringify(result)); + } else { + const result = { + reason: 'Wasp version detected', + suppressOutput: true, + hookSpecificOutput: { + hookEventName: 'SessionStart', + additionalContext: `Wasp v${installedVersion} detected. Use the raw text docs URL: ${matchedUrl}.`, + }, + }; + console.log(JSON.stringify(result)); + } + + process.exit(0); +} + +// Only run when executed directly, not when imported +if (require.main === module) { + main(); +} + +module.exports = { LLMS_TXT_URL, CACHE_FILE }; diff --git a/plugins/wasp/skills/configure-wasp/SKILL.md b/plugins/wasp/skills/configure-wasp/SKILL.md new file mode 100644 index 0000000..6ad2ce9 --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/SKILL.md @@ -0,0 +1,69 @@ +--- +name: configure-wasp +description: configure Wasp framework features and set up their app's branding (meta tags, SEO), authentication (email, social auth providers), database, email providers, styling (tailwind, shadcn), etc. Use when the user wants to add or set up Wasp-specific functionality. +--- + +# configure-wasp + +Configure Wasp framework features and integrations. Each invocation focuses on one feature at a time. + +## Before Starting + +1. Verify user is in the app directory (check for wasp config file: `main.wasp` or `main.wasp.ts`) + +## Available Wasp Features + +Present these features to the user and let them choose ONE to configure: + +| Feature | Description | +|---------|-------------| +| **App Branding** | Set your app's name, description, and meta tags | +| **Authentication** | Add login methods (Email, Google, GitHub, etc.) | +| **Email Provider** | Configure email sending (SendGrid, Mailgun, etc.) | +| **Database** | Set up your database (PostgreSQL, SQLite, etc.) | +| **Styling (CSS, UI)** | Add Tailwind CSS or ShadCN UI (on top of Tailwind CSS) | +| **Verify Setup** | Test that your app compiles and runs correctly | + +## Feature Selection + +Using the `AskUserQuestion` tool, ask the user which Wasp feature they'd like to configure: +- Use the most relevant options as selectable choices (limited to 2-4 options) +- Remind users they can select "Other" to choose from additional features + +## Execute Selected Feature + +Based on the user's selection, follow the corresponding guides below. +ALWAYS follow the feature guide's corresponding raw text documentation URLs and use it as the basis for assisting the user. + +- **App Branding** → [app-branding.md](./app-branding.md) +- **Authentication** → [authentication.md](./authentication.md) +- **Email Provider** → [email-provider.md](./email-provider.md) +- **Database** → [database.md](./database.md) +- **Styling (CSS, UI)** → [styling.md](./styling.md) +- **Verify Setup** → [verify-setup.md](./verify-setup.md) + +## Guidelines for Using AskUserQuestion with Lists + +When asking the user to choose from fetched lists (e.g., auth methods, email providers): + +1. **Always display the full list** to the user before asking them to choose, so they know all available options. +2. **Use the most popular/common options** as the selectable choices in `AskUserQuestion` (limited to 2-4 options). +3. **Remind users** they can select "Other" to specify any option from the full list that isn't shown in the quick-select options. +4. **Example format:** + ``` + Available auth methods: Username & Password, Email, Google, GitHub, Discord, Keycloak, Slack + + [AskUserQuestion with 3-4 most common options] + + Note: Select "Other" to choose from additional options like Discord, Keycloak, or Slack. + ``` + +## After Feature Completion + +After completing a feature configuration: +1. Summarize the changes made +2. If applicable, let them know if there are any environment variables they need to set and ask them if they need guidance on how to set them + - if so, fetch the raw github doc file URL for the environment variables and guide the user through the process +3. Ask if the user would like to configure another feature +3. If yes, return to Feature Selection +4. If no, suggest running "Verify Setup" if they haven't already diff --git a/plugins/wasp/skills/configure-wasp/app-branding.md b/plugins/wasp/skills/configure-wasp/app-branding.md new file mode 100644 index 0000000..9b48002 --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/app-branding.md @@ -0,0 +1,14 @@ +# App Branding Setup + +Configure your Wasp app's name and description. + +## Steps + +1. Ask the user: + - What is your app name? + - What is a one-line description? + +2. Update the wasp config file `app` block according to the [Wasp docs](https://wasp.sh/llms.txt) +3. Add name, description, og, and other critical meta tags to the `app.head` section of the wasp config file. + +**Important:** Only add placeholder URLs in the `app.head` meta tags with a TODO comment for the user to replace with the actual URLs once they have a production domain and are ready to deploy. diff --git a/plugins/wasp/skills/configure-wasp/authentication.md b/plugins/wasp/skills/configure-wasp/authentication.md new file mode 100644 index 0000000..6a05f3a --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/authentication.md @@ -0,0 +1,33 @@ +# Authentication Setup + +Add and configure authentication methods for your Wasp app. + +## Prerequisites + +- Fetch the list of available authentication methods from the [Wasp docs](https://wasp.sh/llms.txt) + +## Steps + +1. Read the wasp config file auth methods section to see which providers are already configured, if any. + +2. **Display the full list** of available auth methods to the user. + +3. Using the `AskUserQuestion` tool, ask the user which (additional) auth methods they'd like to add: + - Use the most popular/common options (e.g., Email, Google, GitHub) as the selectable choices (limited to 2-4 options) + - Remind users they can select "Other" to specify any option from the full list + - If no auth methods are selected, skip to completion + +4. For each auth method selected: + - Fetch the raw GitHub doc URL for that auth method from the [Wasp docs](https://wasp.sh/llms.txt) + - Add the provider to the wasp config file's auth methods section according to the docs + - If applicable, inform user they'll need to set env vars + +5. Check if the app has defined authentication pages (e.g. login, signup, forgot password): + - If yes, check if those pages are using Wasp's managed AUTH UI components (e.g. `import { LoginForm } from "wasp/client/auth";`) + - If using managed UI, skip to completion + - If not, continue to next step + +6. If the app does not have authentication pages, ask the user if they'd like to set up: + - Authentication pages with Wasp's managed AUTH UI components that adapt to their selected auth methods + - If yes, follow the selected auth methods' guides in the Wasp docs + - If no, inform the user they can follow the "Create your own UI" guides later diff --git a/plugins/wasp/skills/configure-wasp/database.md b/plugins/wasp/skills/configure-wasp/database.md new file mode 100644 index 0000000..48bf450 --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/database.md @@ -0,0 +1,19 @@ +# Database Setup + +Configure a database for your Wasp app. + +## Prerequisites + +- Fetch the list of available databases from the [Wasp docs](https://wasp.sh/llms.txt) + +## Steps + +1. **Display the full list** of available databases to the user. + +2. Using the `AskUserQuestion` tool, ask the user which database they'd like to use: + - Use the most popular/common options (e.g., PostgreSQL, SQLite) as the selectable choices (limited to 2-4 options) + - Remind users they can select "Other" to specify any option from the full list + +3. If the selected database can be managed locally by Wasp (e.g., PostgreSQL), using the `AskUserQuestion` tool, ask the user: "Would you like me to guide you through the local database setup process?" + - If yes, guide the user through the managed database setup process according to the individual database docs + - If no, inform the user that they'll need to set the proper env vars after setting up the database themselves diff --git a/plugins/wasp/skills/configure-wasp/email-provider.md b/plugins/wasp/skills/configure-wasp/email-provider.md new file mode 100644 index 0000000..e46e739 --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/email-provider.md @@ -0,0 +1,29 @@ +# Email Provider Setup + +Configure an email sending provider for your Wasp app. + +## Prerequisites + +- Fetch the list of available email providers from the [Wasp docs](https://wasp.sh/llms.txt) + +## Steps + +1. **Display the full list** of available email providers to the user. + +2. Using the `AskUserQuestion` tool, ask the user which email sending provider they'd like to use: + - Use the most popular/common options as the selectable choices (limited to 2-4 options) + - Remind users they can select "Other" to specify any option from the full list + +3. For the selected provider: + - Fetch the raw GitHub doc URL for that provider from the [Wasp docs](https://wasp.sh/llms.txt) + - Add the provider to the wasp config file's `emailSender` section according to the docs + +## Environment Variables + +1. Generate a checklist of required env vars for the selected provider +2. Give user instructions for retrieving and adding env vars to `.env.server` +3. Follow steps/run commands in the guide to complete the integration where applicable + +## Completion + +After configuring the email provider, inform the user of the changes made and ask if they'd like to configure another feature. diff --git a/plugins/wasp/skills/configure-wasp/styling.md b/plugins/wasp/skills/configure-wasp/styling.md new file mode 100644 index 0000000..627b69f --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/styling.md @@ -0,0 +1,24 @@ +# Styling (CSS, UI) Setup + +Configure a CSS framework and/or component libraries for your Wasp app. + +## Prerequisites + +- Fetch the list of available CSS frameworks and styling options from the [Wasp docs](https://wasp.sh/llms.txt) +- Fetch the guide for using [ShadCN components with Wasp](https://gist.githubusercontent.com/infomiho/b35e9366e16913949e13eaba0538f553/raw/c6da98158c1a7e46b5874868f2e7c011f24d24d1/0-README.md) + +## Steps + +1. **Display the available options** to the user (e.g., Pure Tailwind CSS, ShadCN UI (on top of Tailwind CSS), etc.) + +2. Using the `AskUserQuestion` tool, ask the user which CSS framework they'd like to use: + +3. For the selected CSS framework: + - Fetch the raw GitHub doc URL for that framework's setup guide from the [Wasp docs](https://wasp.sh/llms.txt) + - Follow the installation steps in the guide + - Install any required dependencies + - Create/update configuration files as needed (e.g., `tailwind.config.js`, `postcss.config.js`) + - Update the Wasp config if required + +4. If setting up ShadCN UI (on top of Tailwind CSS): + - Make sure to set up Tailwind CSS first diff --git a/plugins/wasp/skills/configure-wasp/verify-setup.md b/plugins/wasp/skills/configure-wasp/verify-setup.md new file mode 100644 index 0000000..37954c3 --- /dev/null +++ b/plugins/wasp/skills/configure-wasp/verify-setup.md @@ -0,0 +1,30 @@ +# Verify Setup + +Verify your Wasp app configuration compiles and runs correctly. + +## Prerequisites + +Fetch the raw github doc file URL for the CLI reference from the [Wasp docs](https://wasp.sh/llms.txt) + +## Steps + +1. Start the wasp app processes in new terminals as background tasks in the current Claude Code session depending on the features configured. + +2. Monitor the output and verify: + - Configuration compiles without errors + - Database migrations run successfully (if applicable) + - Server starts without errors + - Client builds and starts without errors + +3. If errors occur: + - Analyze the error messages + - Suggest fixes based on the error type + - Guide the user through resolving the issues by fetching the raw github doc file URLs for the relevant guides. + +## Completion + +After verification: +1. Provide a summary of the verification results +2. If successful, inform the user their app is ready for feature development +3. If there were issues, provide next steps for resolution +4. Ask if they'd like to configure another feature or need help with anything else diff --git a/plugins/wasp/skills/deploying-app/SKILL.md b/plugins/wasp/skills/deploying-app/SKILL.md new file mode 100644 index 0000000..5182650 --- /dev/null +++ b/plugins/wasp/skills/deploying-app/SKILL.md @@ -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`](../../knowledge/cached-docs/deployment/deployment-methods_wasp-deploy_overview.md) providers 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 deploy` + +**DO NOT rerun**: `wasp deploy launch` commands (one-time only) diff --git a/plugins/wasp/skills/deploying-app/validating-pre-deployment.md b/plugins/wasp/skills/deploying-app/validating-pre-deployment.md new file mode 100644 index 0000000..84ef550 --- /dev/null +++ b/plugins/wasp/skills/deploying-app/validating-pre-deployment.md @@ -0,0 +1,101 @@ +--- +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 `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 vars](../../knowledge/cached-docs/project/env-vars.md) for the user to verify. + +Note that the following env vars are auto-set by Wasp when using [wasp deploy](../../knowledge/cached-docs/deployment/deployment-methods_wasp-deploy_overview.md) 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/ +``` + +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 [production build test](../../knowledge/cached-docs/deployment/local-testing.md) process. + +### 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) diff --git a/plugins/wasp/skills/start-dev-server/SKILL.md b/plugins/wasp/skills/start-dev-server/SKILL.md new file mode 100644 index 0000000..271d7d2 --- /dev/null +++ b/plugins/wasp/skills/start-dev-server/SKILL.md @@ -0,0 +1,72 @@ +--- +name: start-dev-server +description: start the Wasp dev server, handle database setup, and run migrations. Use when the user wants to start development, run the app locally, or needs help with database migrations. +--- + +# start-dev-server + +## Before Starting + +1. Verify user is in the app directory (check for `main.wasp` or `main.wasp.ts`) +2. Detect database type → [detect-database.md](./detect-database.md) +3. Ask the user if they want Claude 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 (Claude) + - Pros: Claude has more autonomy, can respond directly to dev server logs (warnings, errors) and can run Wasp CLI commands for you. + - 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 Claude doesn't have direct access to dev server logs (warnings, errors) or Wasp CLI commands. + +## Workflow + +### Step 1: Database Setup (PostgreSQL only) + +**PostgreSQL:** Start the managed database container as a background task: +```bash +wasp start db +``` +**Run this as a background task in the current claude code session.** +Wait 5-15 seconds for the database to be ready. + +**SQLite:** Skip this step. Do NOT run `wasp start db`. + +### Step 2: Stop Existing Dev Server + +Before running migrations, stop any running Wasp dev server to avoid database locks and stale types. + +**If started as background task in current session:** Use `KillShell` tool with the task ID. + +**If started externally:** Instruct the user to stop the dev server in the external terminal. + +### Step 3: Run Pending Migrations + +Check for pending migrations by reading the `migrations/` directory and the `schema.prisma` file and comparing. + +Prisma requires an interactive terminal. There are two solutions: + +#### Solution 1: Use `script` to provide a pseudo-TTY: + +```bash +script -q /dev/null bash -c 'wasp db migrate-dev --name ' +``` + +#### Solution 2: Have the user run in a separate terminal: +```bash +wasp db migrate-dev --name migration-name +``` + +ALWAYS use `--name migration-name`. If the user doesn't specify one, suggest a name based on schema changes. + +### Step 4: Start Dev Server + +Run as a background task: +```bash +wasp start +``` + +### Step 5: Verify + +1. Confirm client (`localhost:3000`) and server (`localhost:3001`) are running +2. 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 diff --git a/plugins/wasp/skills/start-dev-server/detect-database.md b/plugins/wasp/skills/start-dev-server/detect-database.md new file mode 100644 index 0000000..6e70486 --- /dev/null +++ b/plugins/wasp/skills/start-dev-server/detect-database.md @@ -0,0 +1,26 @@ +# Database Detection + +Detect which database the Wasp app is configured to use. + +## Detection Methods + +### Method 1: Check schema.prisma (Recommended) + +Read the `schema.prisma` file in the project root and look for the `datasource` block: + +```prisma +datasource db { + provider = "postgresql" // or "sqlite" + // ... +} +``` + +### Method 2: Check for .env files (fallback) + +Look for `DATABASE_URL` in `.env` or `.env.server`: +- SQLite URLs typically look like: `file:./dev.db` or `file:./data/app.db` +- PostgreSQL URLs look like: `postgresql://user:pass@host:5432/dbname` + +## Docker Database Container + +Docker needs to be installed and running for the managed Postgres database container (`wasp start db`) to work. diff --git a/plugins/wasp/skills/wasp-plugin-help/SKILL.md b/plugins/wasp/skills/wasp-plugin-help/SKILL.md new file mode 100644 index 0000000..c5a553a --- /dev/null +++ b/plugins/wasp/skills/wasp-plugin-help/SKILL.md @@ -0,0 +1,106 @@ +--- +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 see if Wasp knowledge 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, let the user know they should take care of this first by running `/wasp:init`: +```markdown +⚠️ +The Wasp plugin hasn't been initialized for the current project. +Run `/wasp: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 + +This plugin turns Claude Code into a Wasp framework expert, giving you an AI assistant that deeply understands Wasp's features, patterns, and best practices. + +## 💬 Example Wasp Prompts to Ask Claude + +- *"Add `Google authentication` to my app"* +- *"Help me add `ShadCN UI` to my app"* +- *"Start a new SaaS app using `Wasp's SaaS starter template`"* +- *"Set up email sending with `SendGrid`"* +- *"Solve the errors in the `browser console`"* +- *"Which `Wasp features` should I use for this task?"* +- *"Why isn't my `recurring job` working?"* +- *"Deploy my app to `Railway`"* + +## 🤖 Skills + +Skills are context-aware workflows Claude can invoke to help you accomplish specific Wasp tasks. Claude will automatically invoke the relevant skill based on the user's request. + +### 1. configure-wasp +Interactive guided setup for adding or configuring Wasp framework features: + +**App Branding**: Set your app's name, description, and meta tags +**Authentication**: Add login methods (Email, Google, GitHub, Discord, Slack,etc.) +**Email Provider**: Configure email sending (SendGrid, Mailgun, SMTP) +**Database**: Set up PostgreSQL or SQLite +**Styling (CSS, UI)**: Add Tailwind CSS or ShadCN UI +**Verify Setup**: Test that your app compiles and runs correctly + +*Usage:* Just ask Claude something like "help me set up authentication" or "configure my database" + +### 2. start-dev-server +Start the Wasp development environment properly: +- Detects database type (PostgreSQL vs SQLite) +- Handles non-interactive terminal issues with Prisma migrations +- Starts the database container only when needed (PostgreSQL) +- Runs migrations with the correct `script` wrapper +- Starts the dev server as a background task + +*Usage:* Ask Claude "start the dev server", "run migrations", or "help me start development" + +### 3. deploying-app +Guided deployment workflow that helps you: +- Run a pre-deployment checklist +- Deploy to Railway or Fly.io using `wasp deploy` +- Configure OAuth redirect URLs for production +- Handle interrupted deployments safely + +*Usage:* Ask Claude "help me deploy my app" or "deploy to Railway" + + +## 🔧 Commands + +Commands are used to interact with the plugin. Commands are run by the user when they want to invoke a specific prompt/action: + +1. `/wasp:init`: + - Initialize the plugin for your project. + - Copies Wasp knowledge to your project + - Links it in your `CLAUDE.md` file + - Run this once per project + +2. `/wasp:help`: + - Displays this help guide + +3. `/wasp:expert-advice [advice request]`: + - Get advice on app improvements and functionality from a Wasp expert + - Optionally provide arguments for more specific requests (e.g., `/wasp:expert-advice how can I improve account management?`) + - Explores your codebase, Wasp docs, and plugin features to suggest improvements with pros and cons + + +## 📖 Documentation Access + +The plugin ensures Claude always references the correct Wasp documentation for your project: + +- Latest docs: `https://wasp.sh/llms.txt` - Full Wasp documentation in LLM-friendly format +- Versioned docs: `https://wasp.sh/llms-{version}.txt` - Documentation for a specific Wasp version (e.g., `llms-0.15.txt`) + +Claude automatically detects your project's Wasp version and fetches the appropriate documentation when needed. + + +## 🤝 Contribute + +Want to help make this plugin better? +Submit issues, feedback, or PRs to the [Wasp Claude Code Plugins](https://github.com/wasp-lang/claude-plugins) repository. + + +## 🫂 Community + +Join the [Wasp Discord](https://discord.gg/rzdnErX) to get extra help or talk about anything web development related.