跳到正文
cccskills
免费在 GitHub 公开

freeride

Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates openclaw.json. Use when the user mentions free AI, OpenRouter, model switching, rate limits, or wants to reduce AI costs.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(8)

  • SKILL.md4.4 KB
  • .gitignore31 B
  • main.py34.4 KB
  • README.md10.8 KB
  • requirements.txt16 B
  • setup.py674 B
  • skill.json1.3 KB
  • watcher.py5.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

FreeRide - Free AI for OpenClaw

What This Skill Does

Configures OpenClaw to use free AI models from OpenRouter. Sets the best free model as primary, adds ranked fallbacks so rate limits don't interrupt the user, and preserves existing config.

Prerequisites

Before running any FreeRide command, ensure:

  1. OPENROUTER_API_KEY is set. Check with echo $OPENROUTER_API_KEY. If empty, the user must get a free key at https://openrouter.ai/keys and set it:

    export OPENROUTER_API_KEY="sk-or-v1-..."
    # Or persist it:
    openclaw config set env.OPENROUTER_API_KEY "sk-or-v1-..."
    
  2. The freeride CLI is installed. Check with which freeride. If not found:

    cd ~/.openclaw/workspace/skills/free-ride
    pip install -e .
    

Primary Workflow

When the user wants free AI, run these steps in order:

# Step 1: Configure best free model + fallbacks
freeride auto

# Step 2: Restart gateway so OpenClaw picks up the changes
openclaw gateway restart

That's it. The user now has free AI with automatic fallback switching.

Verify by telling the user to send /status to check the active model.

Commands Reference

CommandWhen to use it
freeride autoUser wants free AI set up (most common)
freeride auto -fUser wants fallbacks but wants to keep their current primary model
freeride auto -c 10User wants more fallbacks (default is 5)
freeride listUser wants to see available free models
freeride list -n 30User wants to see all free models
freeride switch <model>User wants a specific model (e.g. freeride switch qwen3-coder)
freeride switch <model> -fAdd specific model as fallback only
freeride statusCheck current FreeRide configuration
freeride fallbacksUpdate only the fallback models
freeride refreshForce refresh the cached model list
freeride rotateUser is rate-limited / fallback chain is dead — live-test and rebuild

After any command that changes config, always run openclaw gateway restart.

What It Writes to Config

FreeRide updates only these keys in ~/.openclaw/openclaw.json:

  • agents.defaults.model.primary — e.g. openrouter/qwen/qwen3-coder:free
  • agents.defaults.model.fallbacks — e.g. ["openrouter/free", "nvidia/nemotron:free", ...]
  • agents.defaults.models — allowlist so /model command shows the free models

Everything else (gateway, channels, plugins, env, customInstructions, named agents) is preserved.

The first fallback is always openrouter/free — OpenRouter's smart router that auto-picks the best available model based on the request.

Watcher (Background Daemon)

For autonomous recovery from a "whole chain is rate-limited" deadlock — which the agent can't fix by itself, since calling freeride rotate requires inference and inference is exactly what's failing — the user can run a slim background daemon:

# Foreground
freeride-watcher

# Persistent background
nohup freeride-watcher > ~/.openclaw/freeride-watcher.log 2>&1 &

# One-shot check (no loop)
freeride-watcher --once

# State / history
freeride-watcher --status

The daemon probes the current primary every 60s; if it fails, it rebuilds the chain with live-verified models. Recommend this whenever the user is leaving an unattended OpenClaw setup running.

Troubleshooting

ProblemFix
freeride: command not foundcd ~/.openclaw/workspace/skills/free-ride && pip install -e .
OPENROUTER_API_KEY not setUser needs a key from https://openrouter.ai/keys
Changes not taking effectopenclaw gateway restart then /new for fresh session
Agent shows 0 tokensCheck freeride status — primary should be openrouter/<provider>/<model>:free

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

报告此技能的问题