Files
ClaudeCode-Custom-Skills/skills/claw-setup/SKILL.md
Claude Code 46ed77201c feat: Add Qwen OAuth cross-platform import for ALL Claw platforms
Key Feature: Use FREE Qwen tier (2,000 req/day) with ANY platform!

How it works:
1. Get Qwen OAuth: qwen && /auth (FREE)
2. Extract token from ~/.qwen/
3. Configure any platform with token

Supported platforms:
- OpenClaw 
- NanoBot 
- PicoClaw 
- ZeroClaw 
- NanoClaw 

Configuration:
  export OPENAI_API_KEY="$QWEN_TOKEN"
  export OPENAI_BASE_URL="https://api.qwen.ai/v1"
  export OPENAI_MODEL="qwen3-coder-plus"

Added:
- import-qwen-oauth.sh script for automation
- Cross-platform configuration examples
- Qwen API endpoints reference
- Troubleshooting guide

Free tier: 2,000 requests/day, 60 requests/minute

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:05:18 -05:00

10 KiB

name, description, version
name description version
claw-setup Use this skill when the user asks to "setup openclaw", "install nanobot", "deploy zeroclaw", "configure picoclaw", "setup qwen code", "import qwen oauth", "use free qwen tier", "AI agent setup", or mentions setting up AI platforms with free providers. 1.2.0

Claw Setup Skill

End-to-end professional setup of AI Agent platforms with cross-platform Qwen OAuth import - use the FREE Qwen tier with ANY Claw platform!

Key Feature: Qwen OAuth Import

Use Qwen's FREE tier (2,000 req/day) with ANY platform:

┌─────────────────────────────────────────────────────────────────┐
│              QWEN OAUTH CROSS-PLATFORM IMPORT                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│   Qwen Code CLI                Other Platforms                  │
│   ─────────────                ───────────────                  │
│                                                                 │
│   ┌─────────────┐              ┌─────────────┐                 │
│   │ qwen.ai     │              │ OpenClaw    │                 │
│   │ OAuth Login │──────┬──────►│ NanoBot     │                 │
│   │ FREE 2K/day │      │       │ PicoClaw    │                 │
│   └─────────────┘      │       │ ZeroClaw    │                 │
│          │             │       │ NanoClaw    │                 │
│          ▼             │       └─────────────┘                 │
│   ┌─────────────┐      │                                        │
│   │ ~/.qwen/    │      │   Export OAuth as OpenAI-compatible   │
│   │ OAuth Token │──────┘   API configuration                   │
│   └─────────────┘                                              │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Supported Platforms

Platform Language Memory Qwen OAuth Best For
Qwen Code TypeScript ~200MB Native Coding, FREE tier
OpenClaw TypeScript >1GB Importable Full-featured
NanoBot Python ~100MB Importable Research
PicoClaw Go <10MB Importable Embedded
ZeroClaw Rust <5MB Importable Performance
NanoClaw TypeScript ~50MB Importable WhatsApp

Step 1: Get Qwen OAuth Token (FREE)

Install Qwen Code

npm install -g @qwen-code/qwen-code@latest

Authenticate with FREE OAuth

qwen
# In Qwen Code session:
/auth
# Select "Qwen OAuth"
# Browser opens -> Sign in with qwen.ai account
# FREE: 2,000 requests/day, 60 req/min

Extract OAuth Token

# OAuth token is stored in:
ls -la ~/.qwen/

# View token file
cat ~/.qwen/settings.json

# Or find OAuth credentials
find ~/.qwen -name "*.json" -exec cat {} \;

Step 2: Configure Any Platform with Qwen

Method A: Use OAuth Token Directly

After authenticating with Qwen Code, extract and use the token:

# Token location (after /auth)
QWEN_TOKEN=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')

# Use with any OpenAI-compatible platform
export OPENAI_API_KEY="$QWEN_TOKEN"
export OPENAI_BASE_URL="https://api.qwen.ai/v1"  # Qwen API endpoint
export OPENAI_MODEL="qwen3-coder-plus"

Method B: Use Alibaba Cloud DashScope (Alternative)

If you have Alibaba Cloud API key (paid):

# For China users
export OPENAI_API_KEY="your-dashscope-api-key"
export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
export OPENAI_MODEL="qwen3-coder-plus"

# For International users
export OPENAI_BASE_URL="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"

# For US users
export OPENAI_BASE_URL="https://dashscope-us.aliyuncs.com/compatible-mode/v1"

Step 3: Platform-Specific Configuration

OpenClaw with Qwen OAuth

# Install OpenClaw
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install

# Configure with Qwen
export OPENAI_API_KEY="$QWEN_TOKEN"
export OPENAI_BASE_URL="https://api.qwen.ai/v1"
export OPENAI_MODEL="qwen3-coder-plus"

# Or in .env file
cat > .env << ENVEOF
OPENAI_API_KEY=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')
OPENAI_BASE_URL=https://api.qwen.ai/v1
OPENAI_MODEL=qwen3-coder-plus
ENVEOF

# Start OpenClaw
npm run start

NanoBot with Qwen OAuth

# Install NanoBot
pip install nanobot-ai

# Configure
mkdir -p ~/.nanobot
cat > ~/.nanobot/config.json << 'CONFIG'
{
  "providers": {
    "qwen": {
      "apiKey": "${QWEN_TOKEN}",
      "baseURL": "https://api.qwen.ai/v1"
    }
  },
  "agents": {
    "defaults": {
      "model": "qwen/qwen3-coder-plus"
    }
  }
}
CONFIG

