소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill alicloud-polar-oracle-ops명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | alicloud-polar-oracle-ops |
| description | >- Use when this capability is needed. |
PolarDB Oracle-compatible (PolarDB O / PolarDB IO) is Alibaba Cloud's cloud-native database fully compatible with Oracle PL/SQL syntax, designed for enterprise Oracle migration scenarios. This skill is an operational runbook for agents: explicit scope, credential rules, pre-flight checks, dual-path execution (official SDK/API and CLI flows), response validation, and failure recovery.
cli_applicability: dual-path: Official aliyun supports PolarDB-O via the
polardb-io product slug. Each execution flow documents both the SDK step and
the aliyun step for every operation.alicloud-ram-opsalicloud-polar-mysql-opsalicloud-polar-postgresql-opsalicloud-rds-opsalicloud-das-ops| 能力 | 委托目标 | 说明 |
|---|---|---|
| GCL 质量门禁 | alicloud-gcl-runner-ops | 对写操作执行前,委托 GCL 循环进行对抗性评审 |
| Placeholder | Meaning | Agent Action |
|---|---|---|
{{env.ALIBABA_CLOUD_ACCESS_KEY_ID}} | Runtime env | NEVER ask user |
{{env.ALIBABA_CLOUD_ACCESS_KEY_SECRET}} | Runtime env | NEVER ask user |
{{env.ALIBABA_CLOUD_REGION_ID}} | Runtime env | Documented default |
{{user.region}} | User-supplied region | Ask once |
{{user.db_cluster_id}} | Cluster ID | Ask once |
{{user.db_node_class}} | Node specification | Ask once |
{{user.vpc_id}} | VPC ID | Ask once |
{{user.vswitch_id}} | VSwitch ID | Ask once |
{{user.account_name}} | Account name | Ask once |
{{user.account_password}} | Account password | Ask once |
{{user.db_name}} | Database name | Ask once |
{{output.db_cluster_id}} | From API response | Parse per OpenAPI |
凭据安全(强制): 参考 Credential Masking 规则
| Operation | JSON Path | Type | Description |
|---|---|---|---|
| CreateDBCluster | $.DBClusterId | string | New cluster ID |
| DescribeDBClusters | $.Items.DBCluster[].DBClusterId | array | Cluster IDs |
| DescribeDBClusters | $.Items.DBCluster[].DBClusterStatus | string | Status |
| DescribeDBClusters | $.Items.DBCluster[].DBVersion | string | Engine version |
| DescribeDBClusterAttribute | $.DBClusterDescription | string | Cluster description |
| CreateAccount | $.RequestId | string | Request ID |
| DescribeAccounts | $.Accounts.Account[].AccountName | array | Account names |
| CreateDatabase | $.RequestId | string | Request ID |
| DescribeBackups | $.Items.Backup[].BackupId | array | Backup IDs |
| Operation | Initial State | Target State | Poll Interval | Max Wait |
|---|---|---|---|---|
| CreateDBCluster | — | Running | 10s | 600s |
| DeleteDBCluster | any stable | absent | 10s | 300s |
| StartDBCluster | Stopped | Running | 10s | 300s |
| StopDBCluster | Running | Stopped | 10s | 300s |
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-05-16 | Initial PolarDB Oracle-compatible skill with dual-path support |
aliyun CLI installedaliyun polardb-io DescribeDBClusters --RegionId "{{env.ALIBABA_CLOUD_REGION_ID}}"
| Check | Method | Expected | On Failure |
|---|---|---|---|
| CLI | aliyun version | Exit code 0 | Document CLI install |
| Credentials | Env vars | Non-empty keys | HALT |
| Region | aliyun polardb-io DescribeRegions | Supported | Suggest valid region |
| VPC/VSwitch | aliyun vpc DescribeVpcs | Exist | Delegate to alicloud-vpc-ops |
aliyun polardb-io CreateDBCluster \
--DBNodeClass "{{user.db_node_class}}" \
--PayType Postpaid \
--DBNodeNumber 2 \
--RegionId "{{user.region}}" \
--VPCId "{{user.vpc_id}}" \
--VSwitchId "{{user.vswitch_id}}" \
--DBClusterDescription "{{user.db_cluster_name}}" \
--SecurityIPList "{{user.security_ip_list|10.0.0.0/8}}"
package main
import (
"fmt"
"os"
openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
"github.com/alibabacloud-go/tea/tea"
polardbio "github.com/alibabacloud-go/polardb-io-20211126/v3/client"
)
func main() {
config := &openapi.Config{
AccessKeyId: tea.String(os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")),
AccessKeySecret: tea.String(os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")),
}
client, _ := polardbio.NewClient(config)
req := &polardbio.CreateDBClusterRequest{
DBNodeClass: tea.String(os.Getenv("DB_NODE_CLASS")),
PayType: tea.String("Postpaid"),
DBNodeNumber: tea.Int32(2),
RegionId: tea.String(os.Getenv("REGION")),
VPCId: tea.String(os.Getenv("VPC_ID")),
VSwitchId: tea.String(os.Getenv("VSWITCH_ID")),
DBClusterDescription: tea.String(os.Getenv("CLUSTER_NAME")),
SecurityIPList: tea.String(os.Getenv("SECURITY_IP_LIST")),
ClientToken: tea.String(os.Getenv("CLIENT_TOKEN")),
}
resp, _ := client.CreateDBCluster(req)
fmt.Printf("Created PolarDB-O cluster: %s\n", tea.ToString(resp.Body.DBClusterId))
}
Poll until DBClusterStatus is Running:
for i in $(seq 1 60); do
STATUS=$(aliyun polardb-io DescribeDBClusterAttribute \
--DBClusterId "{{output.db_cluster_id}}" \
--output cols=DBClusterStatus rows=DBClusterStatus)
[ "$STATUS" = "Running" ] && break
sleep 10
done
| Error pattern | Max retries | Backoff | Agent Action |
|---|---|---|---|
InvalidParameter / 400 | 0–1 | — | Fix args from OpenAPI |
DBClusterQuotaExceeded | 0 | — | HALT |
InsufficientBalance | 0 | — | HALT |
ResourceAlreadyExists | 0 | — | Ask reuse vs rename |
| Throttling / 429 | 3 | exponential | Back off |
InternalError / 5xx | 3 | 2s, 4s, 8s | Retry; then HALT with RequestId |
# List all Oracle-compatible clusters
aliyun polardb-io DescribeDBClusters --RegionId "{{user.region}}"
# Describe specific cluster
aliyun polardb-io DescribeDBClusterAttribute --DBClusterId "{{user.db_cluster_id}}"
# Extract key fields
aliyun polardb-io DescribeDBClusters --RegionId "{{user.region}}" \
--output cols=DBClusterId,DBClusterStatus,DBVersion,PayType rows=Items.DBCluster[].{DBClusterId,DBClusterStatus,DBVersion,PayType}
aliyun polardb-io DeleteDBCluster --DBClusterId "{{user.db_cluster_id}}"
Poll until cluster is absent.
aliyun polardb-io AddDBNodes \
--DBClusterId "{{user.db_cluster_id}}" \
--DBNodeClass "{{user.db_node_class}}" \
--DBNodesCount "{{user.db_nodes_count|1}}"
Safety Gate: Confirm before removing.
aliyun polardb-io RemoveDBNodes \
--DBClusterId "{{user.db_cluster_id}}" \
--DBNodeIds "{{user.db_node_ids}}"
aliyun polardb-io DescribeDBNodes --DBClusterId "{{user.db_cluster_id}}"
aliyun polardb-io CreateAccount \
--DBClusterId "{{user.db_cluster_id}}" \
--AccountName "{{user.account_name}}" \
--AccountPassword "{{user.account_password}}" \
--AccountType "Super"
aliyun polardb-io DescribeAccounts --DBClusterId "{{user.db_cluster_id}}"
aliyun polardb-io CreateDatabase \
--DBClusterId "{{user.db_cluster_id}}" \
--DBName "{{user.db_name}}" \
--AccountName "{{user.account_name}}" \
--AccountPrivilege "ReadWrite"
aliyun polardb-io CreateBackup --DBClusterId "{{user.db_cluster_id}}"
aliyun polardb-io DescribeBackups \
--DBClusterId "{{user.db_cluster_id}}" \
--StartTime "{{user.start_time}}" \
--EndTime "{{user.end_time}}"
aliyun polardb-io ModifyBackupPolicy \
--DBClusterId "{{user.db_cluster_id}}" \
--PreferredBackupTime "02:00Z-03:00Z" \
--PreferredBackupPeriod "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" \
--BackupRetentionPeriod 30
aliyun polardb-io DescribeDBClusterEndpoints --DBClusterId "{{user.db_cluster_id}}"
# Stop cluster
aliyun polardb-io StopDBCluster --DBClusterId "{{user.db_cluster_id}}"
# Start cluster
aliyun polardb-io StartDBCluster --DBClusterId "{{user.db_cluster_id}}"
aliyun polardb-io UpgradeDBCluster \
--DBClusterId "{{user.db_cluster_id}}" \
--DBNodeClass "{{user.target_node_class}}"
Purpose: Proactive discovery of PolarDB Oracle performance bottlenecks, storage risks, and session anomalies.
5-step workflow: Discovery (list clusters) → Collection (CPU/Memory/IOPS/Storage/Sessions) → Detection (4 anomaly pattern rules) → Diagnosis (slow SQL, tablespace, sessions) → Report (Markdown).
Full CLI script template at references/cli-usage.md.
Inspection scoring:
| Metric | Threshold | Score |
|---|---|---|
| CPUUtilization | < 80% | 10 |
| StorageUsage | < 85% | 10 |
| Sessions | < 80% max | 10 |
| SlowQuery | < 5/hour | 10 |
Total < 40 → Critical (immediate action required)
Anomaly detection rules:
| Rule | Metric | Threshold |
|---|---|---|
| CPU high | CPUUtilization | > 80% (Warning) / > 95% (Critical) |
| Memory high | MemoryUtilization | > 85% |
| Storage low | StorageUsage | > 85% |
| Connection high | Connections | > 80% max |
| Step | Operation | Purpose | Alert Threshold |
|---|---|---|---|
| 1 | DescribeDBClusterAttribute | Verify cluster exists, status | HALT if NotFound |
| 2 | DescribeDBNodes | Check all node health | Alert if Unhealthy |
| 3 | DescribeBackupPolicy | Check backup schedule | Warn if no policy |
| 4 | DescribeBackups | Verify recent backup success | Alert if > 24h no backup |
| 5 | DescribeAccounts | Audit accounts | Log |
| 6 | DescribeDatabases | Check databases | Log |
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"ALIBABA_CLOUD_ACCESS_KEY_* env varsaliyun polardb-io DescribeDBClustersEvaluated per Alibaba Cloud Well-Architected Framework.
| Pillar | Key Guidance |
|---|---|
| Security | IAM: polardb:Describe*. VPC-only, never 0.0.0.0/0. Enable SSL. Use ADAM for migration assessment before production cutover |
| Stability | Multi-AZ deployment. Auto-failover < 30s. PITR. RTO < 15min, RPO=0. Cruise: backup, node health, account audit |
| Cost | Prepaid up to 60% off. Postpaid for migration testing. Disable unused Oracle-compatible features after migration. Decommission original Oracle after cutover |
| Efficiency | High Oracle PL/SQL compatibility reduces migration effort. ADAM for assessment. JSON output for CI/CD |
| Performance | CpuUsage > 80% scale up, < 40% down. ConnectionUsage > 80% alert. IOPSUsage > 80% alert |
polardb-io:* APIs.Thirteenth rollout of GCL per AGENTS.md §12. Inherits canonical from alicloud-polar-mysql-ops + Oracle-specific deviations. See references/rubric.md and references/prompt-templates.md.
| Aspect | Setting |
|---|---|
| Required? | Yes (Phase 1, thirteenth skill) |
max_iter | 2 |
| Engine | Oracle 11g/12c/19c |
| Oracle hot-spots | DROP USER ... CASCADE (require expdp), ALTER SYSTEM SET ... SCOPE=SPFILE (require original_value_backup), GRANT DBA (privilege escalation, require justification), DROP TABLESPACE ... INCLUDING CONTENTS (require RMAN) |
| PL/SQL risk | DDL inside BEGIN ... END; blocks — Critic must parse inner SQL |
| Credential surface | ORACLE_PASSWORD / POLARDB_ORACLE_NEW_PASSWORD env vars (NOT sqlplus user/pass@host) |
1.0.0 | 2026-06-04 | Thirteenth rollout; inherits canonical + Oracle-specific.
This skill is subject to cross-cutting rules defined by the alicloud-skill-generator meta-skill.
cli_applicability: sdk-only (CLI 不足以覆盖完整功能,必须依赖 SDK/API 方式),
the skill MUST provide assets/code-snippets/ with runnable Go SDK code.
DOES NOT APPLY — 本 skill 为 dual-path,CLI/SDK 已覆盖,无需 code snippets.Source: buhaiqing/aliyun-skills — distributed by TomeVault.