К основному содержанию
скилл CX Codex

compute-management — скилл для Claude Code: запуск инстансов OCI

Скилл compute-management по OCI Compute для агента: подбор shape, лимиты, стоимость инстансов и разбор неудачных запусков.

MIT 118 установок ★ 22 обновлён 2026-04-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add acedergren/oci-agent-skills --skill compute-management -a claude-code
Открыть на GitHub

Что делает compute-management

Скилл подгружает агенту то, чего он не знает про OCI Compute: подбор shape под нагрузку, планирование ёмкости, квоты сервиса и жизненный цикл инстанса. Внутри есть дерево решений для ошибки «out of host capacity» и таблица цен по семействам shape, от A1.Flex на ARM до Optimized3.Flex.

Логика такая: сначала oci limits resource-availability get по нужному лимиту, потому что 87% сообщений «нет ёмкости» на деле упираются в квоту, а не в железо. Дальше перебор availability domain, соседних shape и смена архитектуры. Отдельный блок про instance principal: динамическая группа и политики вместо ключей пользователя на самом инстансе.

Заранее нужна рабочая oci CLI и свой tenancy, ведь имена availability domain у каждого тенанта свои, их берут через oci iam availability-domain list. И осторожнее с удалением: без --preserve-boot-volume false тестовый инстанс оставит после себя boot volume, а это $50+ в месяц за каждый.

Какие задачи решает

  • понять, квота мешает запуску или реально кончилась ёмкость
  • подобрать shape под нагрузку и не переплатить за fixed-вариант
  • посчитать месячную стоимость по числу OCPUs и объёму RAM
  • настроить instance principal вместо ключей пользователя на сервере
  • удалить тестовый инстанс, не оставив осиротевший boot volume

Примеры запросов агенту

  • Инстанс VM.Standard.E4.Flex не стартует с ошибкой out of host capacity — проверь лимиты и скажи, что делать дальше
  • Посчитай, во сколько в месяц обойдётся 2 OCPU и 16 ГБ на E4.Flex
  • Настрой instance principal для инстанса, которому нужен доступ к Object Storage

Как установить compute-management

1Через Skills CLI (Vercel)

npx skills add acedergren/oci-agent-skills --skill compute-management -a claude-code

2Вручную: положить файлы

~/.claude/skills/compute-management/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/compute-management/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о compute-management

Как установить compute-management в Claude Code?

Выполните npx skills add acedergren/oci-agent-skills --skill compute-management -a claude-code. Файл скилла окажется по пути ~/.claude/skills/compute-management/SKILL.md.

Что делает compute-management?

Даёт агенту знание OCI Compute: точные команды oci для запуска инстансов, проверку лимитов, подбор shape, расчёт стоимости и разбор ошибок загрузки.

Почему запуск падает с out of host capacity при свободных ресурсах?

В большинстве случаев виновата квота, а не инфраструктура: проверьте oci limits resource-availability get по нужному лимиту. Если доступно 0, нужен запрос на увеличение лимита.

Исходный текст

SKILL.md · MIT
---
name: compute-management
description: Use when launching OCI compute instances, troubleshooting out-of-capacity or boot failures, optimizing compute costs, or handling instance lifecycle. Covers shape selection, capacity planning, service limits, and production incident resolution.
license: MIT
metadata:
  author: alexander-cedergren
  version: "2.0.0"
---

# OCI Compute Management - Expert Knowledge

## 🏗️ Use OCI Landing Zone Terraform Modules

**Don't reinvent the wheel.** Use [oracle-terraform-modules/landing-zone](https://github.com/oracle-terraform-modules/terraform-oci-landing-zones) for production deployments.

**Landing Zone solves:**
- ❌ Bad Practice #5: Internet-wide open ports (0.0.0.0/0 on 22/3389)
- ❌ Bad Practice #9: Public compute instances (Security Zones enforce private IPs)
- ❌ Bad Practice #10: No monitoring (auto-configures alarms and notifications)

**This skill provides**: Anti-patterns and troubleshooting for compute resources deployed WITHIN a Landing Zone architecture.

---

## ⚠️ OCI CLI/API Knowledge Gap

**You don't know OCI CLI commands or OCI API structure.**

Your training data has limited and outdated knowledge of:
- OCI CLI syntax and parameters (updates monthly)
- OCI API endpoints and request/response formats
- Compute service CLI operations (`oci compute instance`)
- OCI service-specific commands and flags
- Latest OCI features and API changes

**When OCI operations are needed:**
1. Use exact CLI commands from this skill's references
2. Do NOT guess OCI CLI syntax or parameters
3. Do NOT assume API endpoint structures
4. Load reference files for detailed CLI operations

**What you DO know:**
- General cloud compute concepts
- Instance sizing and capacity planning principles
- Linux/Windows system administration

This skill bridges the gap by providing current OCI CLI/API commands for compute operations.

---

You are an OCI compute expert. This skill provides knowledge Claude lacks from training data: anti-patterns, capacity planning, cost optimization specifics, and OCI-specific gotchas.

