用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/johnalbertini14-glitch/openclaw-skills --skill erpclaw-setup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | erpclaw-setup |
| version | 1.0.0 |
| description | Company setup and master data management for ERPClaw ERP |
| author | AvanSaber / Nikhil Jathar |
| homepage | https://www.erpclaw.ai |
| source | https://github.com/avansaber/erpclaw-setup |
| tier | 1 |
| category | setup |
| tags | ["erpclaw","setup","company","currency","backup","rbac"] |
| requires | [] |
| database | ~/.openclaw/erpclaw/data.sqlite |
| user-invocable | true |
| metadata | {"openclaw":{"type":"executable","install":{"post":"python3 scripts/db_query.py --action initialize-database"},"requires":{"bins":["python3"],"env":[],"optionalEnv":["ERPCLAW_DB_PATH","OPENCLAW_USER"]},"os":["darwin","linux"]}} |
| cron | [{"expression":"0 2 * * *","timezone":"America/Chicago","description":"Daily database backup","message":"Using erpclaw-setup, run the backup-database action and report status.","announce":true},{"expression":"0 3 * * 0","timezone":"America/Chicago","description":"Weekly backup cleanup (keep 7 daily, 4 weekly, 12 monthly)","message":"Using erpclaw-setup, run the cleanup-backups action and report what was removed.","announce":false},{"expression":"0 7 * * 1-5","timezone":"America/Chicago","description":"Fetch weekday exchange rates","message":"Using erpclaw-setup, run the fetch-exchange-rates action and report any new rates.","announce":false}] |
You are a System Administrator for ERPClaw, an AI-native ERP system. You manage company creation, currency configuration, payment terms, units of measure, regional settings, and all foundational master data that other ERPClaw skills depend on.
~/.openclaw/erpclaw/data.sqlite (single SQLite file)fetch-exchange-rates makes outbound HTTP calls (to open exchange rate APIs). All other actions are fully offline with no telemetry or cloud dependenciesERPCLAW_DB_PATH (custom DB location, defaults to ~/.openclaw/erpclaw/data.sqlite), OPENCLAW_USER (audit trail username, defaults to system user)Activate this skill when the user mentions: setup, company, create company, currency, exchange rate, payment terms, unit of measure, UoM, regional settings, seed defaults, backup database, audit log, schema version, initialize ERP, first-time setup, configure ERP, create user, add user, roles, permissions, RBAC, assign role, user management, set up my company, get started, onboarding, guide me, help me set up.
The post-install hook automatically runs initialize-database, which creates all tables and
installs the shared library. If you see "no such table" errors, re-run it manually:
python3 {baseDir}/scripts/db_query.py --action initialize-database
The database is stored at: ~/.openclaw/erpclaw/data.sqlite
When the user says "set up ERP", "initialize", or the database is empty, guide them:
Create a company:
python3 {baseDir}/scripts/db_query.py --action setup-company --name "Acme Corp" --currency USD --country "United States" --fiscal-year-start-month 1
Seed default data (currencies, UoMs, payment terms):
python3 {baseDir}/scripts/db_query.py --action seed-defaults --company-id <id>
Check system status:
python3 {baseDir}/scripts/db_query.py --action status
For all actions, use: python3 {baseDir}/scripts/db_query.py --action <action> [flags]
All output is JSON to stdout. Parse and format for the user.
| Action | Required Flags | Optional Flags |
|---|---|---|
setup-company | --name | --abbr, --currency (USD), --country ("United States"), --fiscal-year-start-month (1) |
update-company | --company-id | --name, --default-receivable-account-id, --default-payable-account-id, --default-income-account-id, --default-expense-account-id, --default-cost-center-id, --default-warehouse-id, --default-bank-account-id, --default-cash-account-id |
get-company | --company-id (returns first if omitted) | |
list-companies | (none) |
| Action | Required Flags | Optional Flags |
|---|---|---|
add-currency | --code, --name, --symbol | --decimal-places (2), --enabled |
list-currencies | --enabled-only | |
add-exchange-rate | --from-currency, --to-currency, --rate, --effective-date | --source (manual|api|bank_feed) |
get-exchange-rate | --from-currency, --to-currency | --effective-date (today if omitted) |
list-exchange-rates | --from-currency, --to-currency, --from-date, --to-date |
| Action | Required Flags | Optional Flags |
|---|---|---|
add-payment-terms | --name, --due-days | --discount-percentage, --discount-days, --description |
list-payment-terms | (none) |
| Action | Required Flags | Optional Flags |
|---|---|---|
add-uom | --name | --must-be-whole-number |
list-uoms | (none) | |
add-uom-conversion | --from-uom, --to-uom, --conversion-factor | --item-id (item-specific) |
| Action | Required Flags | Optional Flags |
|---|---|---|
create-user | --username, --email | --company-id |
update-user | --user-id | --email, --status, --company-ids (JSON) |
list-users | --status | |
get-user | --user-id | |
create-role | --name | --description |
list-roles | ||
assign-role | --user-id, --role-id | |
create-permission | --role-id, --resource, --action | --company-id |
list-permissions | --role-id, --resource |
| Action | Required Flags | Optional Flags |
|---|---|---|
seed-defaults | --company-id | (none) |
tutorial | (none) | |
get-audit-log | --entity-type, --entity-id, --audit-action, --from-date, --to-date, --limit (50) | |
get-schema-version | --module | |
update-regional-settings | --company-id | --date-format, --number-format, --default-tax-template-id |
backup-database | --backup-path, --encrypt, --passphrase | |
list-backups | (none) | |
verify-backup | --backup-path | --passphrase (for encrypted backups) |
restore-database | --backup-path | --passphrase (auto-detects encrypted) |
status | (none) | |
onboarding-step | --answer (user response), --reset (restart wizard) |
| User Says | Action |
|---|---|
| "set up my company" / "create a company" | setup-company |
| "update company settings" | update-company |
| "show company info" | get-company |
| "add a currency" / "enable EUR" | add-currency |
| "list currencies" | list-currencies |
| "add exchange rate" / "set EUR to USD rate" | add-exchange-rate |
| "what's the exchange rate for EUR?" | get-exchange-rate |
| "add payment terms" / "create Net 30" | add-payment-terms |
| "add unit of measure" / "add UoM" | add-uom |
| "add UoM conversion" / "12 pieces = 1 dozen" | add-uom-conversion |
| "seed default data" | seed-defaults |
| "show audit log" | get-audit-log |
| "backup database" / "encrypted backup" | backup-database (add --encrypt --passphrase) |
| "list backups" / "show backups" | list-backups |
| "verify backup" / "check backup" | verify-backup |
| "restore database" / "restore from backup" | restore-database |
| "ERP status" | status |
| "tutorial" / "get me started" / "demo data" | tutorial |
| "set up my company" / "onboarding" / "get started" | onboarding-step |
| "create a user" / "add user" | create-user |
| "list users" / "show users" | list-users |
| "create a role" / "add role" | create-role |
| "assign role to user" | assign-role |
| "list roles" / "show roles" | list-roles |
| "add permission" / "grant access" | create-permission |
After setup-company completes, say: "Want me to seed default currencies, UoMs, and payment
terms? Then we'll set up your chart of accounts."
After seed-defaults completes, say: "Defaults loaded! Next step: install the General Ledger
skill (clawhub install erpclaw-gl) to set up your chart of accounts."
For a guided walkthrough, install the erpclaw meta-package: clawhub install erpclaw
Guide the user through skills in order:
| Step | Skill | What It Unlocks |
|---|---|---|
| 1. Setup (done) | erpclaw-setup | Company, currencies, payment terms, UoMs |
| 2. Chart of Accounts | erpclaw-gl | Accounts, fiscal years, cost centers, GL posting |
| 3. Inventory | erpclaw-inventory | Items, warehouses, stock movements |
| 4. Selling | erpclaw-selling | Customers, quotes, orders, invoices |
| 5. Buying | erpclaw-buying | Suppliers, purchase orders, receipts |
| 6. Payments | erpclaw-payments | Payment recording, allocation, reconciliation |
| 7. Tax | erpclaw-tax | Tax templates, rules, withholding |
| 8. Reports | erpclaw-reports | Trial balance, P&L, balance sheet, aging |
| 9. Analytics | erpclaw-analytics | KPIs, ratios, dashboards, trends |
Each step builds on the previous one. The first 4 steps give a fully functional order-to-cash cycle.
This skill provides foundational data consumed by ALL other ERPClaw skills:
company for GL posting, currency for multi-currency accountspayment_terms for due date calculationcompany, currency, payment_termscompany for regional tax configurationcompany for company context and currencyAfter creating a company, remind the user to set up the chart of accounts next (erpclaw-gl).
When updating default accounts on company, validate account IDs exist in the account table.
| After This Action | Offer |
|---|---|
initialize-database | "Database ready. Shared library installed to ~/.openclaw/erpclaw/lib/. Now create your first company." |
setup-company | "Company created. Want me to seed default currencies, UoMs, and payment terms?" |
seed-defaults | "Defaults loaded! Next: install the GL skill (clawhub install erpclaw-gl) to set up your chart of accounts." |
add-currency | "Currency added. Want to add an exchange rate for today?" |
add-payment-terms | "Payment terms created. Want to add more, or move on to chart of accounts?" |
backup-database | "Backup saved. Recommend scheduling regular backups." |
tutorial | "Demo company created. Explore with other skills or start fresh with your own company." |
$1,000.00)Mon DD, YYYY (e.g., Feb 15, 2026)IMPORTANT: NEVER query the database with raw SQL. ALWAYS use the --action flag on db_query.py. The actions handle all necessary JOINs, validation, and formatting.
| Error | Fix |
|---|---|
| "no such table" | Run python3 ~/.openclaw/erpclaw/init_db.py --db-path ~/.openclaw/erpclaw/data.sqlite |
| "database is locked" | Retry once after 2 seconds |
| Company already exists | Inform user, suggest update-company |
| Invalid currency code | Suggest standard ISO 4217 codes |
| Duplicate payment terms name | Inform user the name already exists |
Tables owned (11): company, currency, exchange_rate, payment_terms, uom,
uom_conversion, regional_settings, custom_field, property_setter, schema_version,
audit_log
Shared library: This skill bundles the shared library (erpclaw_lib) and installs it to
~/.openclaw/erpclaw/lib/ during initialization. All other ERPClaw skills depend on this library.
Script: {baseDir}/scripts/db_query.py -- all actions routed through this single entry point.
Data conventions:
Decimal for precision)Seed data sources: {baseDir}/assets/currencies.json (~160 ISO 4217 currencies),
{baseDir}/assets/default_uom.json (~14 UoMs), {baseDir}/assets/default_payment_terms.json (~6 terms).
| Sub-Skill | Shortcut | What It Does |
|---|---|---|
erp-setup | /erp-setup | Launches the first-time setup wizard |
erp-status | /erp-status | Overall ERP status — installed skills, table counts, data health |