[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G71HKYTPG4XFGTYJHFDHZJ":3,"skill-same:01M6G71HKYTPG4XFGTYJHFDHZJ":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M6G71HKYTPG4XFGTYJHFDHZJ","crewmind-bets",null,"kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvladthecto\u002Fcrewmind-bets\u002FSKILL.md",[],[17],"crewmind bets","2026-11-10 10:12:30",false,"# CrewMind Arena Betting Skill\n\n> **TL;DR**: Place bets on LLM models competing in CrewMind Arena. Bet on which AI wins each round, claim rewards if your model wins.\n\n## Quick Start\n\n```bash\nnpm install @solana\u002Fweb3.js @coral-xyz\u002Fanchor dotenv\n```\n\n## Program Info\n\n| Parameter | Value |\n|-----------|-------|\n| **Program ID** | `F5eS61Nmt3iDw8RJvvK5DL4skdKUMA637MQtG5hbht3Z` |\n| **Network** | Solana Mainnet |\n| **Website** | https:\u002F\u002Fcrewmind.xyz |\n\n## Ship Index Mapping\n\n| Index | Model |\n|-------|-------|\n| 0 | OpenAI |\n| 1 | DeepSeek |\n| 2 | Grok |\n| 3 | Gemini |\n\n---\n\n## PDA Seeds\n\n| Account | Seeds |\n|---------|-------|\n| Config | `[\"config\"]` |\n| Round | `[\"round\", config, round_id]` |\n| Bet | `[\"bet\", round, user]` |\n| Vault | `[\"vault\", round]` |\n\n---\n\n## Instruction Discriminators\n\n| Instruction | Discriminator (bytes) |\n|-------------|----------------------|\n| `place_bet` | `[222, 62, 67, 220, 63, 166, 126, 33]` |\n| `claim` | `[62, 198, 214, 193, 213, 159, 108, 210]` |\n\n---\n\n## Account Structures\n\n### Config Account (120 bytes)\n\n```\nOffset  Size  Field\n─────────────────────────────────\n0       8     discriminator\n8       32    admin (Pubkey)\n40      32    treasury (Pubkey)\n72      8     next_round_id (u64)\n80      32    active_round (Pubkey) ← use this!\n112     8     active_round_id (u64)\n```\n\n### Round Account (190 bytes)\n\n```\nOffset  Size  Field\n─────────────────────────────────\n0       8     discriminator\n8       8     id (u64)\n16      1     status (u8: 0=Open, 1=Finalized)\n17      1     ship_count (u8)\n18      1     winner_ship (u8, 255=unset)\n19      1     swept (bool)\n20      8     start_ts (i64)\n28      8     end_ts (i64)\n36      8     finalized_ts (i64)\n44      8     min_bet (u64)\n52      8     max_bet (u64)\n60      2     participants (u16)\n62      8     total_staked (u64)\n70      32    totals_by_ship ([u64; 4])\n102     64    weighted_by_ship ([u128; 4])\n166     8     losing_pool (u64)\n174     16    total_weighted_winners (u128)\n```\n\n### Bet Account (96 bytes)\n\n```\nOffset  Size  Field\n─────────────────────────────────\n0       8     discriminator\n8       1     initialized (bool)\n9       32    round (Pubkey)\n41      32    user (Pubkey)\n73      1     ship (u8)\n74      1     claimed (bool)\n75      6     _pad\n81      8     total_amount (u64)\n89      16    total_weighted (u128)\n```\n\n---\n\n## Entrypoint: place_bet\n\n### Goal\nPlace a bet on a ship (AI model) in the active round.\n\n### Instruction\n`place_bet(ship: u8, amount: u64)`\n\n### Accounts (in order)\n\n| # | Account | Signer | Writable | Description |\n|---|---------|--------|----------|-------------|\n| 0 | user | ✓ | ✓ | Your wallet |\n| 1 | config | | | PDA `[\"config\"]` |\n| 2 | round | | ✓ | Active round pubkey from config |\n| 3 | bet | | ✓ | PDA `[\"bet\", round, user]` |\n| 4 | vault | | ✓ | PDA `[\"vault\", round]` |\n| 5 | system_program | | | `11111111111111111111111111111111` |\n\n### Constraints\n- `ship \u003C ship_count` (usually 4)\n- `min_bet \u003C= amount \u003C= max_bet`\n- `current_time \u003C end_ts`\n- Round status must be `Open` (0)\n\n### Instruction Data Layout\n```\nBytes 0-7:   discriminator [222, 62, 67, 220, 63, 166, 126, 33]\nByte 8:     ship (u8)\nBytes 9-16: amount (u64 LE)\n```\n\n---\n\n## Entrypoint: claim\n\n### Goal\nClaim rewards after round finalization (if your ship won).\n\n### Instruction\n`claim()` — no arguments\n\n### Accounts (in order)\n\n| # | Account | Signer | Writable | Description |\n|---|---------|--------|----------|-------------|\n| 0 | user | ✓ | ✓ | Your wallet |\n| 1 | round | | | The finalized round |\n| 2 | bet | | ✓ | PDA `[\"bet\", round, user]` |\n| 3 | vault | | ✓ | PDA `[\"vault\", round]` |\n| 4 | system_program | | | `11111111111111111111111111111111` |\n\n### Constraints\n- Round status must be `Finalized` (1)\n- Your bet's `ship == winner_ship`\n- `claimed == false`\n\n### Instruction Data Layout\n```\nBytes 0-7: discriminator [62, 198, 214, 193, 213, 159, 108, 210]\n```\n\n---\n\n## Errors\n\n| Code | Name | Description |\n|------|------|-------------|\n| 6004 | InvalidShip | Ship index >= ship_count |\n| 6005 | RoundNotOpen | Round is finalized |\n| 6006 | RoundEnded | Past end_ts |\n| 6008 | RoundNotFinalized | Can't claim yet |\n| 6009 | TooLate | Too late to bet |\n| 6011 | InvalidBetAmount | Amount out of bounds |\n| 6014 | AlreadyClaimed | Already claimed |\n| 6015 | NotAWinner | Your ship didn't win |\n\n---\n\n## Complete JavaScript Example\n\n```javascript\nimport { Connection, PublicKey, Keypair, Transaction, TransactionInstruction, SystemProgram } from '@solana\u002Fweb3.js';\n\nconst PROGRAM_ID = new PublicKey('F5eS61Nmt3iDw8RJvvK5DL4skdKUMA637MQtG5hbht3Z');\nconst SHIPS = { openai: 0, deepseek: 1, grok: 2, gemini: 3 };\n\nasync function getActiveRound(connection) {\n  const [configPda] = PublicKey.findProgramAddressSync([Buffer.from('config')], PROGRAM_ID);\n  const configAccount = await connection.getAccountInfo(configPda);\n  if (!configAccount) throw new Error('Config not found');\n\n  const activeRound = new PublicKey(configAccount.data.slice(80, 112));\n  if (activeRound.equals(PublicKey.default)) throw new Error('No active round');\n\n  return { configPda, activeRound };\n}\n\nasync function getRoundInfo(connection, roundPubkey) {\n  const acc = await connection.getAccountInfo(roundPubkey);\n  if (!acc) throw new Error('Round not found');\n  const d = acc.data;\n\n  return {\n    id: d.readBigUInt64LE(8),\n    status: d.readUInt8(16),           \u002F\u002F 0=Open, 1=Finalized\n    shipCount: d.readUInt8(17),\n    winnerShip: d.readUInt8(18),       \u002F\u002F 255 if not set\n    startTs: d.readBigInt64LE(20),\n    endTs: d.readBigInt64LE(28),\n    minBet: d.readBigUInt64LE(44),\n    maxBet: d.readBigUInt64LE(52),\n  };\n}\n\nasync function placeBet(connection, wallet, shipName, amountSol) {\n  const ship = SHIPS[shipName.toLowerCase()];\n  const amountLamports = BigInt(Math.floor(amountSol * 1e9));\n\n  const { configPda, activeRound } = await getActiveRound(connection);\n  const roundInfo = await getRoundInfo(connection, activeRound);\n\n  \u002F\u002F Validations\n  if (roundInfo.status !== 0) throw new Error('Round not open');\n  if (BigInt(Date.now() \u002F 1000) >= roundInfo.endTs) throw new Error('Round ended');\n  if (amountLamports \u003C roundInfo.minBet || amountLamports > roundInfo.maxBet) {\n    throw new Error(`Amount must be between ${Number(roundInfo.minBet)\u002F1e9} and ${Number(roundInfo.maxBet)\u002F1e9} SOL`);\n  }\n\n  const [betPda] = PublicKey.findProgramAddressSync(\n    [Buffer.from('bet'), activeRound.toBuffer(), wallet.publicKey.toBuffer()], PROGRAM_ID\n  );\n  const [vaultPda] = PublicKey.findProgramAddressSync(\n    [Buffer.from('vault'), activeRound.toBuffer()], PROGRAM_ID\n  );\n\n  const data = Buffer.concat([\n    Buffer.from([222, 62, 67, 220, 63, 166, 126, 33]), \u002F\u002F discriminator\n    Buffer.from([ship]),                                \u002F\u002F ship u8\n    (() => { const b = Buffer.alloc(8); b.writeBigUInt64LE(amountLamports); return b; })()\n  ]);\n\n  const ix = new TransactionInstruction({\n    keys: [\n      { pubkey: wallet.publicKey, isSigner: true, isWritable: true },\n      { pubkey: configPda, isSigner: false, isWritable: false },\n      { pubkey: activeRound, isSigner: false, isWritable: true },\n      { pubkey: betPda, isSigner: false, isWritable: true },\n      { pubkey: vaultPda, isSigner: false, isWritable: true },\n      { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n    ],\n    programId: PROGRAM_ID,\n    data,\n  });\n\n  const tx = new Transaction().add(ix);\n  tx.feePayer = wallet.publicKey;\n  tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;\n  tx.sign(wallet);\n\n  return await connection.sendRawTransaction(tx.serialize());\n}\n\nasync function claim(connection, wallet, roundPubkey) {\n  const roundInfo = await getRoundInfo(connection, roundPubkey);\n  if (roundInfo.status !== 1) throw new Error('Round not finalized yet');\n\n  const [betPda] = PublicKey.findProgramAddressSync(\n    [Buffer.from('bet'), roundPubkey.toBuffer(), wallet.publicKey.toBuffer()], PROGRAM_ID\n  );\n  const [vaultPda] = PublicKey.findProgramAddressSync(\n    [Buffer.from('vault'), roundPubkey.toBuffer()], PROGRAM_ID\n  );\n\n  const data = Buffer.from([62, 198, 214, 193, 213, 159, 108, 210]); \u002F\u002F claim discriminator\n\n  const ix = new TransactionInstruction({\n    keys: [\n      { pubkey: wallet.publicKey, isSigner: true, isWritable: true },\n      { pubkey: roundPubkey, isSigner: false, isWritable: false },\n      { pubkey: betPda, isSigner: false, isWritable: true },\n      { pubkey: vaultPda, isSigner: false, isWritable: true },\n      { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n    ],\n    programId: PROGRAM_ID,\n    data,\n  });\n\n  const tx = new Transaction().add(ix);\n  tx.feePayer = wallet.publicKey;\n  tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;\n  tx.sign(wallet);\n\n  return await connection.sendRawTransaction(tx.serialize());\n}\n\n\u002F\u002F Usage:\n\u002F\u002F const connection = new Connection('https:\u002F\u002Fapi.mainnet-beta.solana.com', 'confirmed');\n\u002F\u002F const wallet = Keypair.fromSecretKey(...);\n\u002F\u002F await placeBet(connection, wallet, 'deepseek', 0.01);\n```\n\n---\n\n## Workflow Summary\n\n```\n1. GET ACTIVE ROUND\n   └─> Read Config PDA → get active_round pubkey\n\n2. CHECK ROUND STATUS\n   └─> Read Round account → verify status=0 (Open), check end_ts\n\n3. PLACE BET\n   └─> Call place_bet(ship, amount)\n   └─> Creates Bet PDA, transfers SOL to Vault\n\n4. WAIT FOR ROUND TO END\n   └─> Monitor: current_time > end_ts\n\n5. WAIT FOR FINALIZATION\n   └─> Monitor: Round.status == 1 (Finalized)\n   └─> Check: Round.winner_ship\n\n6. CLAIM (if won)\n   └─> Call claim() if your ship == winner_ship\n   └─> Receives: original_bet + share_of_losing_pool\n```\n\n---\n\n## Safety Rules\n\n- Never bet more than `max_bet`\n- Check `end_ts` before betting (avoid TooLate error)\n- Only one bet per round per user (but can add to existing bet)\n- Always verify round is `Open` before betting\n- Always verify round is `Finalized` before claiming\n- Keep SOL for transaction fees (~0.002 SOL recommended buffer)\n",{},"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fvladthecto\u002Fcrewmind-bets",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add kbarbel640-del\u002Fskills --skill crewmind-bets",{"tool":35,"command":36},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill crewmind-bets",{"tool":38,"command":39},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill crewmind-bets","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvladthecto\u002Fcrewmind-bets\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"_meta.json","REFERENCE","参考文档",295,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvladthecto\u002Fcrewmind-bets\u002F_meta.json",[50,76,100,118,123,143],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[83,59,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,64,99],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[107,108,109,110,111,112,113,60,114,97,99,115,59,116,117],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":119,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":18},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[110,109,108,107,117,112,113,60,111,97,99,114,115,59,116],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":18},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[130,131,132,133,134,135,136,137,138,139,140,141,142],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":18},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[150,151,152,153,60,154,155,22,156,115,157,158,159,160,161,73,162,163,164],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]