Skip to main content
skill CX Codex

oracledb — Claude Code skill: what it does, how to install

Node.js scripts to manage Oracle databases: run queries, inspect execution plans, check table health, and track session resources.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cline/skills --skill oracledb -a claude-code
Open on GitHub

What oracledb does

The skill equips an agent with Node.js scripts targeted at Oracle database administration. It includes execute_sql for arbitrary statements alongside get_query_plan, which extracts execution metrics via EXPLAIN PLAN without running the query.

Diagnostics include list_active_sessions to display the default top 50 active connections with their SQL text. It also ships list_top_sql_by_resource to pinpoint the top 5 statements by CPU, I/O, or Elapsed Time. Storage tracking relies on list_tablespace_usage and schema checks through list_invalid_objects.

All scripts require Node.js. Database credentials must live in your .env files, as the scripts automatically read them; missing environment variables will cause executions to fail immediately.

What it helps with

  • inspect execution plans using EXPLAIN PLAN without running SQL
  • find invalid database objects requiring recompilation
  • track tablespace utilization and storage space
  • identify resource-heavy SQL statements by CPU or I/O

Example prompts for the agent

  • Check for invalid objects across the schema using list_invalid_objects.
  • Generate an execution plan for SELECT * FROM orders WHERE id = 10
  • List the top 5 SQL statements consuming the most CPU time.

How to install oracledb

1Skills CLI (Vercel)

npx skills add cline/skills --skill oracledb -a claude-code

2Manually: put the files in place

~/.claude/skills/oracledb/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/oracledb/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about oracledb

How to install oracledb in Claude Code?

Run npx skills add cline/skills --skill oracledb -a claude-code in your terminal.

What does the oracledb skill do?

It executes SQL statements, inspects execution plans, monitors active sessions, and checks tablespace consumption in Oracle databases.

How does oracledb handle database credentials?

The scripts automatically read connection values from .env files. You only need to provide credentials manually if those environment variables are missing.

Source text

SKILL.md · Apache-2.0
---
name: oracledb
description: Use these skills to manage and monitor Oracle databases by executing SQL statements, exploring schema metadata, analyzing query performance, monitoring active sessions and resource consumption, and managing storage and object health.
---

## Usage

All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.

**Bash:**
`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`

**PowerShell:**
`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`

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 |  |


---

### get_query_plan

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 |  |


---

### list_active_sessions

List the top N (default 50) currently running database sessions (STATUS='ACTIVE'), showing SID, OS User, Program, and the current SQL statement text.



---

### list_invalid_objects

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.



---

### list_tablespace_usage

List tablespace names, total size, free space, and used percentage to monitor storage utilization.



---

### list_top_sql_by_resource

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.



---

© cline · Apache-2.0 · cline/skills

Similar skills

All skills for Data and databases →

From the same set29

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor