Aomi Build - App & Plugin Builder
by @ceciliaz030
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...
clawhub install aomi-buildπ About This Skill
name: aomi-build description: > 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 notes, runtime interfaces, or product requirements. Converts specs into Aomi SDK crates with
lib.rs, client.rs, and tool.rs, plus tool schemas,
preambles, host-interop flows, and validation steps. Prefer real product
integrations over docs-only helpers whenever a callable surface exists.
compatibility: "Best when a local aomi-sdk checkout is available, often at ../aomi-sdk. Falls back to bundled references when the SDK repo is not present."
license: MIT
allowed-tools: Bash
metadata:
author: aomi-labs
version: "0.1"
Aomi Build
Use this skill for tasks like:
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.mdapps/*/src/{lib,client,tool}.rsIf the supplied docs mostly point to GitHub repositories, SDKs, or examples instead of listing public endpoints:
If the current repo is aomi-widget, also inspect:
apps/landing/content/examples/*.mdxapps/landing/content/guides/build/**/*.mdxIf the SDK repo is not available, read:
Default Workflow
1. 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?
2. 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
3. Reduce the spec into semantically meaningful tools.
4. Scaffold or update the Aomi app using the standard file split:
- lib.rs for manifest and preamble
- client.rs for HTTP client, auth, models, and normalization
- tool.rs for DynAomiTool implementations
5. Write the preamble around actual tool behavior, confirmation rules, and any host handoff.
6. Validate with the SDK build flow and add focused tests when logic is non-trivial.
Tool Design Rules
search_*, get_*, build_*, submit_*, list_*, or resolve_*.*_rpc or *_raw is fine, but it should not replace a clean core workflow.JsonSchema. Field doc comments are model-facing and matter.client.rs or helper functions.File Responsibilities
lib.rs
PREAMBLE or a small build_preamble() hook.dyn_aomi_app!.client.rs
reqwest::blocking::Client with explicit timeouts for sync tools, matching the current SDK examples.tool.rs
DynAomiTool.DynToolCallCtx when host state such as connected wallet, session state, or caller attributes is needed.Preamble Rules
Write the preamble from the app's real contract:
For deeper patterns and examples, read references/aomi-sdk-patterns.md.
Host Interop And Execution
For execution-oriented apps:
docs/host-interop.md.SYSTEM_NEXT_ACTION guidance.Validation
When working inside aomi-sdk:
cargo run -p xtask -- new-app if starting from scratch, or copy sdk/examples/app-template-http.cargo run -p xtask -- build-aomi --app .build-aomi reports zero built plugins for a brand new app, check whether the new apps//Cargo.toml is still untracked. The current xtask prefers git ls-files discovery for app manifests.cargo build --manifest-path apps//Cargo.toml .aomi_sdk::testing::{TestCtxBuilder, run_tool, run_async_tool}.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:
π Constraints
When working inside aomi-sdk:
cargo run -p xtask -- new-app if starting from scratch, or copy sdk/examples/app-template-http.cargo run -p xtask -- build-aomi --app .build-aomi reports zero built plugins for a brand new app, check whether the new apps//Cargo.toml is still untracked. The current xtask prefers git ls-files discovery for app manifests.cargo build --manifest-path apps//Cargo.toml .aomi_sdk::testing::{TestCtxBuilder, run_tool, run_async_tool}.When the task also touches docs or demos in aomi-widget, update the relevant examples or guides to match the new app behavior.