oraclecloud-local-dev-loop
Set up a productive local OCI development workflow using CLI and SDK instead of the web console. Use when the OCI Console is too slow, setting up CLI profiles, or building shell aliases for common operations. Trigger with "oci local dev", "oci cli setup", "oraclecloud dev workflow", "avoid oci console".
What this skill does
# Oracle Cloud Local Dev Loop
## Overview
The OCI web console is slow, hard to navigate, and requires dozens of clicks for common operations. A local dev workflow using the OCI CLI and Python SDK replaces the console for everything: listing resources, launching instances, managing object storage, and checking service health. Profile switching lets you target dev/staging/prod from the same terminal.
**Purpose:** Set up a complete local OCI development environment with CLI profiles, shell aliases, environment variable management, and common workflow scripts that eliminate the need for the web console.
## Prerequisites
- **Completed `oraclecloud-install-auth`** — valid `~/.oci/config` with at least one profile
- **Python 3.8+** with `pip install oci oci-cli`
- **Bash or Zsh** shell
- OCIDs for your compartments (Governance > Compartments in the Console — last time you need it)
## Instructions
### Step 1: Install and Verify the OCI CLI
```bash
pip install oci-cli
# Verify installation
oci --version
# Quick connectivity test
oci iam region list --output table
```
### Step 2: Set Up Multiple Profiles
Edit `~/.oci/config` with profiles for each environment:
```ini
[DEFAULT]
user=ocid1.user.oc1..aaaa_YOUR_USER
fingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90
tenancy=ocid1.tenancy.oc1..aaaa_PROD_TENANCY
region=us-ashburn-1
key_file=~/.oci/oci_api_key.pem
[dev]
user=ocid1.user.oc1..aaaa_YOUR_USER
fingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90
tenancy=ocid1.tenancy.oc1..aaaa_DEV_TENANCY
region=us-phoenix-1
key_file=~/.oci/oci_api_key_dev.pem
[staging]
user=ocid1.user.oc1..aaaa_YOUR_USER
fingerprint=12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef
tenancy=ocid1.tenancy.oc1..aaaa_STAGING_TENANCY
region=eu-frankfurt-1
key_file=~/.oci/oci_api_key_staging.pem
```
Switch profiles with the `--profile` flag or `OCI_CLI_PROFILE` env var:
```text
# CLI flag
oci compute instance list --compartment-id <OCID> --profile dev
# Environment variable (applies to all commands in session)
export OCI_CLI_PROFILE=dev
oci compute instance list --compartment-id <OCID>
```
### Step 3: Environment Variables and .env File
Create a project `.env` file for compartment OCIDs and region defaults:
```bash
# .env — OCI project configuration (NEVER commit this file)
OCI_COMPARTMENT_ID="ocid1.compartment.oc1..aaaa_YOUR_COMPARTMENT"
OCI_TENANCY_ID="ocid1.tenancy.oc1..aaaa_YOUR_TENANCY"
OCI_REGION="us-ashburn-1"
OCI_CLI_PROFILE="DEFAULT"
```
```bash
# Add to .gitignore
echo ".env" >> .gitignore
# Source in your shell
source .env
```
### Step 4: Shell Aliases for Common Operations
Add these to your `~/.bashrc` or `~/.zshrc`:
```bash
# --- OCI Shell Aliases ---
# Profile switching
alias oci-dev='export OCI_CLI_PROFILE=dev && echo "Switched to dev"'
alias oci-staging='export OCI_CLI_PROFILE=staging && echo "Switched to staging"'
alias oci-prod='export OCI_CLI_PROFILE=DEFAULT && echo "Switched to prod"'
# Compute
alias oci-instances='oci compute instance list --compartment-id $OCI_COMPARTMENT_ID --output table --query "data[*].{Name:\"display-name\",State:\"lifecycle-state\",Shape:shape,OCID:id}"'
alias oci-running='oci compute instance list --compartment-id $OCI_COMPARTMENT_ID --lifecycle-state RUNNING --output table'
# Object Storage
alias oci-buckets='oci os bucket list --compartment-id $OCI_COMPARTMENT_ID --output table --query "data[*].{Name:name,Created:\"time-created\"}"'
# Networking
alias oci-vcns='oci network vcn list --compartment-id $OCI_COMPARTMENT_ID --output table'
alias oci-subnets='oci network subnet list --compartment-id $OCI_COMPARTMENT_ID --output table'
# IAM
alias oci-whoami='oci iam user get --user-id $(grep ^user ~/.oci/config | head -1 | cut -d= -f2) --query "data.{Name:name,Email:email}" --output table'
# Health check
alias oci-health='oci iam region list --output table && echo "OCI connectivity OK"'
```
### Step 5: Common CLI Workflows
**List and filter resources with JMESPath queries:**
```bash
# Instances by shape
oci compute instance list --compartment-id $OCI_COMPARTMENT_ID \
--query "data[?shape=='VM.Standard.A1.Flex'].{Name:\"display-name\",State:\"lifecycle-state\"}" \
--output table
# Buckets with size (requires additional call per bucket)
oci os bucket list --compartment-id $OCI_COMPARTMENT_ID \
--query "data[*].name" --raw-output
# Find an image by name
oci compute image list --compartment-id $OCI_COMPARTMENT_ID \
--query "data[?contains(\"display-name\", 'Oracle-Linux-8')].{Name:\"display-name\",ID:id}" \
--output table --limit 5
```
**Instance lifecycle from CLI:**
```bash
# Launch instance
oci compute instance launch \
--compartment-id $OCI_COMPARTMENT_ID \
--availability-domain "Uocm:US-ASHBURN-AD-1" \
--shape "VM.Standard.E4.Flex" \
--shape-config '{"ocpus": 1, "memoryInGBs": 8}' \
--display-name "dev-instance" \
--image-id <IMAGE_OCID> \
--subnet-id <SUBNET_OCID> \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub
# Stop / start / terminate
oci compute instance action --instance-id <OCID> --action STOP
oci compute instance action --instance-id <OCID> --action START
oci compute instance terminate --instance-id <OCID> --force
```
**Object storage operations:**
```bash
# Upload a file
oci os object put --bucket-name my-bucket --file ./data.csv --name data/input.csv
# Download a file
oci os object get --bucket-name my-bucket --name data/input.csv --file ./downloaded.csv
# List objects with prefix
oci os object list --bucket-name my-bucket --prefix "data/" \
--query "data[*].{Name:name,Size:size}" --output table
# Bulk upload a directory
oci os object bulk-upload --bucket-name my-bucket --src-dir ./upload/ --overwrite
```
### Step 6: Python SDK Local Dev Script
Create a reusable dev helper:
```python
#!/usr/bin/env python3
"""oci_dev.py — Local OCI development helper."""
import oci
import os
import sys
def get_config(profile="DEFAULT"):
"""Load OCI config with environment variable overrides."""
config = oci.config.from_file("~/.oci/config", profile_name=profile)
# Allow env var override for compartment
config["compartment_id"] = os.environ.get(
"OCI_COMPARTMENT_ID", config.get("tenancy")
)
oci.config.validate_config(config)
return config
def list_instances(config):
compute = oci.core.ComputeClient(config, timeout=(10, 30))
instances = compute.list_instances(
compartment_id=config["compartment_id"]
).data
for inst in instances:
print(f"{inst.display_name:<30} {inst.lifecycle_state:<12} {inst.shape}")
return instances
def list_buckets(config):
os_client = oci.object_storage.ObjectStorageClient(config, timeout=(10, 30))
namespace = os_client.get_namespace().data
buckets = os_client.list_buckets(
namespace_name=namespace,
compartment_id=config["compartment_id"]
).data
for b in buckets:
print(f"{b.name:<40} {b.time_created}")
return buckets
def health_check(config):
identity = oci.identity.IdentityClient(config, timeout=(5, 15))
user = identity.get_user(config["user"]).data
regions = identity.list_regions().data
print(f"User: {user.name}")
print(f"Regions: {len(regions)} available")
print("Status: OK")
if __name__ == "__main__":
profile = os.environ.get("OCI_CLI_PROFILE", "DEFAULT")
cfg = get_config(profile)
cmd = sys.argv[1] if len(sys.argv) > 1 else "health"
if cmd == "instances":
list_instances(cfg)
elif cmd == "buckets":
list_buckets(cfg)
elif cmd == "health":
health_check(cfg)
else:
print(f"Usage: python oci_dev.py [instances|buckets|health]")
```
```bash
# Usage
python oci_dev.py health
python oci_dev.py instances
OCI_CLI_PROFILE=dev python oci_dev.py buckets
```
### Step 7: Project Structure
```
my-oci-project/
├── .env # OCI_COMPARTMENT_ID, OCI_REGION, OCI_CLI_PROFILE
├── .gitignore # .env, *.pem, ~/.oci/
├── oci_dev.py Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.