Wash
diegosouzapw2026-10-27查看 913复制 654
精通 wasmCloud Shell (wash) CLI 工具,用于构建、运行和管理 WebAssembly 组件及 wasmCloud 应用。在处理 wasmCloud、WebAssembly 组件、WIT (WebAssembly Interface Types) 定义或 wash 命令时使用此技能。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md2290 chars
--- name: wash description: Expert in wasmCloud Shell (wash) CLI tool for building, running, and managing WebAssembly components and wasmCloud applications. Use this skill when working with wasmCloud, WebAssembly components, WIT (WebAssembly Interface Types) definitions, or wash commands. license: Apache-2.0 tags: - wasmcloud - cli - tooling - development - webassembly --- # wash - wasmCloud Shell This skill provides expertise in using the wasmCloud Shell (wash) CLI tool for developing and managing WebAssembly components and wasmCloud applications. ## Prerequisites - `wash` version 2.0.0 or later (including release candidates like 2.0.0-rc.X) - Verify version with: `wash --version` ## Important Notes **Do not use `cargo component` commands** (like `cargo component build`) when working with wasmCloud projects. Always use `wash` commands instead: - Use `wash build` or `wash dev` for building components - For plugins, build with `wash build --skip-fetch` (since wasmcloud:wash interface isn't published) ## Core Commands ### wash dev Use `wash dev` for local development and build loop. This command: - Automatically rebuilds your component on file changes - Provides a fast iteration cycle during development - Watches for changes and recompiles as needed Example: ```bash wash dev ``` ### wash wit update Use `wash wit update` when there are mismatched WIT (WebAssembly Interface Types) definitions. This command: - Updates WIT dependencies to resolve conflicts - Synchronizes WIT definitions across your project - Fixes version mismatches in component interfaces Example: ```bash wash wit update ``` ## Common Workflows ### Starting a New Project 1. Initialize your project with `wash new https://github.com/cosmonic-labs/<TEMPLATE> --name my-project` 2. `cd my-project` 3. Run `wash build` to build the code 4. Make changes to your code ### Fixing WIT Definition Conflicts If you encounter errors about mismatched WIT definitions: 1. Run `wash wit update` to synchronize definitions 2. Review the updated WIT files 3. Continue with `wash build` ## Additional Resources - wash is the primary CLI tool for the wasmCloud ecosystem - It handles component building, testing, and deployment - Supports both local development and production workflows