SKILL.md
Usage
All scripts can be executed using Node.js. Replace <paramname> and <paramvalue> with actual values.
Bash: node <skilldir>/scripts/<scriptname>.js '{"<paramname>": "<paramvalue>"}'
PowerShell: node <skilldir>/scripts/<scriptname>.js '{\"<paramname>\": \"<paramvalue>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
Scripts
execute_sql
Executes any SQL statement.
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| sql | string | The SQL to execute. | Yes |
getqueryplan
Generate a full execution plan for a single SQL statement using EXPLAIN PLAN. This can be used to analyze query performance without execution. Requires the SQL statement as input as a parameter.
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| query | string | The SQL statement for which you want to generate plan (omit the EXPLAIN keyword). | Yes |
listactivesessions
List the top N (default 50) currently running database sessions (STATUS='ACTIVE'), showing SID, OS User, Program, and the current SQL statement text.
listinvalidobjects
Lists all database objects that are in an invalid state, requiring recompilation (e.g., procedures, functions, views).
list_tables
Lists all user tables in the connected schema, including segment size, row count, and last analyzed date. Filters by a comma-separated list of names. If names are omitted, lists all tables in the current user's schema.
listtablespaceusage
List tablespace names, total size, free space, and used percentage to monitor storage utilization.
listtopsqlbyresource
List the top N (default 5) SQL statements from the library cache based on a chosen resource metric (CPU, I/O, or Elapsed Time). Shows SQL ID, execution count, buffer gets, disk reads, CPU time, and elapsed time.