Build on OpenClaw
ERPClaw is a modular skill suite on the OpenClaw platform. Every module is an independent skill with a Python script, a SKILL.md manifest, and full test coverage.
Architecture
Six layers, top to bottom. Every request flows through the same path.
Telegram / WhatsApp / Discord / Web UI
Users interact through any messaging platform or the Webclaw browser dashboard. Natural language in, structured results out.
OpenClaw (AI Router)
The AI runtime reads SKILL.md manifests, maps user intent to skill actions, and formats JSON responses into human-readable output.
SKILL.md (Manifest)
A declarative YAML file that describes the skill's name, version, actions, parameters, and progressive disclosure tiers.
ERPClaw OS
The self-improving engine. Constitutional framework (18 articles), module generation, semantic correctness, and gap detection. Governs all changes to the system.
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.
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.
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 Action Interface
# Every action follows the same pattern:
python db_query.py --action add-customer \
--customer_name "Acme Corp" \
--customer_group "Commercial" \
--credit_limit 50000
# Output is always JSON:
{
"customer_id": "abc-123-def",
"customer_name": "Acme Corp",
"naming_series": "CUST-2026-00001",
"status": "active"
} Database Schema
789 tables in a single database. Every module has its own table namespace. SQLite (default) or PostgreSQL (enterprise).
| Module | Tables | Description |
|---|---|---|
| Core (setup, GL) | 35 | Companies, users, accounts, GL entries, periods |
| Financial (journals, payments, tax, reports) | 28 | Journal entries, payment allocation, tax rules |
| Supply Chain (inventory, selling, buying) | 42 | Items, warehouses, stock ledger, SO/PO/invoices |
| Manufacturing | 12 | BOMs, work orders, job cards, MRP |
| HR & Payroll | 24 | Employees, leave, attendance, salary, expenses |
| CRM & Support | 16 | Leads, opportunities, campaigns, issues, SLAs |
| Projects & Quality | 14 | Projects, tasks, timesheets, inspections |
| Assets & Billing | 12 | Fixed assets, depreciation, subscriptions, metering |
| AI & Analytics | 7 | KPIs, anomalies, forecasts, scores |
| Total | 789 | Single database with WAL mode and 525 indexes (SQLite or PostgreSQL) |
Quick Start
From zero to a working skill in three steps.
Clone & Install
Clone the setup skill, initialize the database, and load demo data.
git clone https://github.com/avansaber/erpclaw-setup
cd erpclaw-setup
python scripts/db_query.py --action init-db
python scripts/db_query.py --action seed-demo-data Test
Run the test suite to verify everything works.
cd tests && pytest -v 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.