agentleFS
seed-forgeseed-forge/harness-ai-kit/skills/public-oracle-expert-base/SKILL.md

public-oracle-expert-base

Skill25 starsChanged 4 months agoApache-2.0View on GitHub

Oracle 知识基座。覆盖 Connection Types、JDBC Driver、Connection Pool、LOB Handling、Character Set、SQL Dialect。供 devlab-oracle-usage 通过 extends 继承。

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ojdbc8.jar for JDK 8+, ojdbc11.jar for JDK 11+.

    line 29
  2. Very specific:

    Add orai18n.jar for internationalization support.

    line 30
  3. Very specific:

    Use setStringForClob() / setBinaryStream() for inserts.

    line 50
  4. Distinctive:

    Use Service Name format, not SID.

    line 75
  5. Distinctive:

    Always use connection pooling (UCP or HikariCP).

    line 76
  6. Distinctive:

    Use bind variables (prepared statements) — never string concatenation for SQL.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Oracle Database Knowledge Base

Source: Compiled from Oracle official documentation, JDBC best practices, and common integration patterns.

Connection Types

FormatExampleStatus
Service Namejdbc:oracle:thin:@//host:port/service_nameRecommended
SID (legacy)jdbc:oracle:thin:@host:port:SIDLegacy, avoid
TNSjdbc:oracle:thin:@tns_aliasEnterprise with tnsnames.ora
EZConnectjdbc:oracle:thin:@host:port/service_nameSimple, no config file
  • Always prefer Service Name over SID for new projects.
  • Easy Connect Plus (19c+): jdbc:oracle:thin:@tcp://host:port/service_name?wallet_location=/path.

JDBC Driver

TypeDescriptionWhen to use
Thin (Type 4)Pure Java, no Oracle clientDefault choice
Thick (OCI, Type 2)Requires Oracle ClientAdvanced features (TAF, Advanced Queuing)
UCPUniversal Connection PoolProduction pooling
  • Thin driver is sufficient for 95% of use cases.
  • Use ojdbc8.jar for JDK 8+, ojdbc11.jar for JDK 11+.
  • Add orai18n.jar for internationalization support.

Connection Pool

PoolRecommended for
UCP (Oracle)Oracle-specific features, best performance
HikariCPSpring Boot, general-purpose, simpler config

HikariCP config for Oracle:

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@//host:1521/service_name
spring.datasource.hikari.maximum-pool-size=20
spring.datasource.hikari.connection-timeout=5000
spring.datasource.hikari.idle-timeout=300000
spring.datasource.hikari.connection-test-query=SELECT 1 FROM DUAL

LOB Handling

  • CLOB for large text (>4000 chars); BLOB for binary data.
  • Use setStringForClob() / setBinaryStream() for inserts.
  • For reads, use getCharacterStream() / getBinaryStream() — avoid getString() on large CLOBs.
  • LOB locator vs data: oracle.jdbc.useStreamForLobOutput=true for streaming writes.

Character Set

  • AL32UTF8 is the recommended database character set (Unicode).
  • JDBC driver auto-detects charset from database; no client-side config needed.
  • Verify: SELECT value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET';

SQL Dialect Differences (vs MySQL/PostgreSQL)

FeatureOracleMySQL/PostgreSQL
Auto-incrementSEQUENCE + TRIGGER or IDENTITY (12c+)AUTO_INCREMENT / SERIAL
LIMITFETCH FIRST n ROWS ONLY (12c+) or ROWNUMLIMIT n
String concat`` operatorCONCAT() / ``
Date functionsSYSDATE, ADD_MONTHS(), MONTHS_BETWEEN()NOW(), DATE_ADD()
BooleanNo native BOOLEAN in SQL (use NUMBER(1))Native BOOLEAN
Outer join syntax(+) legacy or ANSI LEFT JOINANSI LEFT JOIN

Oracle Wallet

  • Wallet stores credentials for mutual TLS authentication.
  • Location: set oracle.net.wallet_location in connection properties.
  • For Autonomous Database: download wallet zip, extract to directory, reference in connection string.

Guardrails

  • Use Service Name format, not SID.
  • Always use connection pooling (UCP or HikariCP).
  • Use bind variables (prepared statements) — never string concatenation for SQL.
  • Set oracle.jdbc.ReadTimeout and oracle.net.CONNECT_TIMEOUT.
  • For LOBs >4KB, always use streaming API.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.