@wowok/skills 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/skills",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "WoWok AI Skills for Claude and other AI assistants - Helping AI use WoWok MCP tools correctly",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,6 +24,28 @@ Canonical reference for all 13 MCP tools. Covers patterns, constraints, and desi
24
24
 
25
25
  ---
26
26
 
27
+ ## 🔴 Gas and Faucet
28
+
29
+ On-chain operations require gas. Transactions will fail if the account has insufficient balance.
30
+
31
+ ### For AI Assistant
32
+
33
+ When assisting users with WoWok operations:
34
+
35
+ - After a user creates a new account, proactively call `account_operation` → `faucet` to claim test tokens on their behalf
36
+ - Before starting any on-chain workflow, check balance via `query_toolkit` → `account_balance`
37
+ - If balance is below 1 WOW, automatically request faucet without asking the user
38
+ - If a transaction fails due to gas, retry after claiming more tokens
39
+
40
+ ### Tool Reference
41
+
42
+ - **Claim tokens**: `account_operation` → `faucet` (not `onchain_operations`)
43
+ - **Check balance**: `query_toolkit` → `account_balance`
44
+
45
+ Each faucet claim provides approximately 5 WOW, sufficient for dozens of transactions.
46
+
47
+ ---
48
+
27
49
  ## Core Rules
28
50
 
29
51
  ### Structural Wrapper Rules
@@ -162,10 +184,52 @@ Discover? → schema_query / wowok_buildin_info / onchain_events
162
184
 
163
185
  ---
164
186
 
187
+ ## Examples Reference
188
+
189
+ The deployment package includes 5 complete examples in the `examples/` directory. These serve as reference implementations to help explain concepts and demonstrate patterns to users.
190
+
191
+ ### Matching User Intent to Examples
192
+
193
+ When a user describes their needs, reference the appropriate example to illustrate the approach:
194
+
195
+ | User Intent | Example | Complexity | Key Techniques Demonstrated |
196
+ |-------------|---------|------------|----------------------------|
197
+ | Simple service with time-lock | Insurance | ⭐ Low | Two-node workflow, convert_witness, time-lock Guard |
198
+ | E-commerce store setup | MyShop | ⭐⭐ Medium | Four-node workflow, Permission indexes, Messenger integration, discounts |
199
+ | Complex multi-path order flow | MyShop_Advanced | ⭐⭐⭐ High | 11+ nodes, dual-signature (threshold=2), Merkle Root verification, Reward pool |
200
+ | Weather/data validation service | Travel | ⭐⭐⭐ High | Repository queries, convert_number_address, supply chain sub-orders |
201
+ | Signature/authorization service | ThreeBody_Signature | ⭐ Low | Buy Guard for access control, Machine-Service binding |
202
+
203
+ ### Finding Examples by Technique
204
+
205
+ When explaining a specific technique to users, reference where it appears:
206
+
207
+ | Technique | Example | Location |
208
+ |-----------|---------|----------|
209
+ | convert_witness: 100 (Order to Progress) | Insurance, Travel | Insurance Step 2 |
210
+ | Repository data query Guard | Travel | Step 3.1 |
211
+ | Dual-signature (threshold=2) | MyShop_Advanced | Lost/Return nodes |
212
+ | Reward pool with Guard verification | MyShop_Advanced | reward_wonderful_v2 Guards |
213
+ | Buy Guard (restricting purchasers) | ThreeBody_Signature | Step 2 |
214
+ | Discount coupons | MyShop | Step 8 |
215
+ | Arbitration with voting_guard | MyShop_Advanced | Step 9 |
216
+ | Time-lock Guard | Insurance, Travel | Step 2 / Step 3.2 |
217
+
218
+ ### How to Use Examples with Users
219
+
220
+ 1. **Assess complexity** — Match user requirements to the appropriate complexity level
221
+ 2. **Reference the example** — Show users the relevant example path and explain which techniques it demonstrates
222
+ 3. **Extract patterns** — Use JSON snippets from examples as templates to help users understand the structure
223
+ 4. **Reference test results** — Each example includes `*_TestResults.md` with real testnet execution results for troubleshooting
224
+
225
+ ---
226
+
165
227
  ## Common Pitfalls
166
228
 
167
229
  | Trap | Fix |
168
230
  |------|-----|
231
+ | **Transaction fails, gas error** | → [Pre-Flight: Gas & Faucet](#-pre-flight-gas--faucet前置必读). AI should auto-check balance + faucet. |
232
+ | **Don't know how to build a service** | → [Examples Reference](#examples-reference内置示例导航). Match user intent → example, extract JSON templates. |
169
233
  | `gen_passport` called as standalone tool | It's not — use `onchain_operations` with `operation_type: "gen_passport"` |
170
234
  | Missing `data` wrapper | Only `gen_passport` omits it; `payment`/`personal` omit `submission` |
171
235
  | String `object` passed expecting CREATE | String = existing (MODIFY), Object = new (CREATE) → [safety §1.1](../wowok-safety/SKILL.md) |