Communitygithub.com

BlockRun 技能註冊表

BlockRun 可與 Claude Code 和 Google Antigravity 協同運作。

BlockRun 技能註冊表 是什麼?

這項技能名為 BlockRun,它為 AI 代理(如 Claude Code)提供了一種自主支付和路由系統,用於存取其本身不具備的外部能力,例如即時 X/Twitter 資料、圖片生成或進階語言模型。其核心運作原理是 x402 微支付,代理可從其錢包中直接支付給 OpenAI、xAI、Google 等提供者,無需管理 API 金鑰。SKILL.md 文件詳細說明了如何使用 `blockrun-llm` Python SDK 來建立錢包、發送聊天請求、進行即時 X 搜尋、生成圖片,並提供預算控制和成本監控功能。此外,它也作為技能註冊表,方便使用者搜尋和安裝其他技能,並提供使用觸發條件(例如當用戶明確要求使用 BlockRun 或需要代理無法處理的能力時)的決策指引。

相容平台✓Claude Code✓Codex CLI~Cursor✓Antigravity✓Gemini CLI
npx skills add https://github.com/majiayu000/claude-skill-registry/tree/HEAD/skills/ai-llm/blockrun-galacticvraj-vraj-portfolio

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

BlockRun

BlockRun 可與 Claude Code 和 Google Antigravity 協同運作。

你無法生成圖片。你無法即時存取 X/Twitter。BlockRun 為你提供這些能力。

理念

你擁有一個錢包。當你需要某項你缺乏的能力時,你可以自主為其付費。

你需要的功能你呼叫的服務定價
圖片生成DALL-E$0.04/張圖片
即時 X 資料Grok + 即時搜尋$0.025/資料來源
第二意見GPT-5.2$1.75/百萬輸入,$14/百萬輸出
較便宜的處理DeepSeek$0.14/百萬輸入,$0.28/百萬輸出

運作原理: BlockRun 使用 x402 微支付將你的請求路由到 OpenAI、xAI、Google 及其他提供者。無需 API 金鑰——你的錢包會按 token 付費。

預算控制(可選)

如果用戶指定了預算(例如「最多使用 $1」),請追蹤花費並在達到預算時停止:

from blockrun_llm import setup_agent_wallet

client = setup_agent_wallet()
budget = 1.0  # 用戶的預算

# 每次呼叫前,檢查是否在預算內
spending = client.get_spending()
if spending['total_usd'] >= budget:
    print(f"已達到預算:花費 ${spending['total_usd']:.4f}")
    # 停止進行呼叫
else:
    response = client.chat("openai/gpt-5.2", "Hello!")

# 最後,報告花費
spending = client.get_spending()
print(f"💰 總花費:${spending['total_usd']:.4f},共 {spending['calls']} 次呼叫")

使用時機

觸發條件你的行動
用戶明確要求(「blockrun 用 GPT 給第二意見...」、「用 grok 檢查...」、「用 dall-e 生成圖片」)透過 BlockRun 執行
用戶需要你無法做到的事情(圖片、即時 X 資料)建議使用 BlockRun,等待確認
你可以順利處理此任務自己完成,不要提及 BlockRun

範例用戶提示

用戶可能會說:

用戶說你做什麼
"blockrun 生成一張夕陽圖片"透過 ImageClient 呼叫 DALL-E
"用 grok 檢查 X 上有什麼趨勢"使用 search=True 呼叫 Grok
"blockrun GPT 審查這段程式碼"透過 LLMClient 呼叫 GPT-5.2
"關於 AI 代理的最新消息是什麼?"建議使用 Grok(你缺乏即時資料)
"為我的新創公司生成一個標誌"建議使用 DALL-E(你無法生成圖片)
"blockrun 檢查我的餘額"透過 get_balance() 顯示錢包餘額
"blockrun deepseek 總結這個檔案"為了節省成本呼叫 DeepSeek

錢包與餘額

使用 setup_agent_wallet() 來自動建立錢包並取得客戶端。首次使用時會顯示 QR 碼和歡迎訊息。

初始化客戶端(始終從此開始):

from blockrun_llm import setup_agent_wallet

client = setup_agent_wallet()  # 自動建立錢包,如果是新的則顯示 QR 碼

檢查餘額(當用戶說「顯示餘額」、「檢查錢包」等時):

balance = client.get_balance()  # 鏈上 USDC 餘額
print(f"餘額:${balance:.2f} USDC")
print(f"錢包:{client.get_wallet_address()}")

顯示用於充值資金的 QR 碼:

from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address

# 用於終端機顯示的 ASCII QR 碼
print(generate_wallet_qr_ascii(get_wallet_address()))

SDK 使用方式

先決條件: 使用 pip install blockrun-llm 安裝 SDK

基本聊天

from blockrun_llm import setup_agent_wallet

client = setup_agent_wallet()  # 自動建立錢包(若需要)
response = client.chat("openai/gpt-5.2", "What is 2+2?")
print(response)

# 檢查花費
spending = client.get_spending()
print(f"花費 ${spending['total_usd']:.4f}")

即時 X/Twitter 搜尋(xAI Live Search)

重要: 若要取得即時 X/Twitter 資料,你必須使用 search=True 或 search_parameters 啟用 Live Search。

from blockrun_llm import setup_agent_wallet

client = setup_agent_wallet()

# 簡單:使用 search=True 啟用即時搜尋
response = client.chat(
    "xai/grok-3",
    "What are the latest posts from @blockrunai on X?",
    search=True  # 啟用即時 X/Twitter 搜尋
)
print(response)

