Claude
Skills
Sign in
Back

alibabacloud-odps-project-manage

Included with Lifetime
$97 forever

Alibaba Cloud MaxCompute Project Management Skill. Use for creating, querying, and listing MaxCompute projects. Triggers: "maxcompute project", "odps project", "create maxcompute project", "manage maxcompute project", "list maxcompute project".

Cloud & DevOps

What this skill does


# MaxCompute Project Management

Manage Alibaba Cloud MaxCompute (ODPS) Projects including creation, querying, and listing operations.

## Prerequisites

**Pre-check: Aliyun CLI >= 3.3.3 required**
> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,
> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to update,
> or see `references/cli-installation-guide.md` for installation instructions.
>
> Then [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local machine are always up-to-date.

**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include:
`--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`

**[MUST] AI-Mode Commands** — When using aliyun CLI, declare AI-Mode lifecycle:
1. **Enable AI-Mode before commands:**
   ```bash
   aliyun configure ai-mode enable
   ```
2. **Set User-Agent for AI-Mode:**
   ```bash
   aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage"
   ```
3. **Disable AI-Mode after workflow ends:**
   ```bash
   aliyun configure ai-mode disable
   ```

## Quick Start

When user asks about MaxCompute projects, follow these steps:

1. **Identify intent**: create / list / get
2. **Get RegionId**: Ask user which region (e.g., cn-hangzhou, cn-shanghai)
3. **Execute**: Run the appropriate command with `--region {REGION_ID}` and `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
4. **Verify**: Confirm the result and report to user

## Pre-flight Checklist (Execute BEFORE every command)

**You MUST verify ALL of these before running any command:**

- [ ] I have asked the user for RegionId (not using default)
- [ ] I have the actual RegionId value from user (not placeholder)
- [ ] My command includes `--region {ACTUAL_REGION_ID}` 
- [ ] My command includes `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
- [ ] I am NOT reading or echoing any AK/SK values
- [ ] I am NOT using hardcoded values for user-provided parameters

**If ANY check fails, STOP and fix before proceeding.**

## Task Completion Checklist

**CRITICAL: You MUST complete ALL steps in order. Do NOT stop early.**

### For LIST Projects:
1. [ ] Ask user: "Which region would you like to query? (e.g., cn-hangzhou, cn-shanghai)"
2. [ ] Ask user: "Which quota nickname to filter by? (e.g., os_PayAsYouGoQuota, or press Enter for default)"
3. [ ] **MUST use quota-nick-name parameter:**
   - If user specified a quota: Use `--quota-nick-name={USER_QUOTA}`
   - If user didn't specify: Use `--quota-nick-name=os_PayAsYouGo`
4. [ ] **Execute with REQUIRED parameters:**
   ```bash
   aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
   ```
5. [ ] Wait for command output
6. [ ] **If 400 error (quota not found):**
   - Call `aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
   - Present available quotas to user for selection
   - Re-run list-projects with user-selected quota
7. [ ] Parse response and present results
8. [ ] Confirm task completion

**FORBIDDEN:**
- ❌ Use `--marker` for pagination
- ❌ Fetch all projects then filter locally with Python/jq
- ❌ Call API without `--quota-nick-name` parameter

**REQUIRED:**
- ✅ ALWAYS use `--quota-nick-name` with user's quota or default
- ✅ ALWAYS use `--max-item=20`
- ✅ Let API do server-side filtering

### For GET Project:
1. [ ] Ask user: "Which region? (e.g., cn-hangzhou)"
2. [ ] Ask user: "What is the project name?"
3. [ ] Execute: `aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
4. [ ] Wait for command output
5. [ ] Parse the JSON response - look for `data.name`, `data.status`, `data.owner`
6. [ ] Present project details to user in a clear format
7. [ ] Confirm task completion to user

### For CREATE Project:
1. [ ] Ask user: "Which region to create in? (e.g., cn-hangzhou)"
2. [ ] Ask user: "What is the project name?"
3. [ ] **MANDATORY VALIDATION:** If project name is empty or whitespace, STOP and ask user again: "Project name cannot be empty. Please provide a valid project name."
4. [ ] **CRITICAL:** Store the user's exact project name - do NOT use placeholder text
5. [ ] **MUST call list-quotas:** Execute: `aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
6. [ ] Wait for command output
7. [ ] **Parse list-quotas response:** Find a quota with `nickName` and its **secondary quotas** (look in `data.quotas[].subQuotas` or similar)
8. [ ] **STRICT VALIDATION:** Select a **secondary quota's nickName** from the list-quotas response (NOT the primary quota)
9. [ ] **TRIM WHITESPACE:** Remove any leading/trailing spaces from the quota nickName. If nickName contains internal spaces, trim them or select a different quota
10. [ ] **PRE-FLIGHT CHECK:** Verify you have actual values for REGION_ID, PROJECT_NAME, and SECONDARY_QUOTA_NICKNAME (trimmed, no spaces)
11. [ ] **Ask for typeSystem (optional):** "Which typeSystem? (1=MaxCompute, 2=MaxCompute2, hive=Hive compatible; default: 2)"
12. [ ] **Validate typeSystem:** Must be "1", "2", or "hive". If not specified or invalid, use default "2"
13. [ ] Execute create command with ACTUAL values:
    ```bash
    aliyun maxcompute create-project --region {ACTUAL_REGION} --body '{"name":"ACTUAL_PROJECT_NAME","defaultQuota":"SECONDARY_QUOTA_NICKNAME","productType":"payasyougo","typeSystem":"TYPE_SYSTEM_VALUE"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
    ```
    **Example with real values:**
    ```bash
    aliyun maxcompute create-project --region cn-hangzhou --body '{"name":"my-project-123","defaultQuota":"os_PayAsYouGoQuota_sub","productType":"payasyougo","typeSystem":"2"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
    ```
14. [ ] Wait for command output
15. [ ] **CHECK CREATE RESPONSE:** If create command returned error (non-2xx), STOP and report error to user. Do NOT proceed to verification.
16. [ ] **ONLY IF create succeeded:** Verify by executing: `aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage`
17. [ ] **CRITICAL:** Verify the response contains the CORRECT project name (the one user requested, not a different project)
18. [ ] **CHECK STATUS:** Verify response contains `"status":"AVAILABLE"`
19. [ ] **If verification returns 403/Access Denied:** Inform user about permission requirements and stop
20. [ ] **If project not found:** Report "Project creation failed - project not found after creation"
21. [ ] **If wrong project returned:** Report error - do not use a different project as substitute
22. [ ] **ONLY IF all checks pass:** Confirm to user: "Project {PROJECT_NAME} created successfully with status AVAILABLE"

### If User Requests Deletion:
Respond: "Project deletion is not supported by this skill. Please use the Alibaba Cloud Console or contact your administrator."

## Common Errors & Solutions

| Error | Cause | Solution |
|-------|-------|----------|
| `ProjectNotFound` | Project doesn't exist | Check project name spelling and region |
| `ProjectAlreadyExist` | Name taken | Ask user for a different project name |
| `get project default quota error` | No valid quota | Run list-quotas first, ensure quota exists |
| `InvalidProjectName` | Bad naming format | Use only lowercase, numbers, underscores (3-28 chars) |
| `NoPermission` or `403 Access Denied` | RAM permission issue | Inform user: "You need odps permissions for list-quotas, create-project and get-project. Please contact your administrator." |
| `RegionId requir

Related in Cloud & DevOps