## NEVER Do This

❌ **NEVER launch instances without checking service limits first**
```bash
oci limits resource-availability get \
  --service-name compute \
  --limit-name "standard-e4-core-count" \
  --compartment-id <ocid> \
  --availability-domain <ad>
```
87% of "out of capacity" errors are actually quota limits, not infrastructure capacity. Check limits BEFORE launching to get accurate error messages.

❌ **NEVER use console serial connection as primary access**
- Creates security audit findings (bypasses SSH key controls)
- Use only for boot troubleshooting when SSH fails
- Delete connection immediately after troubleshooting

❌ **NEVER mix regional and AD-specific resources in templates**
- Breaks portability when moving between regions
- Use AD-agnostic designs: spread via fault domains, not hardcoded ADs

❌ **NEVER use default security lists in production**
- Default allows 0.0.0.0/0 on all ports
- Fails security audits, creates compliance violations
- Always create custom security lists or NSGs

❌ **NEVER forget boot volume preservation in dev/test**
```bash
# When terminating test instances, add:
oci compute instance terminate --instance-id <id> --preserve-boot-volume false
```
Without this flag: $50+/month per deleted instance (orphaned boot volumes)

❌ **NEVER enable public IP on production instances**
- Use bastion service or private endpoints for access
- Cost impact: $500-5000+ per security incident from exposed instances
- Landing Zone Security Zones automatically block this pattern

## Capacity Error Decision Tree

```
"Out of host capacity for shape X"?
│
├─ Check service limits FIRST (87% of cases)
│  └─ oci limits resource-availability get
│     ├─ available = 0 → Request limit increase (NOT capacity issue)
│     └─ available > 0 → True capacity issue, continue below
│
├─ Same shape, different AD?
│  └─ Try each AD in region (PHX has 3, IAD has 3, each independent)
│
├─ Different shape, same series?
│  └─ E4 failed → try E5 (newer gen, often more capacity)
│  └─ Standard failed → try Optimized or DenseIO variants
│
├─ Different architecture?
│  └─ AMD → ARM (A1.Flex often has capacity when Intel/AMD full)
│
└─ All ADs exhausted?
   └─ Create capacity reservation (guarantees future launches)
```

## Shape Selection: Cost vs Performance

**Budget-Critical** (save 50%):
- VM.Standard.A1.Flex (ARM) if app supports: $0.01/OCPU/hr vs $0.03 (AMD)
- Caveat: Not all software runs on ARM, test thoroughly

**General Purpose** (balanced):
- VM.Standard.E4.Flex: 2:16 CPU:RAM ratio, $0.03/OCPU/hr
- Start: 2 OCPUs, scale based on metrics (not guesses)

**Memory-Intensive** (databases, caches):
- VM.Standard.E4.Flex with custom ratio: up to 1:64 CPU:RAM
- Cost: $0.03/OCPU + $0.0015/GB RAM

**Cost Trap**: Fixed shapes (e.g., VM.Standard2.1) often MORE expensive than Flex with same resources. Always compare Flex pricing first.

## Instance Principal Authentication (Production)

When instance needs to call OCI APIs (Object Storage, Vault, etc.):

**WRONG** (user credentials on instance):
```bash
# Don't do this - credential management nightmare
export OCI_USER_OCID="ocid1.user..."
```

**RIGHT** (instance principal):
```bash
# 1. Create dynamic group
oci iam dynamic-group create \
  --name "app-instances" \
  --matching-rule "instance.compartment.id = '<compartment-ocid>'"

# 2. Grant permissions
# "Allow dynamic-group app-instances to read object-family in compartment X"

# 3. Code uses instance principal (no credentials needed):
signer = oci.auth.signers.InstancePrincipalsSecurityTokenSigner()
client = oci.object_storage.ObjectStorageClient(config={}, signer=signer)
```

Benefits: No credential rotation, no secrets to manage, automatic token refresh.

## OCI-Specific Gotchas

**Availability Domain Names Are Tenant-Specific**
- Your AD: "fMgC:US-ASHBURN-AD-1"
- Another tenant: "ErKW:US-ASHBURN-AD-1"
- MUST query your tenant: `oci iam availability-domain list`

**Boot Volume Backups Don't Include Instance Config**
- Backup captures disk only, NOT shape/networking/metadata
- For DR: Use custom images (captures everything) or Terraform for infrastructure

**Instance Metadata Service Has 3 Versions**
- v1: http://169.254.169.254/opc/v1/ (legacy)
- v2: http://169.254.169.254/opc/v2/ (current, requires session token)
- Always use v2 for security (prevents SSRF attacks)

## Quick Cost Reference

| Shape Family | $/OCPU/hr | $/GB RAM/hr | Best For |
|--------------|-----------|-------------|----------|
| A1.Flex (ARM) | $0.01 | $0.0015 | Cost-critical, ARM-compatible |
| E4.Flex (AMD) | $0.03 | $0.0015 | General purpose |
| E5.Flex (AMD) | $0.035 | $0.0015 | Latest gen, premium perf |
| Optimized3.Flex | $0.025 | $0.0015 | Network-intensive |

