wasp-plugin-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese-
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 thefile 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).
general-wasp-knowledge.md -
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.
-
inform the user that process is complete and they can runto see the plugin's available skills and features.
/wasp-plugin-help -
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 to give it visibility into browser console logs, network requests, and runtime errors
use the Chrome DevTools MCP server
Explain that together these provide end-to-end insight (backend + frontend) for faster debugging and development.
-
告知用户,通过将文件导入到用户的AGENTS.md或CLAUDE.md文件中,此流程将使其代理(Claude、Codex、Copilot等)能够获取关于Wasp功能、命令、工作流以及最佳实践的知识。使用AskUserQuestion工具(或同类工具)完成以下操作:a) 询问用户是否要继续,b) 询问用户是否使用Claude Code(对应CLAUDE.md)还是其他代理如Codex、Gemini、Copilot等(对应AGENTS.md)。
general-wasp-knowledge.md -
如果用户使用Claude Code,请遵循Claude Code 记忆设置中的说明。如果用户使用其他代理,请遵循其他代理记忆设置中的说明。
-
告知用户流程已完成,他们可以运行查看插件的可用技能和功能。
/wasp-plugin-help -
为了让用户在使用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.jsonfield). Use it below asversion.{VERSION} - check if already exists. If it does, inform the user the plugin is already initialized for this version and skip the remaining steps.
.claude/wasp/.wasp-plugin-initialized-v{VERSION} - check for any old marker files matching the pattern in
.wasp-plugin-initialized*. If found, remove them — this is a version upgrade:.claude/wasp/
bash
rm -f .claude/wasp/.wasp-plugin-initialized*- copy to the user's project root
general-wasp-knowledge.mddirectory:.claude/wasp
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 section, append it as an import:
# Wasp Knowledge
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
undefinedWasp 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.jsonfield). Use it below asversion.{VERSION} - if the AGENTS.md file already contains a section starting with , remove that entire section (from the heading to the next
# Wasp Knowledge [GENERATED BY WASPheading or end of file) before adding the new one.# - append the entire contents of into the user's AGENTS.md file:
general-wasp-knowledge.md- 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 into this new section.
general-wasp-knowledge.md
- Append a new section at the end of the file with the title
- 从文件的
${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json字段中获取插件版本,后续将其作为version使用。{VERSION} - 如果AGENTS.md文件中已存在以开头的章节,将该章节从标题到下一个
# Wasp Knowledge [GENERATED BY WASP标题或文件末尾的全部内容删除,再添加新内容。# - 将的全部内容追加到用户的AGENTS.md文件中:
general-wasp-knowledge.md- 在文件末尾添加一个新章节,标题为。
# Wasp Knowledge [GENERATED BY WASP v{VERSION}] - 将的内容复制粘贴到这个新章节中。
general-wasp-knowledge.md
- 在文件末尾添加一个新章节,标题为