360 Secure SkillHub
360 安全技能中心

Simpleerp DB

核心功能:支持SimpleERP的只读Oracle SQL查询、DDL导出,可查询表结构、字段关联、行数,生成自定义SQL报表。典型场景:用户咨询SimpleERP数据库的表、列、关联逻辑、数据统计或定制报表时使用。输入为SQL语句或结构查询需求,输出为查询结果或预生成的结构文档。使用前需配置Oracle凭证并运行setup,通过npm命令执行操作。

icystssi-lang
icystssi-lang
热度 7.64
最近更新 2026-07-10 12:52:35
分类:数据依赖:代码执行 / 第三方 API / 读写文件应用场景:数据处理 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add simpleerp-db
Metadata
name
simpleerp-db
description
Read-only Oracle SQL and live schema export for SimpleERP. Runs npm run setup (export DDL + regenerate references) then SELECT/WITH/EXPLAIN PLAN via scripts/run-sql.mjs. Use when the user asks about SimpleERP database tables, columns, joins, row counts, or ad-hoc SQL reports. Requires Oracle credentials.
version
1.0.0
metadata
{"openclaw":{"skillKey":"simpleerp-db","emoji":"🗄️","requires":{"env":["DB_USER","DB_PASSWORD","DB_CONNECT_STRING"],"bins":["node","npm"]},"primaryEnv":"DB_USER","envVars":[{"name":"DB_USER","required":true,"description":"Oracle database user for read-only queries."},{"name":"DB_PASSWORD","required":true,"description":"Oracle password (never echo in chat)."},{"name":"DB_CONNECT_STRING","required":true,"description":"Easy Connect string, e.g. host:1521/SERVICE_NAME"},{"name":"DB_SCHEMA","required":false,"description":"Schema owner for DDL export (default SIMPLEERP)."},{"name":"SETUP_MAX_AGE_DAYS","required":false,"description":"Re-run npm run setup when status file is older than this."},{"name":"SIMPLEERP_TABLES_SQL","required":false,"description":"Override path to TABLES.sql (dev only)."}],"install":[{"kind":"node","package":"oracledb","bins":[]}]}}

SimpleERP DB

Read-only Oracle analyst for the SimpleERP schema. Query-only — no DML/DDL through this skill.

First use (required)

Before any query or schema lookup:

npm install
cp .env.example .env   # set DB_USER, DB_PASSWORD, DB_CONNECT_STRING
npm run setup

The agent must run npm run check and, if setup is missing or stale, npm run setup before using references/*.md or running SQL.

If DB_* credentials are missing: tell the user to copy .env.example → .env. Never ask for DB_PASSWORD in chat.

Windows (PowerShell): run Set-ExecutionPolicy RemoteSigned -Scope Process in the session before npm run if scripts are blocked. See references/bootstrap.md for per-OS commands (Copy-Item vs cp, cmd, macOS/Linux).

Quick commands

npm run check
npm run setup
npm run sql -- "SELECT 1 AS x FROM DUAL"
npm run sql:save -- "SELECT COUNT(*) AS c FROM PRODUCT"
npm run export-schema
npm run table-index

Reference map

Doc Contents
references/bootstrap.md Setup flow and prerequisites
references/tools.md Commands, env vars, outputs
references/playbook.md Credentials, safety, agent rules
references/table-index.md Table name discovery (after setup)
references/table-reference.md Columns and types (after setup)
references/table-relationships.md Join hints (after setup)
references/journal-pattern.md *_JNL audit tables

Agent policy

  • Execute npm run setup and npm run sql yourself when the task needs them.
  • Read references/table-reference.md before writing SQL.
  • Use only SELECT / WITH / EXPLAIN PLAN through run-sql.mjs.
  • Prefer FETCH FIRST n ROWS ONLY when exploring large tables.

Publish

See PUBLISH.md for ClawHub upload checklist.