wasp-plugin-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
  1. 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
    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).
  2. if the user is using Claude Code, follow the Claude Code memory instructions. If the user is using other agents, follow the Other agents memory instructions.
  3. inform the user that process is complete and they can run
    /wasp-plugin-help
    to see the plugin's available skills and features.
  4. 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.
  1. 告知用户,通过将
    general-wasp-knowledge.md
    文件导入到用户的AGENTS.md或CLAUDE.md文件中,此流程将使其代理(Claude、Codex、Copilot等)能够获取关于Wasp功能、命令、工作流以及最佳实践的知识。使用AskUserQuestion工具(或同类工具)完成以下操作:a) 询问用户是否要继续,b) 询问用户是否使用Claude Code(对应CLAUDE.md)还是其他代理如Codex、Gemini、Copilot等(对应AGENTS.md)。
  2. 如果用户使用Claude Code,请遵循Claude Code 记忆设置中的说明。如果用户使用其他代理,请遵循其他代理记忆设置中的说明。
  3. 告知用户流程已完成,他们可以运行
    /wasp-plugin-help
    查看插件的可用技能和功能。
  4. 为了让用户在使用Claude、Codex、Copilot等工具时获得最佳Wasp开发体验,建议用户执行以下操作:
    • 启动开发服务器:告知代理运行'start-dev-server'技能以启动Wasp应用,并使其能够访问服务器日志、构建错误以及Wasp CLI命令
    • 启用Chrome DevTools:提示代理*
      使用Chrome DevTools MCP服务器
      *,使其能够查看浏览器控制台日志、网络请求以及运行时错误
    解释说明:以上两项操作结合使用,可提供端到端的洞察(后端+前端),从而加快调试和开发速度。

Claude Code memory

Claude Code 记忆设置

  • get the plugin version from
    ${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
    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
undefined
  • ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json
    文件的
    version
    字段中获取插件版本,后续将其作为
    {VERSION}
    使用。
  • 检查
    .claude/wasp/.wasp-plugin-initialized-v{VERSION}
    文件是否已存在。如果已存在,告知用户该版本的插件已完成初始化,跳过剩余步骤。
  • 检查
    .claude/wasp/
    目录下是否存在任何匹配
    .wasp-plugin-initialized*
    模式的旧标记文件。如果存在,将其删除——这属于版本升级操作:
bash
rm -f .claude/wasp/.wasp-plugin-initialized*
  • general-wasp-knowledge.md
    复制到项目根目录的
    .claude/wasp
    文件夹中:
bash
mkdir -p .claude/wasp && cp ./general-wasp-knowledge.md .claude/wasp/general-wasp-knowledge.md
  • 如果CLAUDE.md文件中尚未包含
    # Wasp Knowledge
    章节,将其作为导入内容追加到文件中:
markdown
undefined

Wasp Knowledge

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}
Wasp knowledge can be found at @.claude/wasp/general-wasp-knowledge.md
- 创建带版本号的标记文件,以便插件知晓该版本已完成初始化:
```bash
touch .claude/wasp/.wasp-plugin-initialized-v{VERSION}

Other agents memory

其他代理记忆设置

  • get the plugin version from
    ${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
    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
      into this new section.
  • ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json
    文件的
    version
    字段中获取插件版本,后续将其作为
    {VERSION}
    使用。
  • 如果AGENTS.md文件中已存在以
    # Wasp Knowledge [GENERATED BY WASP
    开头的章节,将该章节从标题到下一个
    #
    标题或文件末尾的全部内容删除,再添加新内容。
  • general-wasp-knowledge.md
    的全部内容追加到用户的AGENTS.md文件中:
    • 在文件末尾添加一个新章节,标题为
      # Wasp Knowledge [GENERATED BY WASP v{VERSION}]
    • general-wasp-knowledge.md
      的内容复制粘贴到这个新章节中。