Sqlcl logo

Sqlcl

Community
avhrst
sqlcl

Work with Oracle Database and APEX via SQLcl MCP. Run SQL/PLSQL, inspect schemas, manage data, export/import APEX apps, run Liquibase migrations, use Data Pump, manage projects, and more — all through the SQLcl MCP server.

Overview

Publisheravhrst
Repositoryapex-component-modifier
Skill namesqlcl
Stars
35
Forks
19
Bundled files
12
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by avhrst on GitHub. Read the source before you install it.

Installation

Install the Sqlcl AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/avhrst/apex-component-modifier/tree/main/.claude/skills/sqlcl
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/avhrst/apex-component-modifier.git /tmp/apex-component-modifier
mkdir -p .claude/skills
cp -r /tmp/apex-component-modifier/.claude/skills/sqlcl .claude/skills/sqlcl
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sqlcl in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sqlcl on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sqlcl is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Oracle SQLcl CLI Skill (via SQLcl MCP)

Interact with Oracle Database and APEX through the SQLcl MCP server. Covers all SQLcl capabilities: SQL/PLSQL execution, schema inspection, data operations, APEX management, Liquibase migrations, Data Pump, CI/CD projects, and diagnostics.

Settings

Env vars in .claude/settings.json (override in .claude/settings.local.json):

VarPurposeExample
SQLCL_CONNECTIONSaved connection aliasDEV
APEX_APP_IDDefault APEX app ID113
APEX_WORKSPACEAPEX workspace nameDEV_WORKSPACE

MCP Tools Available

SQLcl MCP exposes 5 tools. Always use the correct tool:

ToolUse ForExamples
list-connectionsList saved DB connectionsDiscovery, connection verification
connectEstablish DB connectionconnect with connection_name param
disconnectDrop current connectionCleanup, switch connections
run-sqlStandard SQL and PL/SQLSELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, anonymous blocks
run-sqlclSQLcl-specific commandsDDL, INFO, APEX, LIQUIBASE, LOAD, CTAS, DATAPUMP, CODESCAN, SODA, REST, PROJECT

Critical distinction:

  • run-sql → SQL statements and PL/SQL blocks (parsed by Oracle SQL engine)
  • run-sqlcl → SQLcl proprietary commands (parsed by SQLcl command processor)

Workflow

0) Connect

Always verify connection first:

  1. list-connections — find available saved connections
  2. connect with connection_name = $SQLCL_CONNECTION (or user-specified)
  3. Verify: run-sql → SELECT USER, SYS_CONTEXT('USERENV','DB_NAME') db_name FROM dual

1) Understand the request

Classify into category:

CategoryToolReference
Query/DMLrun-sqlreferences/sql_plsql.md
Schema inspectionrun-sqlcl (INFO/DDL/DESC)references/schema_commands.md
Data load/exportrun-sqlcl (LOAD/SPOOL/BRIDGE)references/data_commands.md
APEX operationsrun-sqlcl (APEX *)references/apex_commands.md
Schema migrationrun-sqlcl (LIQUIBASE *)references/liquibase_commands.md
Data Pumprun-sqlcl (DATAPUMP *)references/data_commands.md
CI/CD projectsrun-sqlcl (PROJECT *)references/project_commands.md
Error lookuprun-sqlcl (OERR)references/schema_commands.md
Code qualityrun-sqlcl (CODESCAN)references/schema_commands.md
ORDS/RESTrun-sqlcl (REST *)references/schema_commands.md
JSON documentsrun-sqlcl (SODA *)references/data_commands.md

2) Load relevant references

Read the appropriate reference file(s) from references/ before executing. This ensures correct syntax and parameters.

3) Execute

Use the classified tool with correct syntax. For multi-step operations, execute sequentially and validate each step.

4) Format and report results

  • For queries: present results in markdown tables when small, note row counts for large sets
  • For DDL/DML: confirm success, report rows affected
  • For errors: look up with OERR, diagnose, suggest fix
  • For APEX: confirm export/import paths, report component counts

Command Quick Reference

SQL / PL/SQL (run-sql)

sql
-- Queries
SELECT * FROM employees WHERE department_id = 10;

-- DML
INSERT INTO employees (id, name) VALUES (1, 'John');
UPDATE employees SET salary = salary * 1.1 WHERE department_id = 10;
DELETE FROM employees WHERE id = 1;

-- DDL
CREATE TABLE app_config (key VARCHAR2(100) PRIMARY KEY, value VARCHAR2(4000));
ALTER TABLE employees ADD (email VARCHAR2(255));
CREATE OR REPLACE PACKAGE pkg_util AS ... END pkg_util;

