[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-d417d31f-0588-46cd-a926-ecc021fafaa4":3,"$fs8wICVwtnZaT6I_HPKrSMSCxICi1eAyoNVUsfXp6kdU":42},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":33},"d417d31f-0588-46cd-a926-ecc021fafaa4","blockrun","BlockRun与Claude Code和Google Antigravity合作。","cat_coding_backend","mod_coding","sickn33,coding","---\nname: blockrun\ndescription: \"BlockRun works with Claude Code and Google Antigravity.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# BlockRun\n\n**BlockRun works with Claude Code and Google Antigravity.**\n\nYou can't generate images. You have no real-time X\u002FTwitter access. BlockRun gives you these capabilities.\n\n## Philosophy\n\nYou have a wallet. When you need a capability you lack, you pay for it autonomously.\n\n| You Need | You Call | Pricing |\n|----------|----------|---------|\n| Image generation | DALL-E | $0.04\u002Fimage |\n| Real-time X data | Grok + Live Search | $0.025\u002Fsource |\n| Second opinion | GPT-5.2 | $1.75\u002FM input, $14\u002FM output |\n| Cheaper processing | DeepSeek | $0.14\u002FM input, $0.28\u002FM output |\n\n**How it works:** BlockRun uses x402 micropayments to route your requests to OpenAI, xAI, Google, and other providers. No API keys needed - your wallet pays per token.\n\n## Budget Control (Optional)\n\nIf the user specifies a budget (e.g., \"use at most $1\"), track spending and stop when budget is reached:\n\n```python\nfrom blockrun_llm import setup_agent_wallet\n\nclient = setup_agent_wallet()\nbudget = 1.0  # User's budget\n\n# Before each call, check if within budget\nspending = client.get_spending()\nif spending['total_usd'] >= budget:\n    print(f\"Budget reached: ${spending['total_usd']:.4f} spent\")\n    # Stop making calls\nelse:\n    response = client.chat(\"openai\u002Fgpt-5.2\", \"Hello!\")\n\n# At the end, report spending\nspending = client.get_spending()\nprint(f\"💰 Total spent: ${spending['total_usd']:.4f} across {spending['calls']} calls\")\n```\n\n## When to Use\n| Trigger | Your Action |\n|---------|-------------|\n| User explicitly requests (\"blockrun second opinion with GPT on...\", \"use grok to check...\", \"generate image with dall-e\") | Execute via BlockRun |\n| User needs something you can't do (images, live X data) | Suggest BlockRun, wait for confirmation |\n| You can handle the task fine | Do it yourself, don't mention BlockRun |\n\n## Example User Prompts\n\nUsers will say things like:\n\n| User Says | What You Do |\n|-----------|-------------|\n| \"blockrun generate an image of a sunset\" | Call DALL-E via ImageClient |\n| \"use grok to check what's trending on X\" | Call Grok with `search=True` |\n| \"blockrun GPT review this code\" | Call GPT-5.2 via LLMClient |\n| \"what's the latest news about AI agents?\" | Suggest Grok (you lack real-time data) |\n| \"generate a logo for my startup\" | Suggest DALL-E (you can't generate images) |\n| \"blockrun check my balance\" | Show wallet balance via `get_balance()` |\n| \"blockrun deepseek summarize this file\" | Call DeepSeek for cost savings |\n\n## Wallet & Balance\n\nUse `setup_agent_wallet()` to auto-create a wallet and get a client. This shows the QR code and welcome message on first use.\n\n**Initialize client (always start with this):**\n```python\nfrom blockrun_llm import setup_agent_wallet\n\nclient = setup_agent_wallet()  # Auto-creates wallet, shows QR if new\n```\n\n**Check balance (when user asks \"show balance\", \"check wallet\", etc.):**\n```python\nbalance = client.get_balance()  # On-chain USDC balance\nprint(f\"Balance: ${balance:.2f} USDC\")\nprint(f\"Wallet: {client.get_wallet_address()}\")\n```\n\n**Show QR code for funding:**\n```python\nfrom blockrun_llm import generate_wallet_qr_ascii, get_wallet_address\n\n# ASCII QR for terminal display\nprint(generate_wallet_qr_ascii(get_wallet_address()))\n```\n\n## SDK Usage\n\n**Prerequisite:** Install the SDK with `pip install blockrun-llm`\n\n### Basic Chat\n```python\nfrom blockrun_llm import setup_agent_wallet\n\nclient = setup_agent_wallet()  # Auto-creates wallet if needed\nresponse = client.chat(\"openai\u002Fgpt-5.2\", \"What is 2+2?\")\nprint(response)\n\n# Check spending\nspending = client.get_spending()\nprint(f\"Spent ${spending['total_usd']:.4f}\")\n```\n\n### Real-time X\u002FTwitter Search (xAI Live Search)\n\n**IMPORTANT:** For real-time X\u002FTwitter data, you MUST enable Live Search with `search=True` or `search_parameters`.\n\n```python\nfrom blockrun_llm import setup_agent_wallet\n\nclient = setup_agent_wallet()\n\n# Simple: Enable live search with search=True\nresponse = client.chat(\n    \"xai\u002Fgrok-3\",\n    \"What are the latest posts from @blockrunai on X?\",\n    search=True  # Enables real-time X\u002FTwitter search\n)\nprint(response)\n```\n\n### Advanced X Search with Filters\n\n```python\nfrom blockrun_llm import setup_agent_wallet\n\nclient = setup_agent_wallet()\n\nresponse = client.chat(\n    \"xai\u002Fgrok-3\",\n    \"Analyze @blockrunai's recent content and engagement\",\n    search_parameters={\n        \"mode\": \"on\",\n        \"sources\": [\n            {\n                \"type\": \"x\",\n                \"included_x_handles\": [\"blockrunai\"],\n                \"post_favorite_count\": 5\n            }\n        ],\n        \"max_search_results\": 20,\n        \"return_citations\": True\n    }\n)\nprint(response)\n```\n\n### Image Generation\n```python\nfrom blockrun_llm import ImageClient\n\nclient = ImageClient()\nresult = client.generate(\"A cute cat wearing a space helmet\")\nprint(result.data[0].url)\n```\n\n## xAI Live Search Reference\n\nLive Search is xAI's real-time data API. Cost: **$0.025 per source** (default 10 sources = ~$0.26).\n\nTo reduce costs, set `max_search_results` to a lower value:\n```python\n# Only use 5 sources (~$0.13)\nresponse = client.chat(\"xai\u002Fgrok-3\", \"What's trending?\",\n    search_parameters={\"mode\": \"on\", \"max_search_results\": 5})\n```\n\n### Search Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `mode` | string | \"auto\" | \"off\", \"auto\", or \"on\" |\n| `sources` | array | web,news,x | Data sources to query |\n| `return_citations` | bool | true | Include source URLs |\n| `from_date` | string | - | Start date (YYYY-MM-DD) |\n| `to_date` | string | - | End date (YYYY-MM-DD) |\n| `max_search_results` | int | 10 | Max sources to return (customize to control cost) |\n\n### Source Types\n\n**X\u002FTwitter Source:**\n```python\n{\n    \"type\": \"x\",\n    \"included_x_handles\": [\"handle1\", \"handle2\"],  # Max 10\n    \"excluded_x_handles\": [\"spam_account\"],        # Max 10\n    \"post_favorite_count\": 100,  # Min likes threshold\n    \"post_view_count\": 1000      # Min views threshold\n}\n```\n\n**Web Source:**\n```python\n{\n    \"type\": \"web\",\n    \"country\": \"US\",  # ISO alpha-2 code\n    \"allowed_websites\": [\"example.com\"],  # Max 5\n    \"safe_search\": True\n}\n```\n\n**News Source:**\n```python\n{\n    \"type\": \"news\",\n    \"country\": \"US\",\n    \"excluded_websites\": [\"tabloid.com\"]  # Max 5\n}\n```\n\n## Available Models\n\n| Model | Best For | Pricing |\n|-------|----------|---------|\n| `openai\u002Fgpt-5.2` | Second opinions, code review, general | $1.75\u002FM in, $14\u002FM out |\n| `openai\u002Fgpt-5-mini` | Cost-optimized reasoning | $0.30\u002FM in, $1.20\u002FM out |\n| `openai\u002Fo4-mini` | Latest efficient reasoning | $1.10\u002FM in, $4.40\u002FM out |\n| `openai\u002Fo3` | Advanced reasoning, complex problems | $10\u002FM in, $40\u002FM out |\n| `xai\u002Fgrok-3` | Real-time X\u002FTwitter data | $3\u002FM + $0.025\u002Fsource |\n| `deepseek\u002Fdeepseek-chat` | Simple tasks, bulk processing | $0.14\u002FM in, $0.28\u002FM out |\n| `google\u002Fgemini-2.5-flash` | Very long documents, fast | $0.15\u002FM in, $0.60\u002FM out |\n| `openai\u002Fdall-e-3` | Photorealistic images | $0.04\u002Fimage |\n| `google\u002Fnano-banana` | Fast, artistic images | $0.01\u002Fimage |\n\n*M = million tokens. Actual cost depends on your prompt and response length.*\n\n## Cost Reference\n\nAll LLM costs are per million tokens (M = 1,000,000 tokens).\n\n| Model | Input | Output |\n|-------|-------|--------|\n| GPT-5.2 | $1.75\u002FM | $14.00\u002FM |\n| GPT-5-mini | $0.30\u002FM | $1.20\u002FM |\n| Grok-3 (no search) | $3.00\u002FM | $15.00\u002FM |\n| DeepSeek | $0.14\u002FM | $0.28\u002FM |\n\n| Fixed Cost Actions | |\n|-------|--------|\n| Grok Live Search | $0.025\u002Fsource (default 10 = $0.25) |\n| DALL-E image | $0.04\u002Fimage |\n| Nano Banana image | $0.01\u002Fimage |\n\n**Typical costs:** A 500-word prompt (~750 tokens) to GPT-5.2 costs ~$0.001 input. A 1000-word response (~1500 tokens) costs ~$0.02 output.\n\n## Setup & Funding\n\n**Wallet location:** `$HOME\u002F.blockrun\u002F.session` (e.g., `\u002FUsers\u002Fusername\u002F.blockrun\u002F.session`)\n\n**First-time setup:**\n1. Wallet auto-creates when `setup_agent_wallet()` is called\n2. Check wallet and balance:\n```python\nfrom blockrun_llm import setup_agent_wallet\nclient = setup_agent_wallet()\nprint(f\"Wallet: {client.get_wallet_address()}\")\nprint(f\"Balance: ${client.get_balance():.2f} USDC\")\n```\n3. Fund wallet with $1-5 USDC on Base network\n\n**Show QR code for funding (ASCII for terminal):**\n```python\nfrom blockrun_llm import generate_wallet_qr_ascii, get_wallet_address\nprint(generate_wallet_qr_ascii(get_wallet_address()))\n```\n\n## Troubleshooting\n\n**\"Grok says it has no real-time access\"**\n→ You forgot to enable Live Search. Add `search=True`:\n```python\nresponse = client.chat(\"xai\u002Fgrok-3\", \"What's trending?\", search=True)\n```\n\n**Module not found**\n→ Install the SDK: `pip install blockrun-llm`\n\n## Updates\n\n```bash\npip install --upgrade blockrun-llm\n```\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,163,1486,"2026-05-16 13:08:56",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":25,"skillCount":32,"createdAt":26},"后端开发","backend","mdi-server","API、数据库、服务端架构",296,[34],{"id":35,"skillId":4,"version":36,"fileName":37,"fileSize":38,"filePath":39,"fileHash":40,"manifest":41,"createdAt":19},"7b77aea1-1f0f-48ad-97e5-8ea5c91b220e","1.0.0","blockrun.zip",3591,"uploads\u002Fskills\u002Fd417d31f-0588-46cd-a926-ecc021fafaa4\u002Fblockrun.zip","6c0c22b568376ba355ef384e6d1935e8a751a0644a7c4560719ecb2367c7c789","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":9139}]",{"code":43,"message":44,"data":45},200,"success",{"items":46,"stats":47,"page":50},[],{"averageRating":48,"totalRatings":48,"ratingCounts":49},0,[48,48,48,48,48],{"limit":51,"offset":48,"hasMore":52,"nextOffset":51,"ratedOnly":16},15,false]