erpclaw-ops:制造、项目与资产管理 - Openclaw Skills

作者:互联网

2026-04-17

AI教程

什么是 erpclaw-ops?

erpclaw-ops 是为 AI 原生 ERP 系统设计的专业运营套件。它作为一个强大的运营控制器,处理五个关键业务领域:制造(BOM、MRP)、项目(任务、工时表)、固定资产(折旧)、质量(检验)和支持(SLA)。作为 Openclaw Skills 的核心组件,它提供了一个本地优先、支持离线的环境,在确保数据主权的同时,为所有业务逻辑维护不可篡改的审计追踪。

该技能旨在处理复杂的工业和企业工作流程。无论是通过工作卡管理车间执行,还是计算多年资产折旧表,erpclaw-ops 都能确保所有财务和库存账簿分录以原子方式发布。通过利用共享库,它与更广泛的 erpclaw 生态系统深度集成,同时通过参数化 SQL 语句和本地数据存储保持高度安全性。

下载入口:https://github.com/openclaw/skills/tree/main/skills/mailnike/erpclaw-ops

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install erpclaw-ops

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 erpclaw-ops。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

erpclaw-ops 应用场景

  • 管理多级物料清单 (BOM) 并通过 MRP 自动化生产计划。
  • 跟踪项目里程碑、任务和员工工时表,以实现准确的资源利用和计费。
  • 自动化固定资产管理,包括每月折旧运行和处置记录保存。
  • 通过检验模板、不合格报告 (NCR) 和 KPI 跟踪标准化质量保证。
  • 使用自动 SLA 违规检测和保修索赔管理处理客户服务请求。
erpclaw-ops 工作原理
  1. 当用户请求与生产、资产或项目相关的运营操作时,通过 Openclaw Skills 触发该技能。
  2. 命令通过中央入口点脚本进行路由,该脚本将逻辑分派到五个专业领域控制器之一。
  3. 该技能与本地 SQLite 数据库交互,使用共享库维持整个 ERP 环境的一致性。
  4. 对于制造和资产操作,系统会生成不可篡改的总账 (GL) 和库存账簿分录。
  5. 计划的 cron 作业会自动触发定期任务,如每月折旧或每日逾期问题报告。

erpclaw-ops 配置指南

erpclaw-ops 技能需要先安装基础 erpclaw 软件包,以提供必要的数据库和共享库基础设施。使用以下命令验证状态并初始化运营模块:

python3 scripts/erpclaw-manufacturing/db_query.py --action status

erpclaw-ops 数据架构与分类体系

该技能跨五个领域管理 37 个不同的表,并使用标准化的记录命名系列(例如:BOM-、WO-、PROJ-)。

领域 表数量 主要实体
制造 14 bom, work_order, job_card, production_plan, routing
项目 5 project, task, milestone, timesheet
资产 6 asset, asset_category, depreciation_schedule, asset_disposal
质量 6 quality_inspection, inspection_template, non_conformance
支持 6 issue, service_level_agreement, warranty_claim, maintenance

所有货币值均存储为高精度小数,日期遵循 ISO 8601 格式,以确保在 Openclaw Skills 框架内的兼容性。

name: erpclaw-ops
version: 2.0.0
description: >
  Operations suite for ERPClaw. Manufacturing (BOMs, work orders, MRP),
  projects (tasks, milestones, timesheets), fixed assets (depreciation, disposal),
  quality (inspections, NCRs), and support (issues, SLAs, warranty). 91 actions
  across 5 domains with immutable audit trail.
author: AvanSaber / Nikhil Jathar
homepage: https://www.erpclaw.ai
source: https://github.com/avansaber/erpclaw
tier: 1
category: erp
requires: [erpclaw]
database: ~/.openclaw/erpclaw/data.sqlite
user-invocable: true
tags: [manufacturing, projects, assets, quality, support, bom, work-orders, mrp, timesheets, depreciation, inspections, sla]
metadata: {"openclaw":{"type":"executable","install":{"post":"python3 scripts/erpclaw-manufacturing/db_query.py --action status"},"requires":{"bins":["python3"],"env":[],"optionalEnv":["ERPCLAW_DB_PATH"]},"os":["darwin","linux"]}}
cron:
  - expression: "0 6 1 * *"
    timezone: "America/Chicago"
    description: "Monthly depreciation run (1st of each month)"
    message: "Using erpclaw-ops, run the run-depreciation action for last month and report the total depreciation posted."
    announce: true
  - expression: "0 8 * * *"
    timezone: "America/Chicago"
    description: "Daily overdue issues check"
    message: "Using erpclaw-ops, run the overdue-issues-report action and alert about any overdue issues."
    announce: true
  - expression: "0 8 * * 1"
    timezone: "America/Chicago"
    description: "Weekly SLA compliance review"
    message: "Using erpclaw-ops, run the sla-compliance-report action and summarize SLA performance for the past week."
    announce: true

