/vara-skills:sails-gtestfrom vara-skills
Guides the Sails-first gtest testing loop for Gear/Vara blockchain programs, covering generated clients, block progression, and common pitfalls like Rust edition capture rules and balance accounting.
Ships in vara-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the Sails-first test loop with generated clients and explicit gtest evidence before any live-node smoke step.
../../assets/gtest-report-template.md — report format for gtest results../../references/gtest-cheatsheet.md — quick reference for gtest APIs../../references/gtest-patterns.md — common test patterns../../references/sails-cheatsheet.md — Sails patterns and APIs../../references/sails-gtest-and-local-validation.md — full gtest and validation guide../../references/gear-gas-reservations-and-waitlist.md — gas reasoning for tests../../references/scale-binary-decoding-guide.md — decoding raw reply bytes../../references/sails-syscall-mapping.md — Syscall::* API for gas, message, and execution contextWrite the result to docs/plans/YYYY-MM-DD-<topic>-gtest.md.
GtestEnv instead of hand-built payloads where the workspace supports them.send_bytes* returns a MessageId, run_next_block returns the BlockRunResult, and the reply evidence lives in the block result.BlockRunMode and advance blocks explicitly when replies or deferred effects depend on progression.run_to_block when delayed work or timeout behavior spans multiple blocks.../sails-local-smoke/SKILL.md only after the suite is green.Rust 2024 listener lifetime: Under edition 2024 capture rules, chaining generated-client calls into listen() can fail with "temporary value dropped while borrowed". In Sails 1.0 the service client implements Listener directly, so bind the service client before listening:
let client = program.service_name();
let mut events = client.listen().await.unwrap();
Program balance accounting in gtest: The deployed program account has an existential deposit. Absolute balance assertions like == wager or == 0 will fail even when the contract accounting logic is correct. Capture the initial balance after deploy and assert deltas relative to that baseline:
let initial_balance = env.balance_of(program_id);
// ... perform actions ...
let final_balance = env.balance_of(program_id);
assert_eq!(final_balance - initial_balance, expected_delta);
Missing block advancement: Forgetting to call run_next_block after sending a message means the reply is never processed. Always advance at least one block after send operations that expect replies.
cargo test output without Sails-appropriate assertions as proof.gtest is still red.#[sails_type] for test-only types that mirror service types, ensuring encoding/decoding matches on-chain behavior exactly.What SKILL.md sets; muted values are Claude Code's defaults
24 skills in this plugin
/awesome-sails-vftUse when a builder wants to add a fungible token to a standard Gear/Vara Sails app using awesome-sails building blocks, choose the right VFT-related crates, and wire roles, events, tests, and client integration. Do not use for NFT or RMRK work, abstract tokenomics-only analysis, or non-Sails projects./gear-architecture-plannerUse when an approved Gear or Vara spec must be mapped onto program boundaries, services, message flow, and integration surfaces. Do not use when the feature is still undefined or when the task is already reduced to code edits./gear-builtin-actorsUse 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.npx claudepluginhub gear-foundation/vara-skills --plugin vara-skillsOther plugins' skills for the same job