AgentSkillsCN

add-feature

为你的应用添加 Wasp 内置功能——身份验证、邮件发送、任务调度等。这些功能采用全栈设计,开箱即用,由 Wasp 全权负责。当用户希望添加元标签、实现身份验证(邮箱、社交身份验证提供商)、配置邮件发送、搭建数据库、应用样式(Tailwind、ShadCN),或启用其他由 Wasp 提供的强大功能时,即可使用此技能。

SKILL.md
--- frontmatter
name: add-feature
description: Add Wasp's built-in features to your app — auth, email, jobs, and more. These are full-stack, batteries-included features that Wasp handles for you. Use when the user wants to add meta tags, authentication (email, social auth providers), email sending, database setup, styling (tailwind, shadcn), or other Wasp-powered functionality.

add-feature

Add Wasp's batteries-included features to your app. 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:

FeatureDescription
App BrandingSet your app's name, description, and meta tags
AuthenticationAdd login methods (Email, Google, GitHub, etc.)
Email ProviderConfigure email sending (SendGrid, Mailgun, etc.)
DatabaseSet up your database (PostgreSQL, SQLite, etc.)
Styling (CSS, UI)Add Tailwind CSS or ShadCN UI (on top of Tailwind CSS)
Verify SetupTest 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.

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:
    code
    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
  1. Ask if the user would like to configure another feature
  2. If yes, return to Feature Selection
  3. If no, suggest running "Verify Setup" if they haven't already