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

oci-dbm-network

Skill3 starsChanged 7 months agoMITView on GitHub

Validates and configures network prerequisites for OCI DBM enablement on ADB. Checks for a DBM Private Endpoint in the VCN and verifies/adds the ingress security list rule for TCP port 1522 from the subnet CIDR. Trigger when a user says "check my network for DBM", "set up network rules for DBM", or when oci-dbm-commission directs here after the grill.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check whether a DBM Private Endpoint (PE) exists in the VCN.

    line 29
  2. Very specific:

    Use DbManagementClient.list_private_endpoints(compartment_id=compartment_ocid) and filter results to confirm the provided dbm_pe_ocid is …

    line 31
  3. Very specific:

    If dbm_pe_ocid is "none" or the PE is not found or not ACTIVE:

    line 32
  4. Distinctive:

    Wait for the user to confirm the PE OCID before proceeding.

    line 37
  5. Very specific:

    Use VirtualNetworkClient.get_subnet(subnet_id=subnet_ocid) to retrieve the associated security list OCIDs, then call …

    line 41
  6. Distinctive:

    If the rule is missing:

    line 49
  7. Distinctive:

    If the rule already exists, print it and continue.

    line 55
  8. Distinctive:

    Before handing off, verify:

    line 77
  9. Distinctive:

    Do not proceed if either check fails.

    line 81

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

This skill is a worker in the oci-dbm-commission chain. It does NOT generate scripts. It uses the OCI Python SDK directly to validate and fix network prerequisites required before OCI Database Management can be enabled on an Autonomous Database.


Inputs

These values are passed by oci-dbm-commission (or supplied directly by the user):

InputDescriptionExample
compartment_ocidOCID of the compartment containing the VCN and subnetocid1.compartment.oc1..aaa...
subnet_ocidOCID of the private subnet where the ADB and DBM PE resideocid1.subnet.oc1.iad.aaa...
subnet_cidrCIDR block of that subnet — used as the ingress source for port 152210.0.1.0/24
dbm_pe_ocidOCID of the existing DBM Private Endpoint, or the string "none" if one does not exist yetocid1.dbmgmtprivateendpoint.oc1... or "none"

What This Skill Executes

Step 1 — Validate the DBM Private Endpoint

Check whether a DBM Private Endpoint (PE) exists in the VCN.

  • Use DbManagementClient.list_private_endpoints(compartment_id=compartment_ocid) and filter results to confirm the provided dbm_pe_ocid is present and its lifecycle_state is ACTIVE.
  • If dbm_pe_ocid is "none" or the PE is not found or not ACTIVE:
    • Block and instruct the user to create one manually via the OCI Console:

      Observability & Management > Database Management > Private Endpoints > Create Private Endpoint

    • Specify: same VCN and subnet as the ADB, same compartment.
    • This step cannot be automated via the SDK in the current API version. Do not attempt to create it programmatically.
    • Wait for the user to confirm the PE OCID before proceeding.

Step 2 — Check and Fix the Security List Rule for TCP 1522

Use VirtualNetworkClient.get_subnet(subnet_id=subnet_ocid) to retrieve the associated security list OCIDs, then call VirtualNetworkClient.get_security_list() on each.

Scan ingress_security_rules for a rule matching:

  • protocol = 6 (TCP)
  • source = subnet_cidr
  • tcp_options.destination_port_range.min = 1522
  • tcp_options.destination_port_range.max = 1522

If the rule is missing:

  • Print the current ingress rules (before state).
  • Append the new rule to the existing list and call VirtualNetworkClient.update_security_list() with the full merged list.
  • Print the updated ingress rules (after state).
  • Confirm the update succeeded (HTTP 200, no exception).

If the rule already exists, print it and continue.

Step 3 — Confirm and Output

Print:

  • The DBM PE OCID (confirmed active)
  • The security list rule confirming TCP 1522 ingress from subnet_cidr is present

Output the following values for the next skill in the chain:

dbm_pe_ocid: <ocid>
subnet_ocid: <ocid>
subnet_cidr: <cidr>
compartment_ocid: <ocid>
network_validated: true

Confirmation Before Finishing

Before handing off, verify:

  • DbManagementClient.list_private_endpoints() returns the PE with lifecycle_state = ACTIVE
  • VirtualNetworkClient.get_security_list() shows a TCP 1522 ingress rule from subnet_cidr

Do not proceed if either check fails.


What This Skill Hands Back

Outputs passed to oci-dbm-commission (and subsequently to oci-dbm-vault or oci-dbm-enable):

  • dbm_pe_ocid — confirmed OCID of the active DBM Private Endpoint
  • subnet_ocid — unchanged, forwarded for downstream skills
  • compartment_ocid — unchanged, forwarded for downstream skills
  • network_validated: true — signal that this step completed successfully

Gotcha

Port 1522, not 1521.

ADB Shared with TCPS (TLS-only) connectivity uses port 1522. The classic Oracle JDBC port 1521 is for non-TLS or dedicated infra. If the security rule is on 1521, DBM enablement will fail with a generic JDBC login timeout — no useful diagnostic is emitted. Always use 1522 for ADB Shared PE-based connectivity.

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.