Loading...
Loading...
Guide coding agents working in applications that consume @dune2/tools. Use when @dune2/tools is installed and the task involves API requests or TanStack Query, browser/cookie storage, Valtio state, React Context factories, prop adapters, typed field names, or precise decimal formatting/calculation. Prefer the library's existing APIs over rebuilding equivalent helpers.
npx skill4agent add liaoyinglong/next-tools dune2-tools@dune2/toolsnext-tools@dune2/tools@dune2/tools/*@dune2/tools@dune2/tools/rq@dune2/tools/storage@dune2/tools/store@dune2/tools/numbro@dune2/tools/factory/*@dune2/tools| Need | Prefer |
|---|---|
| HTTP API + TanStack Query | |
| SDK/contract/worker/local async operation that still needs Query caching/status | |
| Imperative request using an existing API definition | |
| Prefetch/fetch/ensure/invalidate/refetch/read/write query cache | The matching |
| Exceptional request needing separate query/body or per-call transport config | |
| Typed request/response field names | |
| localStorage/sessionStorage + typed defaults + React subscription | |
| Client-readable string cookies | |
| Valtio state with typed actions/hooks | |
| React Context whose value is produced by a hook | |
| Adapt/default/enhance component props while preserving refs | |
| Precise decimal arithmetic/formatting | |
RequestBuilderapi.request(params)requestWithConfig(...)RequestBuilder.setRequestFn(...)createStorage().<key>.useValue()createStorecreateStateContextmapPropsfieldsMapnumbrotoFixedimport type { OptionalKeys, Overwrite, Print } from '@dune2/tools/shared';@dune2/tools@dune2/toolsqueryKeyRequestBuilderfetchrequestWithConfig(...)request(params)createStorageuseValuefieldsMapreqFieldsresFieldsnumbernumbro