進階 X 搜尋(含篩選條件)

from blockrun_llm import setup_agent_wallet

client = setup_agent_wallet()

response = client.chat(
    "xai/grok-3",
    "Analyze @blockrunai's recent content and engagement",
    search_parameters={
        "mode": "on",
        "sources": [
            {
                "type": "x",
                "included_x_handles": ["blockrunai"],
                "post_favorite_count": 5
            }
        ],
        "max_search_results": 20,
        "return_citations": True
    }
)
print(response)

圖片生成

from blockrun_llm import ImageClient

client = ImageClient()
result = client.generate("A cute cat wearing a space helmet")
print(result.data[0].url)

xAI Live Search 參考資料

Live Search 是 xAI 的即時資料 API。費用:每個資料來源 $0.025(預設 10 個來源約需 $0.26)。

若要降低成本,請將 max_search_results 設為較低的值:

# 僅使用 5 個來源(約 $0.13)
response = client.chat("xai/grok-3", "What's trending?",
    search_parameters={"mode": "on", "max_search_results": 5})

搜尋參數

參數類型預設值說明
modestring"auto""off"、"auto" 或 "on"
sourcesarrayweb,news,x要查詢的資料來源
return_citationsbooltrue包含來源 URL
from_datestring-開始日期 (YYYY-MM-DD)
to_datestring-結束日期 (YYYY-MM-DD)
max_search_resultsint10要回傳的最大來源數(自訂以控制成本)

來源類型

X/Twitter 來源:

{
    "type": "x",
    "included_x_handles": ["handle1", "handle2"],  # 最多 10 個
    "excluded_x_handles": ["spam_account"],        # 最多 10 個
    "post_favorite_count": 100,  # 最低愛心數門檻
    "post_view_count": 1000      # 最低觀看數門檻
}

網頁來源:

{
    "type": "web",
    "country": "US",  # ISO alpha-2 國家代碼
    "allowed_websites": ["example.com"],  # 最多 5 個
    "safe_search": True
}

新聞來源:

{
    "type": "news",
    "country": "US",
    "excluded_websites": ["tabloid.com"]  # 最多 5 個
}

可用模型

模型最佳用途定價
openai/gpt-5.2第二意見、程式碼審查、一般用途$1.75/百萬輸入,$14/百萬輸出
openai/gpt-5-mini成本最佳化推理$0.30/百萬輸入,$1.20/百萬輸出
openai/o4-mini最新高效推理$1.10/百萬輸入,$4.40/百萬輸出
openai/o3進階推理、複雜問題$10/百萬輸入,$40/百萬輸出
xai/grok-3即時 X/Twitter 資料$3/百萬 + $0.025/資料來源
deepseek/deepseek-chat簡單任務、批次處理$0.14/百萬輸入,$0.28/百萬輸出
google/gemini-2.5-flash非常長的文件、快速$0.15/百萬輸入,$0.60/百萬輸出
openai/dall-e-3逼真圖片$0.04/張圖片
google/nano-banana快速、藝術風格圖片$0.01/張圖片

M = 百萬 tokens。實際成本取決於你的提示詞和回覆長度。

成本參考

所有 LLM 成本以每百萬 tokens 計(M = 1,000,000 tokens)。

模型輸入輸出
GPT-5.2$1.75/M$14.00/M
GPT-5-mini$0.30/M$1.20/M
Grok-3(無搜尋)$3.00/M$15.00/M
DeepSeek$0.14/M$0.28/M
固定成本動作
Grok Live Search$0.025/資料來源(預設 10 個 = $0.25)
DALL-E 圖片$0.04/張圖片
Nano Banana 圖片$0.01/張圖片

典型成本: 一個 500 字的提示詞(約 750 tokens)給 GPT-5.2 的輸入成本約為 $0.001。一個 1000 字的回覆(約 1500 tokens)的輸出成本約為 $0.02。

設定與資金存入

錢包位置: $HOME/.blockrun/.session(例如 /Users/username/.blockrun/.session)

首次設定:

  1. 呼叫 setup_agent_wallet() 時會自動建立錢包
  2. 檢查錢包和餘額:
from blockrun_llm import setup_agent_wallet
client = setup_agent_wallet()
print(f"錢包:{client.get_wallet_address()}")
print(f"餘額:${client.get_balance():.2f} USDC")
  1. 在 Base 網路上存入 $1-5 USDC 到錢包

顯示用於充值資金的 QR 碼(用於終端機的 ASCII 碼):

from blockrun_llm import generate_wallet_qr_ascii, get_wallet_address
print(generate_wallet_qr_ascii(get_wallet_address()))

故障排除

「Grok 說它沒有即時存取權限」 → 你忘記啟用 Live Search。加上 search=True:

response = client.chat("xai/grok-3", "What's trending?", search=True)

找不到模組 → 安裝 SDK:pip install blockrun-llm

更新

pip install --upgrade blockrun-llm

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

majiayu000/claude-skill-registry

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry

CRITICAL: Use for MolyKit AI chat toolkit. Triggers on: BotClient, OpenAI, SSE streaming, AI chat, molykit, PlatformSend, spawn(), ThreadToken, cross-platform async, Chat widget, Messages, PromptInput, Avatar, LLM

majiayu000/claude-skill-registry

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Conduct domain and industry research. Use when the user says "lets create a research report on [domain or industry]

majiayu000/claude-skill-registry

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相關技能