agentleFS
sriramvrinda-osssriramvrinda-oss/oci-db-management-mcp-server/skills/oci-setup/SKILL.md

oci-setup

Skill3 starsChanged 7 months agoMITView on GitHub

Validate OCI credentials, SDK installation, and IAM access for working with Oracle databases on OCI. Lists compartments and managed databases to confirm connectivity. Use this skill whenever a user is getting started with OCI, asks how to connect Claude to their Oracle database, has credential problems, wants to verify their OCI config, or says anything like "I want to use Claude to manage my Oracle database — how do I get started?". This is the entry point for all OCI database management workflows — always run this first.

  • Installs packages

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If version is too old:

    line 42
  2. Distinctive:

    If this raises, the config file is missing or malformed.

    line 56
  3. Distinctive:

    If this succeeds, credentials are valid and the SDK can reach OCI.

    line 83
  4. Distinctive:

    If the MCP server is already running, call:

    line 107
  5. Very specific:

    If the MCP server is not running yet, note that the next step is oci-dbm-server to start it.

    line 114
  6. Distinctive:

    If the MCP server is not yet running, these checks can all be done with the Python SDK directly.

    line 157
  7. Distinctive:

    No MCP tools are required for the setup validation itself.

    line 158

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

OCI Setup — Credential Validation & Environment Check

What it does

Checks that everything needed to use Claude with OCI Database Management is in place:

  1. OCI SDK installed and recent enough
  2. ~/.oci/config present and valid
  3. IAM connectivity confirmed (tenancy accessible)
  4. Compartments visible
  5. Existing managed databases listed

This skill runs before anything else. The MCP server, DBM skills, and commission workflow all depend on valid OCI credentials — catching problems here prevents cryptic 401 errors later.


Step 1 — Check OCI SDK

import oci
print(oci.__version__)

Minimum required version: 2.100.0 (2.173.0 recommended — needed for full ADB DBM feature API).

If not installed:

pip install oci

If version is too old:

pip install --upgrade oci

Step 2 — Check OCI config

config = oci.config.from_file()   # reads ~/.oci/config, profile [DEFAULT]
oci.config.validate_config(config)

If this raises, the config file is missing or malformed.

Expected config fields:

[DEFAULT]
user=ocid1.user.oc1..aaa...
fingerprint=xx:xx:xx:...
tenancy=ocid1.tenancy.oc1..aaa...
region=us-phoenix-1
key_file=~/.oci/oci_api_key.pem

Common issues:

  • key_file path wrong or file missing → FileNotFoundError
  • Wrong region → API calls succeed but return empty results
  • Wrong fingerprint or user OCID → AuthenticationError (401)

Step 3 — Verify IAM connectivity

identity_client = oci.identity.IdentityClient(config)
tenancy = identity_client.get_tenancy(config['tenancy']).data
print(f"Tenancy: {tenancy.name} ({tenancy.id})")

If this succeeds, credentials are valid and the SDK can reach OCI.


Step 4 — List compartments

compartments = identity_client.list_compartments(
    config['tenancy'],
    compartment_id_in_subtree=True,
    access_level='ACCESSIBLE'
).data

for c in compartments:
    if c.lifecycle_state == 'ACTIVE':
        print(f"  {c.name}: {c.id}")

Present this as a numbered list so the user can identify which compartment holds their databases.


Step 5 — List managed databases (if MCP server is running)

If the MCP server is already running, call:

list_managed_databases(compartment_id=<chosen_compartment_id>)

This shows which databases are already enrolled in OCI Database Management.

If the MCP server is not running yet, note that the next step is oci-dbm-server to start it.


Presenting the results

Give the user a clean summary:

OCI Setup — Validated

SDK:       oci 2.173.0
Config:    ~/.oci/config [DEFAULT]
Tenancy:   emdemo (ocid1.tenancy.oc1..aaa...)
Region:    us-phoenix-1

Compartments (3 accessible):
  1. root       ocid1.tenancy.oc1..aaa...
  2. dbmgmt     ocid1.compartment.oc1..aaa...
  3. production ocid1.compartment.oc1..aaa...

Managed Databases: [if MCP server is running, list them here]

Next step: start the MCP server with "oci-dbm-server"

What comes next

After setup passes:

  • Start the MCP server → oci-dbm-server
  • Onboard a new ADB → oci-dbm-commission
  • Diagnose an existing database → oci-dbm-diagnose
  • Check fleet health → oci-dbm-performance

The user does not need to remember this chain — offer the appropriate next step based on what they said they want to do.


Fallback: running without the MCP server

If the MCP server is not yet running, these checks can all be done with the Python SDK directly. No MCP tools are required for the setup validation itself.

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.