**Free Tier**: 2x AMD VM (1/8 OCPU, 1GB) + 4 ARM cores (24GB total) - always free

**Calculation**: (OCPUs × $0.03 + GB × $0.0015) × 730 hours/month

Example: 2 OCPU, 16GB = (2×$0.03 + 16×$0.0015) × 730 = **$61.32/month**

## Progressive Loading References

### OCI Compute Shapes Reference (Official Oracle Documentation)

**WHEN TO LOAD** [`oci-compute-shapes-reference.md`](references/oci-compute-shapes-reference.md):
- Need detailed specifications for specific shapes (memory limits, OCPU counts, network bandwidth)
- Comparing flexible shapes (VM.Standard3.Flex vs E4.Flex vs E5.Flex vs E6.Flex vs A1/A2/A4.Flex)
- Understanding extended memory VM instances
- Researching bare metal shapes (BM.Standard3, BM.Standard.E4/E5/E6, BM.Standard.A1/A4)
- Checking GPU shapes, Dense I/O shapes, or HPC-optimized shapes
- Need official Oracle specifications for shape families

**Do NOT load** for:
- Quick cost comparisons (use Quick Cost Reference table in this skill)
- "Out of capacity" troubleshooting (decision tree in this skill covers it)
- Shape selection guidance (anti-patterns and recommendations in this skill)

---

## When to Use This Skill

- Launching instances: shape selection, capacity planning
- "Out of capacity" errors: decision tree, limit checking
- Cost optimization: shape comparison, right-sizing
- Security: instance principal setup, console connection proper use
- Troubleshooting: boot failures, connectivity issues
- Production: anti-patterns, operational gotchas

© alexander-cedergren · MIT · acedergren/oci-agent-skills

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
compute-host-events-troubleshooting официальный google Скилл compute-host-events-troubleshooting для Claude Code расследует причины сбоев, перезагрузок и вытеснения виртуальных машин в Google Compute Engine. CX Codex +1 ★ 24 522звёзд репо compute-vm-creation официальный google Скилл compute-vm-creation для Claude Code автоматизирует планирование и создание виртуальных машин Google Compute Engine. Помогает подбирать параметры инстансов, регионы и настраивать сеть через CLI или MCP. CX Codex +1 ★ 24 522звёзд репо prisma-compute prisma Управляет развёртыванием и обслуживанием приложений на Prisma Compute через CLI Prisma 8. Помогает настроить Prisma Composer, откатить релизы и проверить логи сервисов. CX Codex +1 420 500установок compute-resell aeonfun Скилл compute-resell выставляет ваши модели на маркетплейсе Surplus Intelligence и сам переоценивает офферы, чтобы выигрывать маршрутизацию в пределах заданных лимитов. CX Codex +1 ★ 797звёзд репо oci oracle Скилл oci для работы с Oracle Cloud Infrastructure: настройка OKE-кластеров, Terraform-конфигураций, Functions, IoT Platform и Generative AI. CX Codex +1 598установок oracle-cloud DauQuangThanh Помогает проектировать архитектуру в Oracle Cloud Infrastructure, писать код для Terraform OCI и разворачивать базы данных или кластеры OKE. CX Codex +1 152установок

Из того же набора9

monitoring-operations Скилл monitoring-operations для Claude Code и Codex настраивает метрики и алерты OCI Monitoring, разбирает молчащие алерты и пропавшие метрики. CX Codex +1 1 400установок oracle-dba Скилл oracle-dba помогает администрировать Oracle Autonomous Database в OCI: находить проблемные запросы по SQL_ID, предотвращать переплаты за ECPU и настраивать CLI-команды. CX Codex +1 145установок networking-management Скилл networking-management помогает проектировать и разбирать проблемы сетей OCI: VCN, маршрутизация, шлюзы, NSG и подсети балансировщиков. CX Codex +1 130установок best-practices Скилл best-practices по Oracle Cloud: подсказывает, какой CIDR брать для VCN, почему субнеты должны быть региональными и где Cloud Guard ломает прод. CX Codex +1 121установок database-management Скилл database-management по OCI Autonomous Database: какой service name брать в подключении, почему пароль не проходит валидацию и что стоит остановленная база. CX Codex +1 108установок infrastructure-as-code Скилл infrastructure-as-code для Claude Code помогает писать Terraform для OCI и разбирать ошибки провайдера. Он включается при работе с состоянием, стеком Resource Manager или OCI Landing Zones. CX Codex +1 106установок finops-cost-optimization Скилл finops-cost-optimization для Claude Code разбирает расходы на OCI и ищет способы сократить их. Включается при расследовании неожиданных счетов, планировании бюджета и поиске лишних затрат. CX Codex +1 104установок iam-identity-management Скилл iam-identity-management для Claude Code помогает писать политики OCI IAM и разбирать ошибки доступа. Подключается при настройке dynamic groups и интеграции IDCS. CX Codex +1 104установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой