[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7944T6KT9DFNNN2W3B2M0ST":3,"skill-same:01M7944T6KT9DFNNN2W3B2M0ST":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M7944T6KT9DFNNN2W3B2M0ST","oraclecloud-local-dev-loop",null,"Set up a productive local OCI development workflow using CLI and SDK instead of the web console.\nUse when the OCI Console is too slow, setting up CLI profiles, or building shell aliases for common operations.\nTrigger with \"oci local dev\", \"oci cli setup\", \"oraclecloud dev workflow\", \"avoid oci console\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--oraclecloud-pack--oraclecloud-local-dev-loop\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: oraclecloud-local-dev-loop\ndescription: |\n  Set up a productive local OCI development workflow using CLI and SDK instead of the web console.\n  Use when the OCI Console is too slow, setting up CLI profiles, or building shell aliases for common operations.\n  Trigger with \"oci local dev\", \"oci cli setup\", \"oraclecloud dev workflow\", \"avoid oci console\".\nallowed-tools: Read, Write, Edit, Bash(pip:*), Bash(oci:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, oraclecloud, oci]\ncompatible-with: claude-code\n---\n\n# Oracle Cloud Local Dev Loop\n\n## Overview\n\nThe 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\u002Fstaging\u002Fprod from the same terminal.\n\n**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.\n\n## Prerequisites\n\n- **Completed `oraclecloud-install-auth`** — valid `~\u002F.oci\u002Fconfig` with at least one profile\n- **Python 3.8+** with `pip install oci oci-cli`\n- **Bash or Zsh** shell\n- OCIDs for your compartments (Governance > Compartments in the Console — last time you need it)\n\n## Instructions\n\n### Step 1: Install and Verify the OCI CLI\n\n```bash\npip install oci-cli\n\n# Verify installation\noci --version\n\n# Quick connectivity test\noci iam region list --output table\n```\n\n### Step 2: Set Up Multiple Profiles\n\nEdit `~\u002F.oci\u002Fconfig` with profiles for each environment:\n\n```ini\n[DEFAULT]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90\ntenancy=ocid1.tenancy.oc1..aaaa_PROD_TENANCY\nregion=us-ashburn-1\nkey_file=~\u002F.oci\u002Foci_api_key.pem\n\n[dev]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90\ntenancy=ocid1.tenancy.oc1..aaaa_DEV_TENANCY\nregion=us-phoenix-1\nkey_file=~\u002F.oci\u002Foci_api_key_dev.pem\n\n[staging]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef\ntenancy=ocid1.tenancy.oc1..aaaa_STAGING_TENANCY\nregion=eu-frankfurt-1\nkey_file=~\u002F.oci\u002Foci_api_key_staging.pem\n```\n\nSwitch profiles with the `--profile` flag or `OCI_CLI_PROFILE` env var:\n\n```bash\n# CLI flag\noci compute instance list --compartment-id \u003COCID> --profile dev\n\n# Environment variable (applies to all commands in session)\nexport OCI_CLI_PROFILE=dev\noci compute instance list --compartment-id \u003COCID>\n```\n\n### Step 3: Environment Variables and .env File\n\nCreate a project `.env` file for compartment OCIDs and region defaults:\n\n```bash\n# .env — OCI project configuration (NEVER commit this file)\nOCI_COMPARTMENT_ID=\"ocid1.compartment.oc1..aaaa_YOUR_COMPARTMENT\"\nOCI_TENANCY_ID=\"ocid1.tenancy.oc1..aaaa_YOUR_TENANCY\"\nOCI_REGION=\"us-ashburn-1\"\nOCI_CLI_PROFILE=\"DEFAULT\"\n```\n\n```bash\n# Add to .gitignore\necho \".env\" >> .gitignore\n\n# Source in your shell\nsource .env\n```\n\n### Step 4: Shell Aliases for Common Operations\n\nAdd these to your `~\u002F.bashrc` or `~\u002F.zshrc`:\n\n```bash\n# --- OCI Shell Aliases ---\n\n# Profile switching\nalias oci-dev='export OCI_CLI_PROFILE=dev && echo \"Switched to dev\"'\nalias oci-staging='export OCI_CLI_PROFILE=staging && echo \"Switched to staging\"'\nalias oci-prod='export OCI_CLI_PROFILE=DEFAULT && echo \"Switched to prod\"'\n\n# Compute\nalias 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}\"'\nalias oci-running='oci compute instance list --compartment-id $OCI_COMPARTMENT_ID --lifecycle-state RUNNING --output table'\n\n# Object Storage\nalias oci-buckets='oci os bucket list --compartment-id $OCI_COMPARTMENT_ID --output table --query \"data[*].{Name:name,Created:\\\"time-created\\\"}\"'\n\n# Networking\nalias oci-vcns='oci network vcn list --compartment-id $OCI_COMPARTMENT_ID --output table'\nalias oci-subnets='oci network subnet list --compartment-id $OCI_COMPARTMENT_ID --output table'\n\n# IAM\nalias oci-whoami='oci iam user get --user-id $(grep ^user ~\u002F.oci\u002Fconfig | head -1 | cut -d= -f2) --query \"data.{Name:name,Email:email}\" --output table'\n\n# Health check\nalias oci-health='oci iam region list --output table && echo \"OCI connectivity OK\"'\n```\n\n### Step 5: Common CLI Workflows\n\n**List and filter resources with JMESPath queries:**\n\n```bash\n# Instances by shape\noci compute instance list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[?shape=='VM.Standard.A1.Flex'].{Name:\\\"display-name\\\",State:\\\"lifecycle-state\\\"}\" \\\n  --output table\n\n# Buckets with size (requires additional call per bucket)\noci os bucket list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[*].name\" --raw-output\n\n# Find an image by name\noci compute image list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[?contains(\\\"display-name\\\", 'Oracle-Linux-8')].{Name:\\\"display-name\\\",ID:id}\" \\\n  --output table --limit 5\n```\n\n**Instance lifecycle from CLI:**\n\n```bash\n# Launch instance\noci compute instance launch \\\n  --compartment-id $OCI_COMPARTMENT_ID \\\n  --availability-domain \"Uocm:US-ASHBURN-AD-1\" \\\n  --shape \"VM.Standard.E4.Flex\" \\\n  --shape-config '{\"ocpus\": 1, \"memoryInGBs\": 8}' \\\n  --display-name \"dev-instance\" \\\n  --image-id \u003CIMAGE_OCID> \\\n  --subnet-id \u003CSUBNET_OCID> \\\n  --ssh-authorized-keys-file ~\u002F.ssh\u002Fid_rsa.pub\n\n# Stop \u002F start \u002F terminate\noci compute instance action --instance-id \u003COCID> --action STOP\noci compute instance action --instance-id \u003COCID> --action START\noci compute instance terminate --instance-id \u003COCID> --force\n```\n\n**Object storage operations:**\n\n```bash\n# Upload a file\noci os object put --bucket-name my-bucket --file .\u002Fdata.csv --name data\u002Finput.csv\n\n# Download a file\noci os object get --bucket-name my-bucket --name data\u002Finput.csv --file .\u002Fdownloaded.csv\n\n# List objects with prefix\noci os object list --bucket-name my-bucket --prefix \"data\u002F\" \\\n  --query \"data[*].{Name:name,Size:size}\" --output table\n\n# Bulk upload a directory\noci os object bulk-upload --bucket-name my-bucket --src-dir .\u002Fupload\u002F --overwrite\n```\n\n### Step 6: Python SDK Local Dev Script\n\nCreate a reusable dev helper:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"oci_dev.py — Local OCI development helper.\"\"\"\n\nimport oci\nimport os\nimport sys\n\ndef get_config(profile=\"DEFAULT\"):\n    \"\"\"Load OCI config with environment variable overrides.\"\"\"\n    config = oci.config.from_file(\"~\u002F.oci\u002Fconfig\", profile_name=profile)\n    # Allow env var override for compartment\n    config[\"compartment_id\"] = os.environ.get(\n        \"OCI_COMPARTMENT_ID\", config.get(\"tenancy\")\n    )\n    oci.config.validate_config(config)\n    return config\n\ndef list_instances(config):\n    compute = oci.core.ComputeClient(config, timeout=(10, 30))\n    instances = compute.list_instances(\n        compartment_id=config[\"compartment_id\"]\n    ).data\n    for inst in instances:\n        print(f\"{inst.display_name:\u003C30} {inst.lifecycle_state:\u003C12} {inst.shape}\")\n    return instances\n\ndef list_buckets(config):\n    os_client = oci.object_storage.ObjectStorageClient(config, timeout=(10, 30))\n    namespace = os_client.get_namespace().data\n    buckets = os_client.list_buckets(\n        namespace_name=namespace,\n        compartment_id=config[\"compartment_id\"]\n    ).data\n    for b in buckets:\n        print(f\"{b.name:\u003C40} {b.time_created}\")\n    return buckets\n\ndef health_check(config):\n    identity = oci.identity.IdentityClient(config, timeout=(5, 15))\n    user = identity.get_user(config[\"user\"]).data\n    regions = identity.list_regions().data\n    print(f\"User: {user.name}\")\n    print(f\"Regions: {len(regions)} available\")\n    print(\"Status: OK\")\n\nif __name__ == \"__main__\":\n    profile = os.environ.get(\"OCI_CLI_PROFILE\", \"DEFAULT\")\n    cfg = get_config(profile)\n\n    cmd = sys.argv[1] if len(sys.argv) > 1 else \"health\"\n    if cmd == \"instances\":\n        list_instances(cfg)\n    elif cmd == \"buckets\":\n        list_buckets(cfg)\n    elif cmd == \"health\":\n        health_check(cfg)\n    else:\n        print(f\"Usage: python oci_dev.py [instances|buckets|health]\")\n```\n\n```bash\n# Usage\npython oci_dev.py health\npython oci_dev.py instances\nOCI_CLI_PROFILE=dev python oci_dev.py buckets\n```\n\n### Step 7: Project Structure\n\n```\nmy-oci-project\u002F\n├── .env                    # OCI_COMPARTMENT_ID, OCI_REGION, OCI_CLI_PROFILE\n├── .gitignore              # .env, *.pem, ~\u002F.oci\u002F\n├── oci_dev.py              # Dev helper script (Step 6)\n├── src\u002F\n│   └── oci_client.py       # Singleton client (see oraclecloud-sdk-patterns)\n├── scripts\u002F\n│   ├── setup.sh            # Install oci + oci-cli + source .env\n│   └── teardown.sh         # Terminate dev resources\n└── tests\u002F\n    └── test_oci.py         # Unit tests with mocked OCI responses\n```\n\n## Output\n\nSuccessful setup produces:\n- OCI CLI installed and verified with `oci iam region list`\n- Multi-profile `~\u002F.oci\u002Fconfig` for dev\u002Fstaging\u002Fprod switching\n- Shell aliases for common OCI operations (instances, buckets, health)\n- A reusable Python dev helper script for listing resources and health checks\n- Environment variable management via `.env` for project-specific OCIDs\n\n## Error Handling\n\n| Error | Code | Cause | Solution |\n|-------|------|-------|----------|\n| NotAuthenticated | 401 | Wrong profile or expired key | Check `OCI_CLI_PROFILE` matches a valid config section |\n| NotAuthorizedOrNotFound | 404 | Compartment OCID wrong for this profile | Verify `OCI_COMPARTMENT_ID` matches the profile's tenancy |\n| ConfigFileNotFound | — | `~\u002F.oci\u002Fconfig` missing | Run `oraclecloud-install-auth` |\n| command not found: oci | — | OCI CLI not installed | `pip install oci-cli` |\n| TooManyRequests | 429 | Rapid CLI commands hitting rate limit | Add `--retry-strategy default` or space out requests |\n| ServiceError status -1 | -1 | Network timeout | Check connectivity; increase timeout in SDK scripts |\n\n## Examples\n\n**One-liner resource summary:**\n\n```bash\necho \"=== OCI Status ===\" && \\\noci-health && \\\necho \"Instances:\" && oci-instances && \\\necho \"Buckets:\" && oci-buckets\n```\n\n**Switch profile and list resources in one command:**\n\n```bash\nOCI_CLI_PROFILE=dev oci compute instance list \\\n  --compartment-id $OCI_COMPARTMENT_ID --output table\n```\n\n## Resources\n\n- [OCI CLI Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002FContent\u002FAPI\u002FConcepts\u002Fcliconcepts.htm) — full command reference and configuration guide\n- [OCI CLI Configuration](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002FContent\u002FAPI\u002FConcepts\u002Fsdkconfig.htm) — config file format and profiles\n- [OCI Python SDK Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002Ftools\u002Fpython\u002Flatest\u002F) — API documentation for all service clients\n- [OCI API Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002Fapi\u002F) — REST API endpoints and schemas\n- [OCI Terraform Provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Foracle\u002Foci\u002Flatest\u002Fdocs) — infrastructure as code alternative\n- [OCI Status](https:\u002F\u002Focistatus.oraclecloud.com) — service health dashboard\n\n## Next Steps\n\nWith your local dev loop set up, see `oraclecloud-sdk-patterns` for production-grade client patterns, or `oraclecloud-common-errors` when you hit issues during development.\n","# Oracle Cloud Local Dev Loop\n\n## Overview\n\nThe 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\u002Fstaging\u002Fprod from the same terminal.\n\n**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.\n\n## Prerequisites\n\n- **Completed `oraclecloud-install-auth`** — valid `~\u002F.oci\u002Fconfig` with at least one profile\n- **Python 3.8+** with `pip install oci oci-cli`\n- **Bash or Zsh** shell\n- OCIDs for your compartments (Governance > Compartments in the Console — last time you need it)\n\n## Instructions\n\n### Step 1: Install and Verify the OCI CLI\n\n```bash\npip install oci-cli\n\n# Verify installation\noci --version\n\n# Quick connectivity test\noci iam region list --output table\n```\n\n### Step 2: Set Up Multiple Profiles\n\nEdit `~\u002F.oci\u002Fconfig` with profiles for each environment:\n\n```ini\n[DEFAULT]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90\ntenancy=ocid1.tenancy.oc1..aaaa_PROD_TENANCY\nregion=us-ashburn-1\nkey_file=~\u002F.oci\u002Foci_api_key.pem\n\n[dev]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=ab:cd:ef:12:34:56:78:90:ab:cd:ef:12:34:56:78:90\ntenancy=ocid1.tenancy.oc1..aaaa_DEV_TENANCY\nregion=us-phoenix-1\nkey_file=~\u002F.oci\u002Foci_api_key_dev.pem\n\n[staging]\nuser=ocid1.user.oc1..aaaa_YOUR_USER\nfingerprint=12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef\ntenancy=ocid1.tenancy.oc1..aaaa_STAGING_TENANCY\nregion=eu-frankfurt-1\nkey_file=~\u002F.oci\u002Foci_api_key_staging.pem\n```\n\nSwitch profiles with the `--profile` flag or `OCI_CLI_PROFILE` env var:\n\n```bash\n# CLI flag\noci compute instance list --compartment-id \u003COCID> --profile dev\n\n# Environment variable (applies to all commands in session)\nexport OCI_CLI_PROFILE=dev\noci compute instance list --compartment-id \u003COCID>\n```\n\n### Step 3: Environment Variables and .env File\n\nCreate a project `.env` file for compartment OCIDs and region defaults:\n\n```bash\n# .env — OCI project configuration (NEVER commit this file)\nOCI_COMPARTMENT_ID=\"ocid1.compartment.oc1..aaaa_YOUR_COMPARTMENT\"\nOCI_TENANCY_ID=\"ocid1.tenancy.oc1..aaaa_YOUR_TENANCY\"\nOCI_REGION=\"us-ashburn-1\"\nOCI_CLI_PROFILE=\"DEFAULT\"\n```\n\n```bash\n# Add to .gitignore\necho \".env\" >> .gitignore\n\n# Source in your shell\nsource .env\n```\n\n### Step 4: Shell Aliases for Common Operations\n\nAdd these to your `~\u002F.bashrc` or `~\u002F.zshrc`:\n\n```bash\n# --- OCI Shell Aliases ---\n\n# Profile switching\nalias oci-dev='export OCI_CLI_PROFILE=dev && echo \"Switched to dev\"'\nalias oci-staging='export OCI_CLI_PROFILE=staging && echo \"Switched to staging\"'\nalias oci-prod='export OCI_CLI_PROFILE=DEFAULT && echo \"Switched to prod\"'\n\n# Compute\nalias 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}\"'\nalias oci-running='oci compute instance list --compartment-id $OCI_COMPARTMENT_ID --lifecycle-state RUNNING --output table'\n\n# Object Storage\nalias oci-buckets='oci os bucket list --compartment-id $OCI_COMPARTMENT_ID --output table --query \"data[*].{Name:name,Created:\\\"time-created\\\"}\"'\n\n# Networking\nalias oci-vcns='oci network vcn list --compartment-id $OCI_COMPARTMENT_ID --output table'\nalias oci-subnets='oci network subnet list --compartment-id $OCI_COMPARTMENT_ID --output table'\n\n# IAM\nalias oci-whoami='oci iam user get --user-id $(grep ^user ~\u002F.oci\u002Fconfig | head -1 | cut -d= -f2) --query \"data.{Name:name,Email:email}\" --output table'\n\n# Health check\nalias oci-health='oci iam region list --output table && echo \"OCI connectivity OK\"'\n```\n\n### Step 5: Common CLI Workflows\n\n**List and filter resources with JMESPath queries:**\n\n```bash\n# Instances by shape\noci compute instance list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[?shape=='VM.Standard.A1.Flex'].{Name:\\\"display-name\\\",State:\\\"lifecycle-state\\\"}\" \\\n  --output table\n\n# Buckets with size (requires additional call per bucket)\noci os bucket list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[*].name\" --raw-output\n\n# Find an image by name\noci compute image list --compartment-id $OCI_COMPARTMENT_ID \\\n  --query \"data[?contains(\\\"display-name\\\", 'Oracle-Linux-8')].{Name:\\\"display-name\\\",ID:id}\" \\\n  --output table --limit 5\n```\n\n**Instance lifecycle from CLI:**\n\n```bash\n# Launch instance\noci compute instance launch \\\n  --compartment-id $OCI_COMPARTMENT_ID \\\n  --availability-domain \"Uocm:US-ASHBURN-AD-1\" \\\n  --shape \"VM.Standard.E4.Flex\" \\\n  --shape-config '{\"ocpus\": 1, \"memoryInGBs\": 8}' \\\n  --display-name \"dev-instance\" \\\n  --image-id \u003CIMAGE_OCID> \\\n  --subnet-id \u003CSUBNET_OCID> \\\n  --ssh-authorized-keys-file ~\u002F.ssh\u002Fid_rsa.pub\n\n# Stop \u002F start \u002F terminate\noci compute instance action --instance-id \u003COCID> --action STOP\noci compute instance action --instance-id \u003COCID> --action START\noci compute instance terminate --instance-id \u003COCID> --force\n```\n\n**Object storage operations:**\n\n```bash\n# Upload a file\noci os object put --bucket-name my-bucket --file .\u002Fdata.csv --name data\u002Finput.csv\n\n# Download a file\noci os object get --bucket-name my-bucket --name data\u002Finput.csv --file .\u002Fdownloaded.csv\n\n# List objects with prefix\noci os object list --bucket-name my-bucket --prefix \"data\u002F\" \\\n  --query \"data[*].{Name:name,Size:size}\" --output table\n\n# Bulk upload a directory\noci os object bulk-upload --bucket-name my-bucket --src-dir .\u002Fupload\u002F --overwrite\n```\n\n### Step 6: Python SDK Local Dev Script\n\nCreate a reusable dev helper:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"oci_dev.py — Local OCI development helper.\"\"\"\n\nimport oci\nimport os\nimport sys\n\ndef get_config(profile=\"DEFAULT\"):\n    \"\"\"Load OCI config with environment variable overrides.\"\"\"\n    config = oci.config.from_file(\"~\u002F.oci\u002Fconfig\", profile_name=profile)\n    # Allow env var override for compartment\n    config[\"compartment_id\"] = os.environ.get(\n        \"OCI_COMPARTMENT_ID\", config.get(\"tenancy\")\n    )\n    oci.config.validate_config(config)\n    return config\n\ndef list_instances(config):\n    compute = oci.core.ComputeClient(config, timeout=(10, 30))\n    instances = compute.list_instances(\n        compartment_id=config[\"compartment_id\"]\n    ).data\n    for inst in instances:\n        print(f\"{inst.display_name:\u003C30} {inst.lifecycle_state:\u003C12} {inst.shape}\")\n    return instances\n\ndef list_buckets(config):\n    os_client = oci.object_storage.ObjectStorageClient(config, timeout=(10, 30))\n    namespace = os_client.get_namespace().data\n    buckets = os_client.list_buckets(\n        namespace_name=namespace,\n        compartment_id=config[\"compartment_id\"]\n    ).data\n    for b in buckets:\n        print(f\"{b.name:\u003C40} {b.time_created}\")\n    return buckets\n\ndef health_check(config):\n    identity = oci.identity.IdentityClient(config, timeout=(5, 15))\n    user = identity.get_user(config[\"user\"]).data\n    regions = identity.list_regions().data\n    print(f\"User: {user.name}\")\n    print(f\"Regions: {len(regions)} available\")\n    print(\"Status: OK\")\n\nif __name__ == \"__main__\":\n    profile = os.environ.get(\"OCI_CLI_PROFILE\", \"DEFAULT\")\n    cfg = get_config(profile)\n\n    cmd = sys.argv[1] if len(sys.argv) > 1 else \"health\"\n    if cmd == \"instances\":\n        list_instances(cfg)\n    elif cmd == \"buckets\":\n        list_buckets(cfg)\n    elif cmd == \"health\":\n        health_check(cfg)\n    else:\n        print(f\"Usage: python oci_dev.py [instances|buckets|health]\")\n```\n\n```bash\n# Usage\npython oci_dev.py health\npython oci_dev.py instances\nOCI_CLI_PROFILE=dev python oci_dev.py buckets\n```\n\n### Step 7: Project Structure\n\n```\nmy-oci-project\u002F\n├── .env                    # OCI_COMPARTMENT_ID, OCI_REGION, OCI_CLI_PROFILE\n├── .gitignore              # .env, *.pem, ~\u002F.oci\u002F\n├── oci_dev.py              # Dev helper script (Step 6)\n├── src\u002F\n│   └── oci_client.py       # Singleton client (see oraclecloud-sdk-patterns)\n├── scripts\u002F\n│   ├── setup.sh            # Install oci + oci-cli + source .env\n│   └── teardown.sh         # Terminate dev resources\n└── tests\u002F\n    └── test_oci.py         # Unit tests with mocked OCI responses\n```\n\n## Output\n\nSuccessful setup produces:\n- OCI CLI installed and verified with `oci iam region list`\n- Multi-profile `~\u002F.oci\u002Fconfig` for dev\u002Fstaging\u002Fprod switching\n- Shell aliases for common OCI operations (instances, buckets, health)\n- A reusable Python dev helper script for listing resources and health checks\n- Environment variable management via `.env` for project-specific OCIDs\n\n## Error Handling\n\n| Error | Code | Cause | Solution |\n|-------|------|-------|----------|\n| NotAuthenticated | 401 | Wrong profile or expired key | Check `OCI_CLI_PROFILE` matches a valid config section |\n| NotAuthorizedOrNotFound | 404 | Compartment OCID wrong for this profile | Verify `OCI_COMPARTMENT_ID` matches the profile's tenancy |\n| ConfigFileNotFound | — | `~\u002F.oci\u002Fconfig` missing | Run `oraclecloud-install-auth` |\n| command not found: oci | — | OCI CLI not installed | `pip install oci-cli` |\n| TooManyRequests | 429 | Rapid CLI commands hitting rate limit | Add `--retry-strategy default` or space out requests |\n| ServiceError status -1 | -1 | Network timeout | Check connectivity; increase timeout in SDK scripts |\n\n## Examples\n\n**One-liner resource summary:**\n\n```bash\necho \"=== OCI Status ===\" && \\\noci-health && \\\necho \"Instances:\" && oci-instances && \\\necho \"Buckets:\" && oci-buckets\n```\n\n**Switch profile and list resources in one command:**\n\n```bash\nOCI_CLI_PROFILE=dev oci compute instance list \\\n  --compartment-id $OCI_COMPARTMENT_ID --output table\n```\n\n## Resources\n\n- [OCI CLI Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002FContent\u002FAPI\u002FConcepts\u002Fcliconcepts.htm) — full command reference and configuration guide\n- [OCI CLI Configuration](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002FContent\u002FAPI\u002FConcepts\u002Fsdkconfig.htm) — config file format and profiles\n- [OCI Python SDK Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002Ftools\u002Fpython\u002Flatest\u002F) — API documentation for all service clients\n- [OCI API Reference](https:\u002F\u002Fdocs.oracle.com\u002Fen-us\u002Fiaas\u002Fapi\u002F) — REST API endpoints and schemas\n- [OCI Terraform Provider](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Foracle\u002Foci\u002Flatest\u002Fdocs) — infrastructure as code alternative\n- [OCI Status](https:\u002F\u002Focistatus.oraclecloud.com) — service health dashboard\n\n## Next Steps\n\nWith your local dev loop set up, see `oraclecloud-sdk-patterns` for production-grade client patterns, or `oraclecloud-common-errors` when you hit issues during development.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","oraclecloud","oci","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Set up a productive local OCI development workflow using CLI and SDK instead of the web console.\nUse when the OCI Console is too slow, setting up CLI profiles, or building shell aliases for common operations.\nTrigger with \"oci local dev\", \"oci cli setup\", \"oraclecloud dev workflow\", \"avoid oci console\".\n","Read, Write, Edit, Bash(pip:*), Bash(oci:*), Grep","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--oraclecloud-pack--oraclecloud-local-dev-loop",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill oraclecloud-local-dev-loop",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill oraclecloud-local-dev-loop",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill oraclecloud-local-dev-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--oraclecloud-pack--oraclecloud-local-dev-loop\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]