skills/sails-idl-client/SKILL.md
Use when a builder needs to wire or repair the standard Gear/Vara Sails IDL and generated client pipeline in app, client, or test crates. Do not use for raw payload-only testing, Vara.eth or ethexe codegen, or non-Sails repositories.
npx skillsauth add gear-foundation/vara-skills sails-idl-clientInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Keep Sails builders on the typed pipeline for IDL generation, Rust client generation, and integration wiring.
If a released contract evolves or a new deployed contract version is introduced, keep the generated-client path compatible with the approved cutover plan instead of assuming one regenerated client can replace all consumers immediately.
.idl as the source of truth for the interface.sails-js or sails-cli so the workspace gets lib.ts and typed program or service classes instead of hand-written payload code.GearApi from @gear-js/api for node connectivity.parseIdl from the sails-js and sails-js-parser path only when you explicitly need dynamic runtime control rather than pre-generated files.build.rs before inventing a manual IDL step.[build-dependencies] sails-rs = { version = "...", features = ["build"] }fn main() { sails_rs::build_client::<Program>(); }sails-idl-gen plus sails-client-gen-v2 wiring as a manual fallback for non-standard layouts or explicitly custom generation needs..idl and Rust client artifacts may land in OUT_DIR, the client crate output path, or another repo-defined location.BTreeMap key types: Public IDL-facing map keys should prefer primitive or tuple types (e.g. u64, (u32, u32), ActorId). Custom struct keys (e.g. BTreeMap<Pos, V>) may fail client-side decoding because the generated type may lack the required ordered-key traits. Stick to primitives or tuples unless generated-client support for that custom key type is confirmed..idl as the interface contract for one deployed program version.When a Sails program's IDL is consumed by a frontend in a separate workspace or repo:
OUT_DIR during Rust builds, it will not be available to the frontend at build time.See ../../references/sails-idl-client-pipeline.md for the canonical frontend export pattern.
../../references/sails-idl-v2-syntax.md — IDL v2 grammar, annotations, types, service/program declarations../../references/sails-header-wire-format.md — Sails Header layout, interface/entry ID derivation, wire examples../../references/sails-cheatsheet.md../../references/sails-idl-client-pipeline.md../../assets/task-plan-template.md../../references/contract-interface-evolution.mdbuild.rs or generation wiring when it no longer generates the expected artifactssails-js as a runtime target; it is the JavaScript client library used by generated and dynamic IDL-driven flows.sails-idl-gen + sails-client-gen-v2 as the default dedicated-client path when the repo can use sails-rs build helpers.development
Use when approved tasks require Rust code changes in a Sails ethexe workspace with the ethexe feature enabled. Do not use for standard Gear/Vara Sails apps without ethexe, or when the spec or architecture is still unsettled.
development
Use when a builder needs to design or review architecture for a Sails ethexe app with dual-transport, payable methods, Solidity interface generation, or Ethereum-style events. Do not use for standard Gear/Vara Sails apps without ethexe.
development
Use when a builder needs to design or debug calls from a standard Gear/Vara Sails program into runtime builtin actors such as BLS12-381, staking, proxy, or ETH bridge, including ActorId derivation, request encoding, reply decoding, and gas or ED budgeting. Do not use for regular program-to-program messaging, Vara.eth or ethexe-only work, non-Sails repositories, or runtime-maintenance tasks inside the Gear repo.
development
Use when a builder needs a read-side indexer and query API for a standard Gear/Vara Sails app using program events, IDL-driven decoding, projected read models, and optional on-chain query enrichment. Do not use for command-side backends, generic Node APIs, non-Sails repositories, Vara.eth or ethexe-first work.