sails-idl-client
Skill17 starsChanged 7 months agoMITView on GitHub
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.
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 12 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Keep Sails builders on the typed pipeline for IDL generation, Rust client generation, and integration wiring.
- Distinctive: line 12
If a released contract evolves or a new deployed contract version is introduced, keep the generated-client path compatible with the …
- Very specific: line 16
Treat the program .idl as the source of truth for the interface.
- Very specific: line 19
Use parseIdl from the sails-js and sails-js-parser path only when you explicitly need dynamic runtime control rather than pre-generated …
- Very specific: line 23
Check the repo's build.rs before inventing a manual IDL step.
- Very specific: line 27
Treat direct sails-idl-gen plus sails-client-gen-v2 wiring as a manual fallback for non-standard layouts or explicitly custom generation …
- Very specific: line 28
Do not assume a single fixed output location.
- Very specific: line 36
Treat each .idl as the interface contract for one deployed program version.
- Distinctive: line 37
If a new deployed contract version changes the public surface, do not assume every consumer can switch at once.
- Distinctive: line 38
Keep old and new generated clients available during cutover when frontend, tests, scripts, or migration tooling still depend on the …
- Distinctive: line 43
When a Sails program's IDL is consumed by a frontend in a separate workspace or repo:
- Distinctive: line 45
Check in an IDL snapshot in the frontend project so the frontend toolchain can build independently.
- Distinctive: line 46
Document the refresh command: after regenerating the IDL from the Rust workspace, copy it to the frontend snapshot location and regenerate …
- Very specific: line 47
If the IDL is only generated in OUT_DIR during Rust builds, it will not be available to the frontend at build time.
- Very specific: line 62
Check build.rs or generation wiring when it no longer generates the expected artifacts
- Distinctive: line 64
Check output paths and artifact freshness before deeper debugging
- Distinctive: line 70
Keep generated artifacts aligned with the program contract before deeper debugging.
- Distinctive: line 71
Prefer generated client flows in tests and smoke runs when the workspace supports them.
- Very specific: line 72
Do not treat sails-js as a runtime target.
- Distinctive: line 73
Do not replace the standard path with raw ABI, ethers-style bindings, or hand-written SCALE payloads for a standard Vara Sails app.
- Distinctive: line 74
Do not treat missing codegen as a reason to bypass the Sails pipeline.
- Very specific: line 75
Do not document sails-idl-gen + sails-client-gen-v2 as the default dedicated-client path when the repo can use sails-rs build helpers.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sails IDL Client
Goal
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.
Default JS Or TS Path
- Treat the program
.idlas the source of truth for the interface. - Generate the normal client with
sails-jsorsails-cliso the workspace getslib.tsand typed program or service classes instead of hand-written payload code. - Pair the generated client with
GearApifrom@gear-js/apifor node connectivity. - Use
parseIdlfrom thesails-jsandsails-js-parserpath only when you explicitly need dynamic runtime control rather than pre-generated files.
Build Script Path
- Check the repo's
build.rsbefore inventing a manual IDL step. - For a dedicated Rust client crate, prefer the standard Sails build-helper path:
[build-dependencies] sails-rs = { version = "...", features = ["build"] }fn main() { sails_rs::build_client::<Program>(); }
- Treat direct
sails-idl-genplussails-client-gen-v2wiring as a manual fallback for non-standard layouts or explicitly custom generation needs. - Do not assume a single fixed output location. Depending on the repo, generated
.idland Rust client artifacts may land inOUT_DIR, the client crate output path, or another repo-defined location.
Generated Client Pitfalls
- Custom
BTreeMapkey 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.
Released Contract Evolution
- Treat each
.idlas the interface contract for one deployed program version. - If a new deployed contract version changes the public surface, do not assume every consumer can switch at once.
- Keep old and new generated clients available during cutover when frontend, tests, scripts, or migration tooling still depend on the previous version.
- Regenerate clients as part of release work, but do not treat regeneration alone as compatibility validation.
Frontend IDL Handoff
When a Sails program's IDL is consumed by a frontend in a separate workspace or repo:
- Check in an IDL snapshot in the frontend project so the frontend toolchain can build independently.
- Document the refresh command: after regenerating the IDL from the Rust workspace, copy it to the frontend snapshot location and regenerate the TypeScript client.
- If the IDL is only generated in
OUT_DIRduring 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.
Inputs
../../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.md
Route Here When
- Check
build.rsor generation wiring when it no longer generates the expected artifacts - the client crate drifted from program changes
- Check output paths and artifact freshness before deeper debugging
- tests are building raw payloads instead of using generated clients
- local smoke needs a typed client path
Guardrails
- Keep generated artifacts aligned with the program contract before deeper debugging.
- Prefer generated client flows in tests and smoke runs when the workspace supports them.
- Do not treat
sails-jsas a runtime target; it is the JavaScript client library used by generated and dynamic IDL-driven flows. - Do not replace the standard path with raw ABI, ethers-style bindings, or hand-written SCALE payloads for a standard Vara Sails app.
- Do not treat missing codegen as a reason to bypass the Sails pipeline.
- Do not document
sails-idl-gen+sails-client-gen-v2as the default dedicated-client path when the repo can usesails-rsbuild helpers.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- vara-skillsSkill
- vara-skillsSkill
- awesome-sails-vftSkill
- gear-architecture-plannerSkill
- gear-builtin-actorsSkill
- gear-gstd-api-mapSkill
- gear-message-executionSkill
- gtest-tdd-loopSkill
- idea-to-specSkill
- sails-architectureSkill
- sails-dev-envSkill
- sails-ethexe-architectureSkill
- sails-ethexe-implementerSkill
- sails-feature-workflowSkill
- sails-frontendSkill
- sails-gtestSkill
- sails-indexerSkill
- sails-local-smokeSkill
- sails-new-appSkill
- sails-program-evolutionSkill
- sails-rust-implementerSkill
- ship-sails-appSkill
- task-decomposerSkill
- vara-skills-upgradeSkill
- vara-walletSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