# Export token and run
export QWEN_TOKEN=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')
nanobot gateway

PicoClaw with Qwen OAuth

# Install PicoClaw
wget https://github.com/sipeed/picoclaw/releases/latest/picoclaw-linux-amd64
chmod +x picoclaw-linux-amd64
sudo mv picoclaw-linux-amd64 /usr/local/bin/picoclaw

# Configure with environment variables
export OPENAI_API_KEY=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')
export OPENAI_BASE_URL="https://api.qwen.ai/v1"
export OPENAI_MODEL="qwen3-coder-plus"

# Run
picoclaw gateway

ZeroClaw with Qwen OAuth

# Install ZeroClaw
wget https://github.com/zeroclaw-labs/zeroclaw/releases/latest/zeroclaw-linux-amd64
chmod +x zeroclaw-linux-amd64
sudo mv zeroclaw-linux-amd64 /usr/local/bin/zeroclaw

# Configure
export OPENAI_API_KEY=$(cat ~/.qwen/oauth-token.json | jq -r '.access_token')
export OPENAI_PROVIDER="openai"
export OPENAI_MODEL="qwen3-coder-plus"

# Run
zeroclaw gateway

Automation Script: Import Qwen OAuth

#!/bin/bash
# import-qwen-oauth.sh - Import Qwen OAuth to any platform

set -e

echo "╔═══════════════════════════════════════════════════════════════╗"
echo "║         QWEN OAUTH CROSS-PLATFORM IMPORTER                   ║"
echo "╚═══════════════════════════════════════════════════════════════╝"

# Check if Qwen Code is authenticated
if [ ! -d ~/.qwen ]; then
    echo "❌ Qwen Code not authenticated. Run: qwen && /auth"
    exit 1
fi

# Find and extract token
TOKEN_FILE=$(find ~/.qwen -name "*.json" -type f | head -1)
if [ -z "$TOKEN_FILE" ]; then
    echo "❌ No OAuth token found in ~/.qwen/"
    exit 1
fi

# Extract access token
QWEN_TOKEN=$(cat "$TOKEN_FILE" | jq -r '.access_token // .token // .accessToken' 2>/dev/null)

if [ -z "$QWEN_TOKEN" ] || [ "$QWEN_TOKEN" = "null" ]; then
    echo "❌ Could not extract token from $TOKEN_FILE"
    echo "   Try re-authenticating: qwen && /auth"
    exit 1
fi

echo "✅ Found Qwen OAuth token"
echo ""

# Export for current session
export OPENAI_API_KEY="$QWEN_TOKEN"
export OPENAI_BASE_URL="https://api.qwen.ai/v1"
export OPENAI_MODEL="qwen3-coder-plus"

# Also save to .env for persistence
cat > ~/.qwen/.env << ENVEOF
OPENAI_API_KEY=$QWEN_TOKEN
OPENAI_BASE_URL=https://api.qwen.ai/v1
OPENAI_MODEL=qwen3-coder-plus
ENVEOF

echo "✅ Environment variables set:"
echo "   OPENAI_API_KEY=***${QWEN_TOKEN: -8}"
echo "   OPENAI_BASE_URL=https://api.qwen.ai/v1"
echo "   OPENAI_MODEL=qwen3-coder-plus"
echo ""
echo "✅ Saved to ~/.qwen/.env for persistence"
echo ""
echo "Usage for other platforms:"
echo "   source ~/.qwen/.env && openclaw"
echo "   source ~/.qwen/.env && nanobot gateway"
echo "   source ~/.qwen/.env && picoclaw gateway"
echo "   source ~/.qwen/.env && zeroclaw gateway"

Qwen API Endpoints

Endpoint Region Type Use Case
https://api.qwen.ai/v1 Global OAuth FREE tier with OAuth token
https://dashscope.aliyuncs.com/compatible-mode/v1 China API Key Alibaba Cloud paid
https://dashscope-intl.aliyuncs.com/compatible-mode/v1 International API Key Alibaba Cloud paid
https://dashscope-us.aliyuncs.com/compatible-mode/v1 US API Key Alibaba Cloud paid
https://api-inference.modelscope.cn/v1 China API Key ModelScope (free tier)

Qwen Models Available

Model Context Best For
qwen3-coder-plus 128K General coding (recommended)
qwen3-coder-next 128K Latest features
qwen3.5-plus 128K General purpose
Qwen/Qwen3-Coder-480B-A35B-Instruct 128K ModelScope

Usage Examples

"Setup OpenClaw with Qwen OAuth free tier"
"Import Qwen OAuth to NanoBot"
"Configure PicoClaw with free Qwen3-Coder"
"Use Qwen free tier with ZeroClaw"

Troubleshooting

Token Not Found

# Re-authenticate with Qwen Code
qwen
/auth  # Select Qwen OAuth

# Check token location
ls -la ~/.qwen/
find ~/.qwen -name "*.json"

Token Expired

# Tokens auto-refresh in Qwen Code
# Just run any command in qwen to refresh
qwen -p "hello"

# Then re-export
source ~/.qwen/.env

API Errors

# Verify token is valid
curl -H "Authorization: Bearer $OPENAI_API_KEY" \
     https://api.qwen.ai/v1/models

# Check rate limits (FREE tier: 60 req/min, 2000/day)

25+ Other AI Providers

See full list in README.md - Anthropic, OpenAI, Google, xAI, Mistral, Groq, Cerebras, etc.