Oci functions deploy

From oracle/skills · View interactive version

Oci functions deploy is an AI agent skill from the GitHub repository oracle/skills. Build, configure, scaffold, and deploy OCI Functions from a local machine using a dependency-first, Fn-context-guided flow with argv-safe mutation execution, nonce-scoped confirmations, and a canonical lowercase machine-readable contract. Use when asked to validate/install Fn, OCI CLI, and Docker, c

How to use this skill

Skill file

OCI Functions Deploy

Overview

Use this skill for local macOS/Linux OCI Functions workstations. Windows automation is out of scope for this skill and should be handled manually. OCI Cloud Shell is also out of scope for the current workflow; if the user is in Cloud Shell, do not reuse this local automation flow blindly.

This skill supports Java, Python, and Node scaffolding and deploy automation. OCI Functions supports additional runtimes, but they are not scaffolded or deployed automatically by this skill.

Resolve deployment values with this precedence everywhere in the flow:

Execution modes:

Read vs Mutate Policy

Gating Table

| Step | Classification | Confirmation |

|---|---|---|

| dependency availability checks | read | not required |

| Fn context inspection | read | not required |

| OCI session validation and security-token retry check | read | not required |

| Docker registry auth inspection | read | not required |

| install missing fn / oci / docker | mutate | required |

| start Docker daemon | mutate | required |

| create or update Fn context | mutate | required |

| Docker login to Fn registry | mutate | required |

| create Functions app | mutate | required |

| advanced network creation (ensure_network.sh) | mutate | required |

| scaffold function with fn init | mutate | required |

| deploy with fn deploy | mutate | required |

Confirm Interface

Mutating scripts must use the structured confirmation interface:

confirm_gate.sh --description <text> [--display <text>] [--cwd <path>] [--stdin-env <env>] [--nonce <nonce>] [--machine-readable] -- <argv...>

Rules:

Function Name Rules

Function Name Contract

Workflow

  1. Dependency availability
  1. Fn context validation
  1. OCI CLI validation
  1. Docker registry validation
  1. Application selection
  1. Function prompts and scaffolding
  1. Deploy

Confirmation Rules

Input Collection Order

Only prompt for missing values after discovery:

  1. Missing dependency install/start approvals
  2. Missing Fn context values
  3. OCI security-token retry approval, if applicable
  4. OCIR login inputs, only if Docker is not logged into the Fn registry
  5. Application decision (reuse vs create) when existing apps are found
  6. Application inputs, only if app creation is needed
  7. Advanced network branch approval and inputs, only if the user explicitly opts into infrastructure creation
  8. Function name and runtime, only if not already provided
  9. Preserve function-name provenance (explicit vs prompted) when calling the scaffold script

Machine-Readable Contract

Use lowercase snake_case only.

All user-facing helper scripts in this skill accept --machine-readable. In that mode:

Canonical state families:

Companion fields:

Hard rules:

Decision Table

Use the following deterministic behavior after discovery:

| Target | found | missing or empty | error |

|---|---|---|---|

| VCN / Subnet | Reuse existing app/network resources only when the user explicitly enters the advanced network branch | Stay out of the default deploy flow; collect inputs only after explicit advanced-branch approval | Stop and escalate (credentials/IAM/permissions) |

| Functions App | If apps exist, require explicit reuse-vs-create decision before proceeding | Create after collecting app/subnet inputs with confirmation; support 1-3 subnet IDs plus optional shape and NSGs only on create | Stop and escalate |

| Fn Context | Reuse active Oracle Fn context values unless explicit user-provided values intentionally override them through configure_context.sh | Create or fill missing values with confirmation | Stop and escalate |

| OCI Session | Validate using oracle.profile from Fn context | Retry with security_token only after user approval, then stop if still invalid | Stop and escalate |

| OCIR Login | Reuse only after a successful live probe, or report cached if credentials exist but were not confirmed | Prompt for username/token only if needed, then confirm login | Stop and escalate |

| OCIR Repository / Compartment | Reuse existing settings when deploy succeeds | If push fails, surface repository auto-create and oracle.image-compartment-id possibilities explicitly | Stop and escalate |

| Function Name | Reuse only when explicitly named by the user | Ask and confirm before scaffolding; do not infer from descriptive prose | Stop and ask again |

Advanced Network Guidance (OCI Functions)

Only use this branch after explicit user approval to create or repair OCI networking for Functions.

When creating network resources for OCI Functions:

See:

Runtime Matrix

OCI Functions supports more runtimes than this skill handles automatically. This skill only automates:

Use scripts/preflight_check.sh to validate dependency availability, Fn context completeness, OCI session state, and Docker registry auth state before scaffolding.

Deploy Guardrail

Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.