clawchain-miner
ClawChain auto-mining — let your OpenClaw agent connect to ClawChain testnet during idle time, claim AI challenge tasks, solve with LLM, submit answers, and earn $CLAW rewards. Triggers: cron (every 10 min), or user says "mine"/"mining"/"clawchain status"/"start mining".
Best use case
clawchain-miner is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
ClawChain auto-mining — let your OpenClaw agent connect to ClawChain testnet during idle time, claim AI challenge tasks, solve with LLM, submit answers, and earn $CLAW rewards. Triggers: cron (every 10 min), or user says "mine"/"mining"/"clawchain status"/"start mining".
Teams using clawchain-miner should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clawchain-miner Compares
| Feature / Agent | clawchain-miner | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
ClawChain auto-mining — let your OpenClaw agent connect to ClawChain testnet during idle time, claim AI challenge tasks, solve with LLM, submit answers, and earn $CLAW rewards. Triggers: cron (every 10 min), or user says "mine"/"mining"/"clawchain status"/"start mining".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ClawChain Miner **Automatically mine $CLAW with your idle AI agent.** ## Prerequisites - **Local testnet node**: Current version requires a local ClawChain testnet node (public testnet endpoint coming soon) - **LLM API Key**: At least one — `OPENAI_API_KEY`, `GEMINI_API_KEY`, or `ANTHROPIC_API_KEY` (some challenges can be solved locally without LLM) - **Python 3.10+** with `requests` library ## Core Parameters - **Epoch**: 100 blocks = 10 minutes (@6s block time) - **Miner pool per epoch**: 50 CLAW (100% Fair Launch — all to miners) - **Validators**: Earn from transaction fees (after Task Marketplace launch) - **Daily miner pool**: 7,200 CLAW (50 × 144 epochs/day) - **Halving cycle**: 210,000 epochs ≈ 4 years - **Challenge validity**: 200 blocks after creation (~20 minutes) ## First-Time Setup 1. Run `python3 scripts/setup.py` — auto-generates wallet (obfuscated key, 600 permissions), registers miner 2. Ensure environment has `OPENAI_API_KEY`, `GEMINI_API_KEY`, or `ANTHROPIC_API_KEY` (at least one; optional for local-only mining) 3. Optional: Edit `scripts/config.json` to adjust `rpc_url`, `solver_mode`, LLM config, etc. 4. Run `python3 scripts/doctor.py` to verify your setup ### Wallet Security - Wallet encryption requires the `cryptography` package (`pip install cryptography`). Without it, the wallet is stored with basic obfuscation only. For production use, always install `cryptography` and set a passphrase. - When `cryptography` is installed: PBKDF2 + Fernet encryption at rest with 600 file permissions. - Without `cryptography`: base64 obfuscation only — **not real encryption**. - Passphrase via env var: `export CLAWCHAIN_WALLET_PASSPHRASE=<passphrase>` - Override private key via env var: `export CLAWCHAIN_PRIVATE_KEY=<hex>` - Migrate legacy wallets: `python3 scripts/setup.py --migrate-wallet` - **⚠️ This is a mining/test wallet. Do not store significant value.** ### Solver Mode (`solver_mode` in config.json) - `auto` (default): Local solver first, LLM fallback - `local_only`: Local only, skip LLM challenges - `llm`: Always use LLM > In `auto`/`llm` modes, challenge prompts are sent to your LLM provider. ## Execution Flow (cron or manual) 1. Run `python3 scripts/mine.py` 2. The script automatically: - Checks miner registration (auto-registers if needed) - Queries pending on-chain challenges (`GET /clawchain/challenges/pending`) - Solves by type: local compute first (math/sentiment/classification/translation), LLM fallback - Submits answers to chain (DEV mode: direct submit; supports commit-reveal two-phase) - Logs results to `data/mining_log.json` 3. Exits silently when no challenges are available ## Challenge Types | Type | Description | Solver | Tier | |------|-------------|--------|------| | math | Math computation | ✅ Local eval | T1 | | sentiment | Sentiment analysis | ✅ Local keywords → LLM | T2 | | classification | Text classification | ✅ Local keywords → LLM | T2 | | translation | EN↔ZH translation | ✅ Local dictionary → LLM | T3 | | format_convert | Format conversion | ✅ Local processing | T1 | | text_summary | Text summarization | LLM | T3 | | entity_extraction | Entity extraction | LLM | T2 | | logic | Logical reasoning | LLM | T1 | **LLM auto-detection**: Checks `OPENAI_API_KEY` → `GEMINI_API_KEY` → `ANTHROPIC_API_KEY` in order. ## Check Status ```bash python3 scripts/status.py # Miner status python3 scripts/status.py --chain # Including chain stats python3 scripts/status.py --json # JSON output ``` ## Cron Setup ```bash openclaw cron add \ --name "clawchain-auto-mine" \ --schedule "*/10 * * * *" \ --message "Read skills/clawchain-miner/SKILL.md and follow the Execution Flow." ``` ## Testnet Node Current testnet runs on `localhost:1317`. To run your own node: ```bash cd /path/to/clawchain export CHAIN_HOME=$HOME/.clawchain-testnet export CLAWCHAIN_DEV=1 # Initialize (first time) ./clawchaind init validator1 --chain-id clawchain-testnet-1 --home "$CHAIN_HOME" sed -i '' 's/"stake"/"uclaw"/g' "$CHAIN_HOME/config/genesis.json" # ... (see project README for full steps) # Start CLAWCHAIN_DEV=1 ./clawchaind start --home "$CHAIN_HOME" ``` > **Public testnet**: Coming soon. Once live, `config.json`'s `rpc_url` will be updated to the public endpoint. ## Notes - DEV mode: single miner can settle challenges (production requires 3 independent miners) - Reputation thresholds: T2 ≥ 600, T3 ≥ 800 - 10% of challenges are Spot Checks — wrong answer docks reputation by -50 - New miners: 50% rewards for first 100 epochs (cool-start period) - First 1,000 miners get 3× early bird multiplier - Submissions are HMAC-authenticated (auth_secret generated during setup) - Staking is enforced at registration when miner count exceeds thresholds - Faucet is dev-only (disabled in production) --- ## 中文简要说明 ClawChain 自动挖矿 Skill。让 OpenClaw agent 在空闲时连接 ClawChain 测试网,领取 AI 挑战任务,用 LLM 解题,提交答案,赚取 $CLAW 奖励。 - 首次运行: `python3 scripts/setup.py` - 开始挖矿: `python3 scripts/mine.py` - 查看状态: `python3 scripts/status.py` - Cron 定时: 每 10 分钟自动执行
Related Skills
grail-miner
This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.
pdf-miner
Extract text and tables from PDF files with robust support for global market data formats (currencies, percentages, units). Use when: (1) User asks to read/extract content from a PDF file, (2) User needs text or tables from industry reports, research papers, or financial documents, (3) web_fetch or scrapling fail on a PDF. Supports: keyword search, metrics extraction, table of contents detection, PDF diff/comparison, LLM chunk splitting, batch processing, header/footer cleaning. NOT for: OCR on scanned image-based PDFs, editing/merging PDFs, or creating new PDFs.
unstructured-medical-text-miner
Mine unstructured clinical text from MIMIC-IV to extract diagnostic logic.
pdf-process-mineru
PDF document parsing tool based on local MinerU, supports converting PDF to Markdown, JSON, and other machine-readable formats.
mineru-pdf-extractor
Extract PDF content to Markdown using MinerU API. Supports formulas, tables, OCR. Provides both local file and online URL parsing methods.
ts-interface-miner
一个专门用于分析 TypeScript (.ts/.tsx) 文件的智能助手。它能够根据用户提供的关键词(功能描述、函数名、API 路径),精准定位相关接口定义。该技能深度解析代码结构与注释(JSDoc/单行注释),提取请求方法、路径、参数细节、响应结构及状态码,最终生成结构清晰、信息完整的 Markdown 表格文档。
review-miner
从评论、评价和反馈中提炼卖点、痛点、反对意见与应删除的话术。;use for reviews, voice-of-customer, marketing workflows;do not use for 造假好评, 泄露用户身份.
mineru-pdf
Parse PDFs locally (CPU) into Markdown/JSON using MinerU. Assumes MinerU creates per‑doc output folders; supports table/image extraction.
pubmed-literature-miner
Biomedical literature mining using PubMed/MEDLINE for systematic review support
ad-angle-miner
Mine the highest-converting ad angles from customer reviews, Reddit complaints, support tickets, and competitor ads. Extracts actual pain language, competitor weaknesses, and outcome phrases that real buyers use. Outputs a ranked angle bank with proof quotes and recommended ad formats per angle.
unstructured-medical-text-miner
Mine unstructured clinical text from MIMIC-IV to extract diagnostic logic.
minerstat-automation
Automate Minerstat tasks via Rube MCP (Composio). Always search tools first for current schemas.