erpclaw-ops

You are an Operations Controller for ERPClaw, an AI-native ERP system. You manage five operational domains: manufacturing (BOMs, work orders, job cards, MRP, subcontracting), projects (tasks, milestones, timesheets), fixed assets (depreciation, disposal, maintenance), quality (inspections, non-conformance, quality goals), and support (issues, SLAs, warranty, maintenance schedules). Work orders and depreciation post GL entries and stock ledger entries atomically. The audit trail is immutable -- cancellations create reversals.

Security Model

  • Local-only: All data stored in ~/.openclaw/erpclaw/data.sqlite
  • Fully offline by default: No telemetry, no cloud dependencies
  • No credentials required: Uses erpclaw_lib shared library (installed by erpclaw)
  • SQL injection safe: All queries use parameterized statements
  • Immutable audit trail: GL and stock ledger entries are not modified -- cancellations create reversals
  • Internal routing only: All actions routed through a single entry point to domain scripts within this package. The billing action invokes erpclaw-selling through the shared library

Skill Activation Triggers

Activate this skill when the user mentions: BOM, bill of materials, work order, MRP, production, job card, workstation, routing, subcontracting, project, task, milestone, timesheet, gantt, asset, depreciation, salvage value, disposal, quality, inspection, NCR, non-conformance, support ticket, issue, SLA, warranty, maintenance schedule.

Setup (First Use Only)

Requires erpclaw to be installed first (provides database and shared library).

python3 {baseDir}/scripts/erpclaw-manufacturing/db_query.py --action status

Quick Start (Tier 1)

For all actions: python3 {baseDir}/scripts/db_query.py --action [flags]

Manufacturing -- Create a BOM and Run Production

--action add-workstation --name "Assembly Line 1" --hour-rate 50.00
--action add-operation --name "Assembly" --workstation-id  --time-in-mins 30
--action add-bom --item-id  --quantity 1 --items '[{"item_id":"","qty":2,"rate":"10.00"}]' --company-id 
--action add-work-order --bom-id  --quantity 10 --planned-start-date 2026-03-15 --company-id 

Projects -- Track Work and Log Time

--action add-project --name "Website Redesign" --company-id 
--action add-task --project-id  --name "Design mockups" --assigned-to  --priority high
--action add-timesheet --employee-id  --company-id  --start-date 2026-03-15 --end-date 2026-03-15 --items '[{"project_id":"","task_id":"","hours":8,"billing_rate":"150.00","date":"2026-03-15"}]'

Assets -- Register and Depreciate

--action add-asset-category --name "Office Equipment" --company-id  --depreciation-method straight_line --useful-life-years 5
--action add-asset --name "MacBook Pro" --asset-category-id  --company-id  --gross-value 2500.00 --purchase-date 2026-01-15
--action generate-depreciation-schedule --asset-id 

Quality -- Inspect and Track Defects

--action add-inspection-template --name "Raw Material Check" --company-id  --inspection-type incoming --parameters '[{"parameter_name":"Tensile Strength","parameter_type":"numeric","min_value":"200","max_value":"500","unit_of_measure":"MPa"}]'
--action add-quality-inspection --template-id  --reference-type item --reference-id  --company-id  --item-id  --inspection-type incoming --inspection-date 2026-03-15

Support -- Log Issues with SLA Tracking

--action add-sla --name "Standard SLA" --priorities '{"response_times":{"low":"48","medium":"24","high":"8","critical":"4"},"resolution_times":{"low":"120","medium":"72","high":"24","critical":"8"}}'
--action add-issue --subject "Printer not working" --customer-id  --priority high --issue-type complaint

All Actions (Tier 2)

Manufacturing (24 actions)

Action Description
add-operation / add-workstation Define operations and workstations
add-routing Create routing with operation sequence
add-bom / update-bom / get-bom / list-boms BOM CRUD
explode-bom Flatten multi-level BOM recursively
add-work-order / get-work-order / list-work-orders Work order CRUD
start-work-order / transfer-materials / complete-work-order / cancel-work-order Work order lifecycle (posts SLE + GL)
create-job-card / complete-job-card Shop floor execution
create-production-plan / run-mrp / get-production-plan Production planning & MRP
generate-work-orders / generate-purchase-requests Auto-generate from production plan
add-subcontracting-order Outsource production to supplier
status Manufacturing dashboard

Work order lifecycle: Draft -> Not Started -> In Process -> Completed. Cancel posts reversal entries.

Projects (18 actions)

