Aomi Build - App & Plugin Builder
/install aomi-build
Aomi Build
Use this skill for tasks like:
- "Build an Aomi app from this OpenAPI spec."
- "Turn these REST endpoints into an Aomi plugin."
- "Scaffold a new Aomi SDK app for this product/API."
- "Update an existing Aomi app to support these new endpoints."
- "Turn these builder docs or SDK repos into an Aomi assistant."
First Read
If a local aomi-sdk checkout exists, inspect these first:
sdk/examples/app-template-http/src/lib.rssdk/examples/app-template-http/src/client.rssdk/examples/app-template-http/src/tool.rsdocs/repo-structure.mddocs/host-interop.md- 2 or 3 relevant apps under
apps/*/src/{lib,client,tool}.rs
If the supplied docs mostly point to GitHub repositories, SDKs, or examples instead of listing public endpoints:
- treat those linked repositories as the real source of truth
- inspect their README, config examples, example commands, and RPC/API surfaces
- check whether they expose or produce a runnable service interface such as REST, GraphQL, JSON-RPC, gRPC, webhooks, or another stable client contract
- prefer building against that executable surface instead of wrapping the docs themselves
- avoid inventing a public transactional API that the docs do not actually publish
If the current repo is aomi-widget, also inspect:
apps/landing/content/examples/*.mdxapps/landing/content/guides/build/**/*.mdx
If the SDK repo is not available, read:
Default Workflow
- Identify the product surface:
- What external API, SDK, repo, or spec is the source of truth?
- What concrete callable surface exists: REST, GraphQL, JSON-RPC, gRPC, webhook, CLI contract, or something else?
- Is there a real target we can point the app at: hosted service, self-hosted node, local example stack, or customer-provided endpoint?
- Is this read-only, execution-oriented, or mixed?
- What auth/env vars are required?
- What user state must come from the host or caller?
- Is this actually a public end-user API, a standard client interface exposed by a runtime/example app, or only builder-facing documentation?
- Describe the intended user-facing toolset before implementation:
- list the proposed tools by name
- say what user intent each tool serves
- call out which tools are read-only, which prepare actions, and which write or submit
- mention any expected target URL, runtime, or host dependency
- if the toolset is uncertain, surface the uncertainty before coding
- identify the primary user workflow the app should make easy first
- keep the first pass to the smallest sufficient toolset for that workflow unless the user asked for broader API coverage
- Reduce the spec into semantically meaningful tools.
- Scaffold or update the Aomi app using the standard file split:
lib.rsfor manifest and preambleclient.rsfor HTTP client, auth, models, and normalizationtool.rsforDynAomiToolimplementations
- Write the preamble around actual tool behavior, confirmation rules, and any host handoff.
- Validate with the SDK build flow and add focused tests when logic is non-trivial.
Tool Design Rules
- First decide what kind of app this should be:
- product client
- execution assistant
- builder / SDK / runtime assistant
- Before implementing, state the proposed toolset in concrete user-facing terms. This is part of the design, not optional polish.
- Prefer the smallest sufficient toolset that makes the primary user workflow work end to end.
- If there are multiple plausible integration targets, briefly state which one you are choosing and why before coding.
- Prefer tools that interact with an actual product surface over tools that merely restate documentation.
- A hosted API is not required. A self-hosted service, local example stack, standard RPC server, or other runnable interface still counts as a real integration target.
- If the source material is SDK- or architecture-heavy, first ask whether it produces a service that clients call. If yes, build the client for that service.
- Only fall back to a builder-oriented or docs-oriented tool surface when no stable executable target is available.
- Do not mirror every endpoint 1:1 unless that is actually the cleanest model-facing API or the user explicitly asked for broad coverage.
- Prefer 3 to 8 tools with clear user intent boundaries such as
search_*,get_*,build_*,submit_*,list_*, orresolve_*. - Prefer intent-shaped tool names over raw protocol or transport names when practical.
- Aggregate noisy upstream endpoints behind a smaller tool surface when the model does not need the raw distinction.
- Prefer typed arguments over raw JSON string blobs when the primary workflow can be modeled cleanly that way.
- Separate core tools from escape hatches. A generic fallback tool such as
*_rpcor*_rawis fine, but it should not replace a clean core workflow. - Keep args typed and documented with
JsonSchema. Field doc comments are model-facing and matter. - Return stable JSON with predictable keys. Normalize upstream naming, paging, and inconsistent shapes inside
client.rsor helper functions. - Convert upstream errors into short actionable messages. Do not leak raw HTML, secrets, or giant payload dumps.
File Responsibilities
lib.rs
- Keep it easy to scan.
- Define
PREAMBLEor a smallbuild_preamble()hook. - Register tools with
dyn_aomi_app!. - Only keep manifest-level wiring here.
client.rs
- Own the app struct, HTTP client, auth headers, env vars, typed models, and response normalization.
- Prefer
reqwest::blocking::Clientwith explicit timeouts for sync tools, matching the current SDK examples. - Keep third-party API quirks here instead of spreading them across tool implementations.
tool.rs
- Implement
DynAomiTool. - Use descriptions that tell the model when to call the tool, not just what endpoint it wraps.
- Map normalized client results into concise JSON results.
- Use
DynToolCallCtxwhen host state such as connected wallet, session state, or caller attributes is needed.
Preamble Rules
Write the preamble from the app's real contract:
- Define role, capabilities, workflow, and guardrails.
- Mention tool order for multi-step flows.
- State explicit confirmation requirements before write actions.
- If dates matter, include the current date or instruct the app to use exact dates.
- If the app relies on host wallet/signing tools, say that clearly and do not imply hidden infrastructure.
For deeper patterns and examples, read references/aomi-sdk-patterns.md.
Host Interop And Execution
For execution-oriented apps:
- Follow the public host conventions from
docs/host-interop.md. - Do not invent private namespaces or internal fallback behavior.
- When the next step belongs to the host wallet or signer, return machine-readable
SYSTEM_NEXT_ACTIONguidance. - Preserve exact transaction or signature args when a downstream host tool must execute them.
- Do not claim a write succeeded until the upstream API submit step has actually completed.
Validation
When working inside aomi-sdk:
- Scaffold with
cargo run -p xtask -- new-app \x3Cname>if starting from scratch, or copysdk/examples/app-template-http. - Build the plugin with
cargo run -p xtask -- build-aomi --app \x3Cname>. - If
build-aomireports zero built plugins for a brand new app, check whether the newapps/\x3Cname>/Cargo.tomlis still untracked. The current xtask prefersgit ls-filesdiscovery for app manifests. - For a direct compile signal on an untracked app, use
cargo build --manifest-path apps/\x3Cname>/Cargo.toml. - If the app has meaningful branching or normalization logic, add unit tests with
aomi_sdk::testing::{TestCtxBuilder, run_tool, run_async_tool}. - If a real target is available, validate the app with a short ladder:
- compile/build
- connectivity check
- one representative read flow
- one representative write or submit flow when applicable
- post-write verification such as status, receipt, or refreshed state
- Prefer proving one end-to-end user scenario over checking many disconnected endpoints.
When the task also touches docs or demos in aomi-widget, update the relevant examples or guides to match the new app behavior.
Output Expectations
Aim to leave behind:
- a coherent Aomi app crate or patch
- typed tool args and strong descriptions
- a preamble that explains the tool contract and rules
- stable JSON outputs for the host/model
- an app that can point at a real product surface when one exists
- a short validation pass or a clear note about what could not be verified
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install aomi-build - 安装完成后,直接呼叫该 Skill 的名称或使用
/aomi-build触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Aomi Build - App & Plugin Builder 是什么?
Use when the user wants to build, scaffold, or update an Aomi app/plugin from API docs, OpenAPI or Swagger specs, SDK docs, repository examples, endpoint not... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。
如何安装 Aomi Build - App & Plugin Builder?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install aomi-build」即可一键安装,无需额外配置。
Aomi Build - App & Plugin Builder 是免费的吗?
是的,Aomi Build - App & Plugin Builder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Aomi Build - App & Plugin Builder 支持哪些平台?
Aomi Build - App & Plugin Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Aomi Build - App & Plugin Builder?
由 merkle-seeds(@merkle-seeds)开发并维护,当前版本 v0.1.0。