Skip to content
Back to skills

Package Builder

ASecurity

Build, check and publish an Aomi package or agent with the npm aomi build commands. Use for SDK 8 projects, protocol or API integrations, ABI or IDL imports, tools, onchain checks, fixture tests and release management.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
ai-agentsrustgoshelltestinggitapidocumentation

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 7 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add aomi-labs/skills --skill package-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Package Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Package Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aomi-labs-package-builder/badge)](https://www.skillsdirectory.com/skills/aomi-labs-package-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: package-builder
description: Build, check and publish an Aomi package or agent with the npm aomi build commands. Use for SDK 8 projects, protocol or API integrations, ABI or IDL imports, tools, onchain checks, fixture tests and release management.
license: MIT
version: "0.2.0"
risk_tier: L1
permissions:
  files:
    read: [./, ../aomi-sdk/]
    write: [./]
    deny_write: [SOUL.md, MEMORY.md, AGENTS.md, build.rs]
  network:
    allow: [aomi.chat, aomi.build]
    deny: "*"
  shell: [aomi, cargo]
  tools: []
metadata:
  author: aomi-labs
  version: "0.2.0"
---

# Package builder

A **project** has a root `aomi.toml` listing its `[[packages]]` and `[[agents]]`.
The **publisher** owns the namespace for both, for example `example/lend`.
A **package** contains instructions for the model, optional onchain facts, and
optional Rust tools. A **text-only package** has no `src/`. A Rust package
compiles to a `wasm32-wasip2` component. An **agent** is the chat persona that
uses those packages. A package and an agent each have their own numbered releases.

## Start a project

Use version 2 of the npm CLI (`@aomi-labs/cli`) for SDK 8. Check
`aomi build --help` on the installed executable. Once the SDK 8 CLI is
available on npm, install with `npm install -g @aomi-labs/cli@2`.
For Rust tools, install the component target with `rustup target add wasm32-wasip2`.

```sh
aomi build init lending-project --publisher example --name lend
cd lending-project
aomi build new package notes
aomi build new agent guide
```

Use your publisher slug in place of `example`. The root also contains `aomi.schema.json`, which the package manifest references
for editor validation. From the project root, `--package lend` selects the package by its manifest name. For commands
that take `--root`, pass the directory containing the root manifest.
Inside a package, `onchain add`, `tool add` and `gen` can infer its name.

## Describe the package and add tools

In `packages/lend/aomi.toml`, keep `[package] world = 1`. Use lowercase
letters, digits and hyphens for package names. Start the description with
a verb and name the chains. Set `chains` or supply chain words in onchain
addresses, and choose `tags` from the generated schema. In the listed
`skills/*.md` file, explain when to use the package, its steps and rules.
Refer to contracts by label and to the person's address as `wallet`.

For a registry lookup, sign in with `aomi login`. Choose the command for
your chain. The third form reads an ABI from disk.

```sh
aomi build onchain add pool 0xA238Dd80C259a72e81d7e4664a9801593F98d1c5 --chain base --package lend
aomi build onchain add staking MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD --package lend
aomi build onchain add pool --file pool.json --address base=0xA238Dd80C259a72e81d7e4664a9801593F98d1c5 --package lend
```

EVM lookups take a chain word or decimal ID. For Solana, pass the program ID
alone. The command stores the trimmed ABI or IDL and writes an
`[onchain.<label>]` entry. It proposes writes and checks in comments. Enable
only the methods the package stages and verify the checks against protocol
documentation. For example, the EVM lend package binds `withdraw.to` to
`"$wallet"`. Checks cover targets, recipients, spenders and native value.
A router that needs a built-in evaluator names it with
`verify = "builtin/evm/<id>"`. If a valid
check rejects a call, fix the call.

A text-only package can use the agent's core tools. Add a Rust tool for an
off-chain API, data shaping or calldata that needs typed construction.

```sh
aomi build tool add position --package lend
aomi build gen --package lend
aomi build doctor
```

Implement the generated `Tool` and keep it in `aomi_sdk::package!(...)`.
With onchain entries, compile `aomi_sdk::onchain!()` in `src/lib.rs` to
use the generated descriptor. Run `gen` before compiling a fresh checkout.
Declare the transaction or signature capabilities a tool returns. The Solana
example declares `[capabilities] transactions = ["svm"]` for its
`Outcome::stage(...).tx(...)`. Use `.then(...)` for a follow-up.
Doctor checks manifests and reports stale generated files without building.

## Run the same fixtures twice

Put one case per `fixtures/<case>.json` in the package. Each names a tool,
its args, recorded host replies as needed and the expected result. For
example, the EVM lend tool's missing-wallet case is:

```json
{"tool":"position","args":{},"expect":{"error":"no_wallet"}}
```

Enable the SDK's `testing` feature under `[dev-dependencies]` and add this
test in the package's `src/lib.rs`. Run `cargo test` from the crate directory
to exercise tool logic against the native mock host.

```rust
#[cfg(test)]
#[test]
fn fixtures() {
    aomi_sdk::testing::run_fixtures!("fixtures");
}
```

Then run the compiled component in the local sandbox. From an SDK checkout, run either example.

```sh
aomi build test --root examples/evm-lend
aomi build test --root examples/solana-stake --case stake-ready
```

The CLI builds, packs and checks the package, then runs the selected cases in the sandbox.
An unexpected host request or unused recorded reply fails the case. Read the
per-transaction checks and any legs marked `host`, which need checks at
publish or staging time. Run `aomi build test` from your own project root for
the full suite. Use `aomi build pack --out dist` to keep checked bundles locally.

- [evm-lend](https://github.com/aomi-labs/aomi-sdk/tree/6a5c4a266ac11063b3d24e39405cf42fdbac5597/examples/evm-lend) reads an Aave position on Base using a recorded RPC reply and checks supply and withdrawal recipients.
- [solana-stake](https://github.com/aomi-labs/aomi-sdk/tree/6a5c4a266ac11063b3d24e39405cf42fdbac5597/examples/solana-stake) checks the fee payer and programs in an unsigned staking transaction, then stages Marinade instructions.

## Extend the main agent

`aomi build new agent guide` creates a voice file and a root `[[agents]]`
entry listing the project's packages. Edit that entry to choose what the agent
inherits. This entry adds the lending package to Aomi’s main agent.

```toml
[[agents]]
name = "guide"
display_name = "Lending guide"
voice = "agents/guide.md"
chains = ["base"]
extends = "aomi/main"
packages = ["example/lend"]
model_cost = "builder"
audience = "public"
```

`aomi/main` is Aomi's main agent. Publishing resolves its live release
and records the parent release number. To select a specific parent, use
`aomi/main@<number>`. The child inherits the parent's packages and defaults.
Use `packages` for packages that stay on, `defaults` for packages a person
can turn off, and `exclude` to remove matches. See the [complete agent project](https://github.com/aomi-labs/aomi-sdk/tree/6a5c4a266ac11063b3d24e39405cf42fdbac5597/examples/agent-project).

## Publish, promote and manage secrets

Use a builder key from Build for the target publisher. Supply it through
`AOMI_BUILDER_KEY` or pass `--key-file <path>` to each Build identity, release
or secret command. Check the publisher and key capabilities with
`aomi build whoami`. Keep keys outside the project. Rust dependency build
scripts can read the build environment, so review and pin dependencies and
scope CI keys to the required publisher operations.

For a requested release, select what to upload. With no selectors, publish
processes every package and agent in the project. A release is immutable.
Promotion makes an explicit release live. Promote the package before
publishing an agent that needs it. Replace each placeholder below with the release number you want from the list.

```text
aomi build publish --package lend
aomi build releases package lend
aomi build promote package lend <number>
aomi build publish --agent guide
aomi build releases agent guide
aomi build promote agent guide <number>
```

Use `--promote` on publish when the new release should go live immediately.
To roll back, promote an earlier release number. For a private package,
`aomi build codes create lend` issues an activation code.

Declare secret slots in the package manifest under `[[secrets]]`. For a
builder-owned slot named `API_TOKEN`, inspect status, set the value from a
hidden prompt or stdin, and clear it when requested.

```sh
aomi build secret list lend
aomi build secret set lend API_TOKEN
aomi build secret clear lend API_TOKEN
```

Setting and clearing require `package:secrets`. Each person supplies their own
person-owned secret. Keep slot values out of command arguments and fixtures.

Files in this skill

  • .claude-plugin/plugin.json545 B
  • .codex-plugin/plugin.json783 B
  • LICENSE1 KB
  • README.md209 B
  • SECURITY.md730 B
  • SKILL.md8.3 KB
  • agents/openai.yaml213 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.