ZeroRules for Openclaw

An AI agent skill that intercepts deterministic tasks like math and time queries locally to eliminate unnecessary LLM token costs.

deeqyaqub1-cmd
v1.0.3
Feb 12, 2026
2
1.8k
1

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install zero-rules

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install zero-rules using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ZeroRules?

ZeroRules is a high-efficiency utility for developers looking to optimize their Openclaw Skills implementations. It provides a local execution engine that intercepts common, predictable requests—such as mathematical calculations, timezone lookups, and file listings—before they reach the language model. By resolving these deterministic queries on your local machine using Node.js, it significantly reduces latency and slashes token expenditure by 50-70%.

This skill is an essential addition for users of Openclaw Skills who want to build more cost-effective agentic workflows. Unlike traditional model routing which merely shifts queries to cheaper LLMs, ZeroRules bypasses the model entirely for tasks that don't require creative reasoning, providing instant results at zero cost while maintaining a local-first security posture.

ZeroRules Use Cases

  • Performing arithmetic, percentage calculations, or unit conversions without calling an API.
  • Checking current times or converting time zones for international cities instantly.
  • Converting currencies using live exchange rates with local fallback support.
  • Listing directory contents and local file structures without sharing paths with the LLM.
  • Calculating dates, identifying days of the week, or tracking time until specific calendar events.

How ZeroRules Works

  1. The AI agent receives a user query and evaluates it against specific patterns like math or time queries.
  2. The agent executes the local rules.js script via Node.js, passing the user message as a command-line argument.
  3. The ZeroRules engine analyzes the input; if a deterministic rule matches, it returns a structured JSON response containing the result.
  4. The agent delivers the result directly to the user, skipping the LLM call and displaying a token savings badge.
  5. If the script returns no match, the agent proceeds to process the query through the LLM as normal.

ZeroRules Setup

To integrate ZeroRules into your Openclaw Skills setup, ensure you have Node.js installed and follow these steps:

  1. Place the rules.js script in your skill's base directory.
  2. Verify the installation by checking the session status:
node {baseDir}/rules.js --status
  1. Test the interception logic with a sample query:
node {baseDir}/rules.js "What is 15% of 200?"
  1. Configure your agent to prioritize this script for math, time, and file operations.

ZeroRules Data Schema & Taxonomy

ZeroRules manages its operations through structured JSON outputs and a lightweight local session file to track performance metrics.

Component Description
Response JSON Contains matched (boolean), rule (type), result (string), and saved_tokens_est (integer).
Session Storage ~/.zerorules-session.json stores aggregate token savings and match history without logging user queries.
Currency Data Uses a 3-second timeout for live API calls, falling back to static local rates if offline.
File Schema Uses fs.readdirSync for secure, read-only directory listings with path traversal protection.

ZeroRules Advanced Features

  • Real-time savings badge integrated into responses to visualize the value of using Openclaw Skills extensions.
  • Built-in slash commands like /zero-rules or /zr for checking session-wide cost and token savings.
  • Pro tier support for custom regex-based rules, allowing users to define their own deterministic interceptors.
  • Privacy-centric architecture that keeps file listings and local calculations 100% offline.
  • Automated session tracking that generates cost-saving summaries for long-running agent interactions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins node
Github Stars: 0
forks: 0

Featured*