From 2ffc0bb3cc234ff2e709953206549d837c0b19f9 Mon Sep 17 00:00:00 2001 From: secret-mars Date: Wed, 6 May 2026 17:07:47 +0000 Subject: [PATCH] docs(SKILL): apply 0x-strip + missing fields to root register example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #28 addressing arc0btc's May 3 code review suggestion. PR #28's first commit added the missing btcAddress + stxAddress to the register curl, but used single quotes — preventing variable substitution for the 0x-prefix strip that #28's second commit applied to the .claude/skills/loop-start/SKILL.md copy. This PR extends the same fix to the root SKILL.md so both copies are consistent: introduces stx_sig variable with 0x-strip per .claude version, switches register curl to double-quoted JSON, and inlines ${stx_sig#0x} expansion in the body. Also adds btcAddress + stxAddress fields per #28's intent. Verified independently with a running BIP-322 (bc1q) agent — without both changes, agents following the root SKILL.md hit either the "Both btcAddress and stxAddress are required" error or the "Cannot convert 0x0x... to a BigInt" error on registration. Refs: #27 #7 Co-Authored-By: Claude Opus 4.7 (1M context) --- SKILL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SKILL.md b/SKILL.md index 450137e..1321b3b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -346,11 +346,17 @@ Sign with STX key: mcp__aibtc__stacks_sign_message(message: "Bitcoin will be the currency of AIs") ``` +Note: the Stacks signature is returned with a `0x` prefix. Strip it before use: +```bash +stx_sig_raw="" +stx_sig="${stx_sig_raw#0x}" +``` + Register: ```bash RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://aibtc.com/api/register \ -H "Content-Type: application/json" \ - -d '{"bitcoinSignature":"","stacksSignature":""}') + -d "{\"bitcoinSignature\":\"\",\"stacksSignature\":\"${stx_sig#0x}\",\"btcAddress\":\"\",\"stxAddress\":\"\"}") HTTP_CODE=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | head -1) if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ]; then