-- PL/SQL anonymous block
BEGIN
  DBMS_OUTPUT.PUT_LINE('Hello');
  FOR r IN (SELECT table_name FROM user_tables) LOOP
    DBMS_OUTPUT.PUT_LINE(r.table_name);
  END LOOP;
END;

Schema Inspection (run-sqlcl)

INFO employees              -- table structure, PKs, indexes, stats
INFO+ employees             -- above + FKs, comments, column details
DDL employees               -- full CREATE TABLE DDL via DBMS_METADATA
DDL HR.PKG_UTIL             -- package DDL
DESC employees              -- classic describe
CTAS employees              -- CREATE TABLE AS SELECT DDL
OERR ORA 01722              -- look up error ORA-01722

APEX (run-sqlcl)

apex version                                        -- APEX version
apex list -applicationid 113                        -- list components
apex export -applicationid 113 -split               -- full split export
apex export -applicationid 113 -split -expComponents "PAGE:1 PAGE:2"  -- partial

Liquibase (run-sqlcl)

liquibase generate-schema -split                    -- capture schema
liquibase diff -referenceUrl jdbc:oracle:...        -- compare schemas
liquibase update -changelog controller.xml          -- apply changes
liquibase status -changelog controller.xml          -- check pending
liquibase rollback -changelog controller.xml -count 1

Data (run-sqlcl)

LOAD employees employees.csv                        -- load CSV
SET SQLFORMAT csv                                   -- output as CSV
SET SQLFORMAT json                                  -- output as JSON
DATAPUMP EXPORT -schemas HR -directory DATA_DIR     -- Data Pump export
DATAPUMP IMPORT -schemas HR -directory DATA_DIR     -- Data Pump import

Projects (run-sqlcl)

project init -name myapp -schemas HR,APEX_APP       -- init project
project export                                      -- export DB objects
project stage                                       -- generate changelogs
project release                                     -- create release
project deploy -connection PROD                     -- deploy to target

Output Formatting (run-sqlcl)

SET SQLFORMAT ansiconsole    -- pretty terminal table
SET SQLFORMAT csv            -- comma-separated
SET SQLFORMAT json           -- JSON
SET SQLFORMAT json-formatted -- pretty JSON
SET SQLFORMAT html           -- HTML table
SET SQLFORMAT xml            -- XML
SET SQLFORMAT insert         -- INSERT statements
SET SQLFORMAT loader         -- SQL*Loader format
SET SQLFORMAT delimited      -- pipe-delimited
SET SQLFORMAT default        -- reset

Or use inline hints: SELECT /*csv*/ * FROM employees

Error Handling

ProblemAction
Connection refusedlist-connections, verify alias, retry
ORA-* errorrun-sqlcl → OERR ORA <number>, diagnose, fix
PLS-* errorrun-sqlcl → SHOW ERRORS, fix compilation
APEX export emptyVerify APP_ID, workspace, connection privileges
Liquibase lockrun-sqlcl → liquibase release-locks
Permission deniedCheck user privileges: SELECT * FROM session_privs
Unknown commandCheck references/ for correct syntax

Security Notes

  • Default restriction level is 4 (most restrictive) — no HOST, SPOOL, or script execution
  • All operations logged to DBTOOLS$MCP_LOG
  • Sessions marked in V$SESSION (MODULE = MCP client, PROGRAM = SQLcl-MCP)
  • Never hardcode credentials — use saved connections in ~/.dbtools
  • Prefer least-privilege: read-only for inspection, DML only when needed

Examples

/sqlcl show me all tables in the current schema
/sqlcl describe the EMPLOYEES table with indexes and constraints
/sqlcl export APEX app 113 page 5
/sqlcl generate DDL for package PKG_REPORTS
/sqlcl load data.csv into the STAGING table
/sqlcl compare DEV schema to STG schema
/sqlcl find all invalid objects and recompile them
/sqlcl what does ORA-01722 mean?
/sqlcl show APEX version and list all apps in workspace
/sqlcl create a liquibase changelog for the HR schema
/sqlcl run a code quality scan on the current schema

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sqlcl AI skill do?

Work with Oracle Database and APEX via SQLcl MCP. Run SQL/PLSQL, inspect schemas, manage data, export/import APEX apps, run Liquibase migrations, use Data Pump, manage projects, and more — all through the SQLcl MCP server.

Why use Sqlcl on TypingMind?

Because you install it once and use it with any model. Sqlcl is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sqlcl in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/avhrst/apex-component-modifier/tree/main/.claude/skills/sqlcl. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sqlcl?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sqlcl?

As many as you like. As long as a model supports skills, you can use Sqlcl with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sqlcl AI skill free?

It is published on GitHub by avhrst. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