Skip to main content
Developer Platform

Build on OpenClaw

ERPClaw is a modular skill suite on the OpenClaw platform. Every module is an independent skill with a Python script and a SKILL.md manifest, with its tests kept alongside the code.

Architecture

Six layers, top to bottom. Every request flows through the same path.

Layer 1

Telegram / WhatsApp / Discord / Web UI

Users interact through any messaging platform or the Webclaw browser dashboard. Natural language in, structured results out.

Layer 2

OpenClaw (AI Router)

The AI runtime reads SKILL.md manifests, maps user intent to skill actions, and formats JSON responses into human-readable output.

Layer 3

SKILL.md (Manifest)

A Markdown manifest with YAML frontmatter that describes the skill's name, version, actions, parameters, and tiers of detail for the agent.

Layer 4

ERPClaw OS

The self-improving engine. Constitutional framework, module generation, semantic correctness, and gap detection. Governs all changes to the system.

Layer 5

db_query.py --action {name}

A single Python script per skill. Every action is routed through the --action flag. Output is always JSON to stdout. PyPika query builder for DB portability.

Layer 6

SQLite or PostgreSQL

All modules share one database. SQLite (default) or PostgreSQL (enterprise). WAL mode, foreign keys enforced, PyPika abstraction layer for DB-agnostic queries.

Skill API Quick Reference

Every skill follows the same two-file pattern: a SKILL.md manifest and a db_query.py script.

1

SKILL.md Format

name: erpclaw-selling
version: "1.0.0"
description: Sales orders, invoices, delivery notes
author: AvanSaber Inc.
scripts:
  - name: db_query.py
    description: Sales management
    arguments:
      - name: action
        description: Action to execute
        required: true
actions:
  - name: add-customer
    description: Create a new customer
    tier: 1
  - name: list-customers
    description: List all customers
    tier: 1
2

Action Interface

# Every action follows the same pattern:
python3 db_query.py --action add-customer \
  --company-id "$COMPANY_ID" \
  --name "Acme Corp" \
  --customer-type company \
  --credit-limit 50000

# Output is always JSON:
{
  "customer_id": "abc-123-def",
  "name": "Acme Corp",
  "customer_type": "company",
  "status": "ok"
}
46
Modules
3,234
Actions
v4.15.0
Current release
Signed
Module registry

Database Schema

One schema in a single database. Every module has its own table namespace. SQLite (default) or PostgreSQL (enterprise).

Module
Core (setup, GL)
Financial (journals, payments, tax, reports)
Supply Chain (inventory, selling, buying)
Manufacturing
HR & Payroll
CRM & Support
Projects & Quality
Assets & Billing
AI & Analytics
All of it, one schema

One module holds the pen for each table

Any ERPClaw module can read any table in the shared database, but each table has exactly one module allowed to write to it. The rule is called read-many, write-one, and it decides how quickly a bug gets found and how far a bad one can travel.

Picture a document that eleven people can edit. When something in it is wrong, you open the version history and start guessing who changed what. Many business systems end up working like that document without anyone choosing it.

In ERPClaw, when a sales invoice is wrong, there is one owner to look at, not every module that might have touched it. A module that needs something changed elsewhere asks the owning module through its published actions instead of writing the rows itself, and ledger entries have a single writer: the shared posting engine, which checks every entry before it lands. Industry and add-on modules are held to this in code, not by convention: a validator reads each module's database statements and fails any module that writes directly to a table it does not own. That also contains the damage. A defect in an industry module cannot quietly rewrite the sales ledger, because it never had write access there.

The longer version: one writer per table. The rule is enforced alongside the other ERPClaw OS constitutional articles, and it drew more interest than we expected when we presented the architecture at IEEE IRI 2026 (the four questions from that talk).

Quick Start

From zero to a working skill in three steps.

1

Clone & Install

Clone the foundation, initialize the database, and load demo data.

git clone https://github.com/avansaber/erpclaw
cd erpclaw
python3 scripts/db_query.py --action initialize-database
python3 scripts/db_query.py --action seed-demo-data
2

Test

Run a module's tests to verify everything works.

cd scripts/erpclaw-selling && python3 -m pytest tests -v
3

Develop

Create your own skill following the standard two-file pattern.

# Create a new skill
mkdir my-skill && cd my-skill
# Add SKILL.md + scripts/db_query.py
# Follow the action pattern: --action my-action --param value

Ready to build?

Full source code, test suites, and documentation. Everything you need to extend ERPClaw or build your own OpenClaw skills. Prefer to drive it from the AI tools you already use? ERPClaw speaks MCP, built in.