Oracledb
ClineOfficialPublished by Cline
- Skill
- Tool integration
- Data and AI
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The oracledb skill provides a set of Node.js-based scripts designed to interact with Oracle databases. It enables administrators and developers to perform essential database management tasks, including executing arbitrary SQL, analyzing query execution plans, monitoring active sessions, and auditing object health. The skill also includes utilities for tracking tablespace storage utilization and identifying resource-intensive SQL statements, facilitating proactive database maintenance and performance tuning.
What it does
- Executes arbitrary SQL statements against an Oracle database.
- Generates execution plans for SQL queries to assist in performance analysis.
- Lists active database sessions to monitor current activity.
- Identifies invalid database objects that require recompilation.
- Provides insights into tablespace storage usage and capacity.
- Ranks SQL statements based on resource consumption metrics like CPU and I/O.
When to use it
- When you need to perform routine database administration tasks via an automated agent.
- When investigating performance bottlenecks in SQL queries.
- When monitoring database health, such as checking for invalid objects or storage limits.
- When identifying high-resource SQL statements for optimization.
Advantages
- Simplifies database monitoring by providing direct access to performance metrics.
- Automates the identification of invalid objects and storage issues.
- Enables performance tuning through execution plan generation and resource analysis.
- Integrates easily into automated workflows using standard Node.js execution.
Usage examples
- “Show me the top 10 most resource-intensive SQL statements based on CPU time.”
- The agent executes the list_top_sql_by_resource script with the CPU metric to return a list of SQL IDs and their associated performance statistics.
- “Are there any invalid objects in the database that I need to fix?”
- The agent runs the list_invalid_objects script and provides a report of all procedures, functions, or views currently in an invalid state.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/cline/oracledb/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip oracledb.zip -d .agents/skills
Documentation by Cline
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer822 B
- LICENSELicence file added by AutoGineer10.5 KiB
- SKILL.md2.3 KiB
- scripts/execute_sql.jsScript3.0 KiB
- scripts/get_query_plan.jsScript3.0 KiB
- scripts/list_active_sessions.jsScript3.0 KiB
- scripts/list_invalid_objects.jsScript3.0 KiB
- scripts/list_tables.jsScript3.0 KiB
- scripts/list_tablespace_usage.jsScript3.0 KiB
- scripts/list_top_sql_by_resource.jsScript3.0 KiB
scripts/list_tables.js
#!/usr/bin/env node
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
const { spawn, execSync } = require('child_process');
const path = require('path');
const fs = require('fs');
const os = require('os');
const toolName = "list_tables";
const configArgs = ["--prebuilt", "oracledb"];
const OPTIONAL_VARS_TO_OMIT_IF_EMPTY = [
'ORACLE_WALLET',
'ORACLE_USE_OCI',
];
function mergeEnvVars(env) {
if (process.env.GEMINI_CLI === '1') {
const envPath = path.resolve(__dirname, '../../../.env');
if (fs.existsSync(envPath)) {
const envContent = fs.readFileSync(envPath, 'utf-8');
envContent.split('\n').forEach(line => {
const trimmed = line.trim();
if (trimmed && !trimmed.startsWith('#')) {
const splitIdx = trimmed.indexOf('=');
if (splitIdx !== -1) {
const key = trimmed.slice(0, splitIdx).trim();
let value = trimmed.slice(splitIdx + 1).trim();
value = value.replace(/(^['"]|['"]$)/g, '');
if (env[key] === undefined) {
env[key] = value;
}
}
}
});
}
} else if (process.env.CLAUDECODE === '1') {
const prefix = 'CLAUDE_PLUGIN_OPTION_';
for (const key in process.env) {
if (key.startsWith(prefix)) {
env[key.substring(prefix.length)] = process.env[key];
}
}
}
}
function prepareEnvironment() {
let env = { ...process.env };
let userAgent = "skills";
if (process.env.GEMINI_CLI === '1') {
userAgent = "skills-geminicli";
} else if (process.env.CLAUDECODE === '1') {
userAgent = "skills-claudecode";
} else if (process.env.CODEX_CI === '1') {
userAgent = "skills-codex";
}
mergeEnvVars(env);
OPTIONAL_VARS_TO_OMIT_IF_EMPTY.forEach(varName => {
if (env[varName] === '') {
delete env[varName];
}
});
return { env, userAgent };
}
function main() {
const { env, userAgent } = prepareEnvironment();
const args = process.argv.slice(2);
const command = os.platform() === 'win32' ? 'npx.cmd' : 'npx';
const processedArgs = os.platform() === 'win32' ? args.map(arg => arg.includes('"') ? '"' + arg.replace(/"/g, '""') + '"' : arg) : args;
const npxArgs = ["--yes", "@toolbox-sdk/[email protected]", "--log-level", "error", ...configArgs, "invoke", toolName, "--user-agent-metadata", userAgent, ...processedArgs];
const child = spawn(command, npxArgs, { shell: os.platform() === 'win32', stdio: 'inherit', env });
child.on('close', (code) => {
process.exit(code);
});
child.on('error', (err) => {
console.error("Error executing toolbox:", err);
process.exit(1);
});
}
main();
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Cline
- Publisher
- Cline (Official)
- Source
- cline/skills · skills/oracledb · commit 2637846
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Cline.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download oracledb.zip