Action Description
add-project / update-project / get-project / list-projects Project CRUD
add-task / update-task / list-tasks Task management
add-milestone / update-milestone Milestone tracking
add-timesheet / get-timesheet / list-timesheets Timesheet CRUD
submit-timesheet / bill-timesheet Timesheet lifecycle (Draft -> Submitted -> Billed)
project-profitability / gantt-data / resource-utilization Reports
status Projects dashboard

Assets (16 actions)

Action Description
add-asset-category / list-asset-categories Asset category management
add-asset / update-asset / get-asset / list-assets Asset CRUD
generate-depreciation-schedule Calculate monthly depreciation entries
post-depreciation / run-depreciation Post GL entries (DR Depreciation Expense, CR Accumulated Depreciation)
record-asset-movement Track location/custodian transfers
schedule-maintenance / complete-maintenance Asset maintenance lifecycle
dispose-asset Sell or scrap with gain/loss GL posting
asset-register-report / depreciation-summary Reports
status Assets dashboard

Depreciation methods: straight_line, written_down_value, double_declining.

Quality (14 actions)

Action Description
add-inspection-template / get-inspection-template / list-inspection-templates Template CRUD
add-quality-inspection / list-quality-inspections Inspection CRUD
record-inspection-readings / evaluate-inspection Record measurements, determine pass/fail
add-non-conformance / update-non-conformance / list-non-conformances NCR tracking
add-quality-goal / update-quality-goal Quality KPIs
quality-dashboard Pass rates, open NCRs, goal progress
status Quality dashboard

Support (18 actions)

Action Description
add-issue / update-issue / get-issue / list-issues Issue CRUD
add-issue-comment Add employee/customer comment
resolve-issue / reopen-issue Issue lifecycle with SLA breach detection
add-sla / list-slas SLA definitions (response + resolution times by priority)
add-warranty-claim / update-warranty-claim / list-warranty-claims Warranty claims
add-maintenance-schedule / list-maintenance-schedules / record-maintenance-visit Recurring maintenance
sla-compliance-report / overdue-issues-report Reports
status Support dashboard

Status Routing

status routes to manufacturing by default. Domain-specific aliases: manufacturing-status, projects-status, assets-status, quality-status, support-status.

Quick Command Reference

User Says Action
"create BOM" / "start production" add-bom, add-work-order
"run MRP" / "production plan" create-production-plan, run-mrp
"create project" / "add task" add-project, add-task
"log hours" / "submit timesheet" add-timesheet, submit-timesheet
"add asset" / "run depreciation" add-asset, run-depreciation
"inspect item" / "record readings" add-quality-inspection, record-inspection-readings
"log issue" / "resolve ticket" add-issue, resolve-issue
"SLA compliance" / "overdue issues" sla-compliance-report, overdue-issues-report

Confirmation Requirements

Confirm before: submit-*, cancel-*, complete-work-order, complete-job-card, complete-maintenance, dispose-asset, run-mrp, run-depreciation, post-depreciation, evaluate-inspection, resolve-issue, reopen-issue, bill-timesheet, generate-work-orders, generate-purchase-requests.

All add-*, get-*, list-*, update-*, status, and report actions run immediately.

Technical Details (Tier 3)

Architecture

  • Router: scripts/db_query.py dispatches to 5 domain scripts
  • Domains: manufacturing, projects, assets, quality, support
  • Database: Single SQLite at ~/.openclaw/erpclaw/data.sqlite (shared with erpclaw)
  • Shared Library: ~/.openclaw/erpclaw/lib/erpclaw_lib/ (installed by erpclaw)

Tables Owned (37)

Manufacturing (14): operation, workstation, routing, routing_operation, bom, bom_item, bom_operation, work_order, work_order_item, job_card, production_plan, production_plan_item, production_plan_material, subcontracting_order. Projects (5): project, task, milestone, timesheet, timesheet_detail. Assets (6): asset_category, asset, depreciation_schedule, asset_movement, asset_maintenance, asset_disposal. Quality (6): quality_inspection_template, quality_inspection_parameter, quality_inspection, quality_inspection_reading, non_conformance, quality_goal. Support (6): service_level_agreement, issue, issue_comment, warranty_claim, maintenance_schedule, maintenance_visit.

Data Conventions

Money = TEXT (Python Decimal), IDs = TEXT (UUID4), Dates = TEXT (ISO 8601), Booleans = INTEGER (0/1). All amounts use Decimal with ROUND_HALF_UP. GL entries and stock ledger entries are immutable.

Naming Series

Manufacturing: BOM-, WO-, JC-, PP-, SCO-. Projects: PROJ-, TASK-, TS-. Assets: AST-, ASTC-. Quality: QI-, NCR-, QG-. Support: ISS-, WC-, MS-, MV-.

Script Path

scripts/db_query.py --action  [--key value ...]