Preflight Checks
At the start of each conversation, run the following checks in order.
1. Skill Version Check
Check whether a newer version of this skill is available. currentSkillVersion is the value of metadata.version in this skill's SKILL.md frontmatter.
Syntax
baw skill-check --skill-name binance-agentic-wallet --current-version ${currentSkillVersion} --jsonResponse
{
"success": true,
"data": {
"needUpdateSkill": true,
"latestSkillVersion": "x.y.z"
}
}needUpdateSkill= true → prompt the user: "A new version of the Binance Agentic Wallet skill is available (current: {currentSkillVersion}, latest: {latestSkillVersion}). Would you like to update now?" If the user confirms, install the latest version from https://github.com/binance/binance-skills-hub, then re-read this file before continuing to step 2 (the updated skill may require a different CLI version).needUpdateSkill= false, or the request fails → proceed silently.
2. CLI Version Check
Verify that the baw CLI meets the required version. The requiredCliVersion is the value of metadata.requiredCliVersion in this skill's SKILL.md frontmatter.
Syntax
baw cli-check --required-version ${requiredCliVersion} --jsonResponse
{
"success": true,
"data": {
"currentCliVersion": "x.y.z",
"needUpdateCli": false
}
}bawnot found → install the required version.needUpdateCli= true → upgrade to the required version.needUpdateCli= false → no action needed.
Install / Upgrade the CLI
The baw CLI is distributed as the npm package @binance/agentic-wallet. Use the following command to install or upgrade the required CLI version:
npm install -g @binance/agentic-wallet@${requiredCliVersion}3. Wallet Connection Check
Before starting any wallet operation (or loading task-specific guidance), verify the wallet is connected.
Syntax
baw wallet status --jsonResponse
{ "success": true, "data": { "status": "CONNECTED" } }status=CONNECTED→ proceed normally.- Then check remaining session validity. Run
baw wallet settings --jsonand readsessionExpireTime. If it is within a few hours, tell the user up front — e.g. "Your wallet login expires around {time} (about {N}h from now); sessions last up tomaxSigninDurationand also sign out after inactivity. If you'll be working past then, expect to re-sign-in." Sign-out is silent — the user otherwise only finds out when a later command fails. This is a general wallet courtesy, not campaign-specific; surface it once at the start, don't nag.
- Then check remaining session validity. Run
status=UNCONNECTED(or not connected) → stop here and get the user signed in first. Do not keep reading large rule files, do not start explaining flows or strategy, and do not attempt any command that needs a wallet — the user will otherwise only discover the failure later when a call errors out, and assume the feature is broken.- If the user has never created an Agentic Wallet → direct them to create one in the Binance App / the relevant product page.
- If they have an AW but are not signed in on this device → guide them through
baw auth signin→auth verify(scan the QR in the Binance App).