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 setupandnpm run sqlyourself when the task needs them. - Read
references/table-reference.mdbefore writing SQL. - Use only SELECT / WITH / EXPLAIN PLAN through
run-sql.mjs. - Prefer
FETCH FIRST n ROWS ONLYwhen exploring large tables.
Publish
See PUBLISH.md for ClawHub upload checklist.
Scan to join WeChat group