# Am

> asyncmachine - generate handlers, schemas, args, telemetry, dbg, RPC, state waiting, Use when this capability is needed.

- Skill: `tomevault-io/am` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/am`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/am/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/am

---


# General

- Always check context after a blocking call, before checking `err`. Expired state ctx is `return // expired`.
- Prefer traced mutations `Ev*(e...)` if `e *am.Event` in the scope.
- The default ctx in a handler is the handler's state ctx, unless it's a `Multi` state.
- Always list states from imported schemas (usually `./states/ss_*.go`).
- Always mimic the example schema (order, naming).
  - Every schema has to inherit from `*am.StatesBase`
  - Almost every schema has to inherit from `*ss.BasicStates`, unless specified otherwise or an edge-case.
  - Schema failes are called `ss_{name}.go`
- Prefer `am.NewCommon` constructor over `am.New` and always add env-based debugging with `SetArgsMapper(LogArgs)`
  and groups (if any).
- Always verify created files using `go build` and the LSP.
- Use single-state methods (`*1` suffix) for single-state calls, eg `Add1(state)`, instead of `Add(am.S{state})`

# Details

---
> Source: [pancsta/asyncmachine-go](https://github.com/pancsta/asyncmachine-go) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-01 -->

