Manage Alibaba Cloud MaxCompute (ODPS) Projects including creation, querying, and listing operations.
Pre-check: Aliyun CLI >= 3.3.3 required
Run
aliyun versionto verify >= 3.3.3. If not installed or version too low, runcurl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashto update, or seereferences/cli-installation-guide.mdfor installation instructions.Then [MUST] run
aliyun plugin updateto 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:
Enable AI-Mode before commands: bash
aliyun configure ai-mode enable
Set User-Agent for AI-Mode: bash
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage"
Disable AI-Mode after workflow ends: bash
aliyun configure ai-mode disable
When user asks about MaxCompute projects, follow these steps:
--region {REGION_ID} and --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageYou MUST verify ALL of these before running any command:
--region {ACTUAL_REGION_ID}--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageIf ANY check fails, STOP and fix before proceeding.
CRITICAL: You MUST complete ALL steps in order. Do NOT stop early.
Ask user: "Which region would you like to query? (e.g., cn-hangzhou, cn-shanghai)"
Ask user: "Which quota nickname to filter by? (e.g., os_PayAsYouGoQuota, or press Enter for default)"
MUST use quota-nick-name parameter:
--quota-nick-name={USER_QUOTA}--quota-nick-name=os_PayAsYouGoExecute 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
Wait for command output
If 400 error (quota not found):
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageParse response and present results
Confirm task completion
FORBIDDEN:
--marker for pagination--quota-nick-name parameterREQUIRED:
--quota-nick-name with user's quota or default--max-item=20aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-managedata.name, data.status, data.ownerAsk user: "Which region to create in? (e.g., cn-hangzhou)"
Ask user: "What is the project name?"
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."
CRITICAL: Store the user's exact project name - do NOT use placeholder text
MUST call list-quotas: Execute: aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
Wait for command output
Parse list-quotas response: Find a quota with nickName and its secondary quotas (look in data.quotas[].subQuotas or similar)
STRICT VALIDATION: Select a secondary quota's nickName from the list-quotas response (NOT the primary quota)
TRIM WHITESPACE: Remove any leading/trailing spaces from the quota nickName. If nickName contains internal spaces, trim them or select a different quota
PRE-FLIGHT CHECK: Verify you have actual values for REGION_ID, PROJECT_NAME, and SECONDARY_QUOTA_NICKNAME (trimmed, no spaces)
Ask for typeSystem (optional): "Which typeSystem? (1=MaxCompute, 2=MaxCompute2, hive=Hive compatible; default: 2)"
Validate typeSystem: Must be "1", "2", or "hive". If not specified or invalid, use default "2"
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
Wait for command output
CHECK CREATE RESPONSE: If create command returned error (non-2xx), STOP and report error to user. Do NOT proceed to verification.
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
CRITICAL: Verify the response contains the CORRECT project name (the one user requested, not a different project)
CHECK STATUS: Verify response contains "status":"AVAILABLE"
If verification returns 403/Access Denied: Inform user about permission requirements and stop
If project not found: Report "Project creation failed - project not found after creation"
If wrong project returned: Report error - do not use a different project as substitute
ONLY IF all checks pass: Confirm to user: "Project {PROJECT_NAME} created successfully with status AVAILABLE"
Respond: "Project deletion is not supported by this skill. Please use the Alibaba Cloud Console or contact your administrator."
ErrorCauseSolutionProjectNotFoundProject doesn't existCheck project name spelling and regionProjectAlreadyExistName takenAsk user for a different project nameget project default quota errorNo valid quotaRun list-quotas first, ensure quota existsInvalidProjectNameBad naming formatUse only lowercase, numbers, underscores (3-28 chars)NoPermission or 403 Access DeniedRAM permission issueInform user: "You need odps permissions for list-quotas, create-project and get-project. Please contact your administrator."RegionId requiredMissing --regionAlways add --region {REGION_ID} to commandsODPS-0420095: Access DeniedMissing read privilegeInform user about required permissions and stop
CRITICAL: Never do these:
- NEVER read/echo AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_ID)- NEVER use hardcoded values — always ask user for parameters, then use their ACTUAL answer (not placeholder text)
- NEVER use
aliyun configure setwith literal credential values- NEVER run
aliyun ramcommands- NEVER execute ANY command without
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage- NEVER skip asking for RegionId — this is ALWAYS required
- NEVER assume a default region — always ask the user
- NEVER use uppercase API action format as CLI commands — ALWAYS use plugin format with lowercase and hyphens (e.g.,
create-project)- NEVER execute
aliyun maxcompute delete-project— project deletion is NOT supported by this skill
❌ WRONG✅ CORRECTUsing uppercase API action names as CLI commandsaliyun maxcompute create-project (plugin format, lowercase with hyphens)'{"name":"{PROJECT_NAME}"}' (placeholder)'{"name":"actual-name"}' (actual value)--region cn-hangzhou (hardcoded)Ask user first, then use their answerMissing --user-agentMust include --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage``echo $ALIBABA_CLOUD_ACCESS_KEY_IDNever read/display credentialsaliyun ram ... commandsRAM commands are outside scopealiyun maxcompute delete-projectProject deletion is NOT supportedVerify different project on failureReport failure, don't substitute
text
MaxCompute Service
└── Project (Workspace)
├── defaultQuota (Compute Resource - MUST exist before project creation)
├── productType (payasyougo/subscription)
└── typeSystem ("1", "2", or "hive"; default: "2")
Prerequisite: Quota must exist before creating a project.
Every MaxCompute project requires a compute quota (
defaultQuota). The quota must already exist in your account — if it does not, thecreate-projectcall will fail withget project default quota error.Use the alibabacloud-odps-quota-manage skill to create or query quotas:
- Pay-as-you-go:
aliyun maxcompute create-quota --charge-type payasyougo --commodity-code odps --region <region> --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage- Subscription: See
alibabacloud-odps-quota-manageskill for full parameters (partNickName, CU, ord_time, etc.)- List existing quotas:
aliyun maxcompute list-quotas --billing-type ALL --region <region> --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageAfter creating or confirming a quota exists, use its
nickNameas thedefaultQuotaparameter when creating a project.
Pre-check: Aliyun CLI >= 3.3.3 required
Run
aliyun versionto verify >= 3.3.3. If not installed or version too low, runcurl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashto update, or seereferences/cli-installation-guide.mdfor installation instructions.
Pre-check: Aliyun CLI plugin update required
[MUST] run
aliyun configure set --auto-plugin-install trueto enable automatic plugin installation. [MUST] runaliyun plugin updateto ensure that any existing plugins are always up-to-date.
bash
# Install/Update Alibaba Cloud CLI
curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash
# Verify version (must be >= 3.3.3)
aliyun version
# Enable auto plugin installation
aliyun configure set --auto-plugin-install true
# Update plugins
aliyun plugin update
No additional environment variables required beyond standard Alibaba Cloud credentials.
CRITICAL: You MUST check credentials before ANY operation.
bash
aliyun configure list
What to look for:
mode: AK or mode: StsTokenaccess_key_id: ******** (masked is OK)If NO valid profile:
aliyun configure to set up credentials first."FORBIDDEN - NEVER do these:
echo $ALIBABA_CLOUD_ACCESS_KEY_IDecho $ALIBABA_CLOUD_ACCESS_KEY_SECRETaliyun configure get | grep access-key[MUST] RAM Permission Pre-check: Before executing the workflow, verify that the current user has the required permissions.
Required permissions are listed in references/ram-policies.md.
Note: You do NOT need to verify RAM permissions via CLI commands. The permissions listed in ram-policies.md are for user reference only. Proceed with the workflow assuming the user has configured appropriate permissions.
Always ask user for these values — never assume defaults:
ParameterRequiredDescriptionRegionIdYesRegion ID (cn-hangzhou, cn-shanghai, etc.)projectNameYesProject namequotaNickNameFor createQuota alias (get from list-quotas)
LIST: User asks → Agent requests RegionId → Agent executes list-projects → Agent presents results
CREATE: User asks → Agent requests RegionId → Agent requests projectName → Agent calls list-quotas → Agent creates project → Agent verifies → Agent confirms success
bash
# Ask user for quota nickname first, then:
aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
MUST: Always use --quota-nick-name parameter (user-specified or default). Never fetch all and filter locally.
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
bash
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
bash
aliyun maxcompute create-project --region {REGION_ID} --body '{"name":"{PROJECT_NAME}","defaultQuota":"{QUOTA_NICKNAME}","productType":"payasyougo"}' --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
See references/verification-method.md for detailed verification steps.
Verification Command:
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
Success Criteria:
"status":"AVAILABLE""name" matching the created project"defaultQuota" matching the specified quotaIf verification fails:
The following operations cannot be performed via CLI/API and require Console access:
OperationReasonAlternativeView billing detailsRequires Console accessUse Billing ConsoleManage IAM policies visuallyConsole-only featureUse RAM CLI for policy managementReal-time resource monitoringRequires Console dashboardUse CloudMonitor APIs
See references/related-apis.md for complete API reference.
OperationCLI Command (plugin mode)API Action NameCreate Projectaliyun maxcompute create-project``create-projectGet Projectaliyun maxcompute get-project``get-projectList Projectsaliyun maxcompute list-projects``list-projectsList Quotasaliyun maxcompute list-quotas``list-quotas
For skill_pass_rate to be successful, ALL of these MUST be true:
--region {USER_PROVIDED_VALUE} (not hardcoded)--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageLIST:
aliyun maxcompute list-projects --region {REGION} --quota-nick-name=os_PayAsYouGo --max-item=20 --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage--quota-nick-name=os_PayAsYouGo parameter for first attempt--max-item=20 parameter--quota-nick-name=os_PayAsYouGoQuotaGET:
aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageCREATE:
User was asked for RegionId and projectName (actual values obtained)
Quota was listed first: aliyun maxcompute list-quotas --billing-type ALL --region {REGION} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
MUST use actual values in body - NOT placeholders like {PROJECT_NAME}
Create command format: --body '{"name":"ACTUAL_NAME","defaultQuota":"ACTUAL_QUOTA","productType":"payasyougo"}'
MUST check create response for errors before proceeding
Verification command executed: aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage
MUST verify the project name in response matches the requested project
MUST verify status is AVAILABLE
If verification fails due to permissions (403), inform user and stop
If project not found or wrong project returned, report failure
If verification succeeds (status=AVAILABLE), confirm success to user
If user requests deletion, inform them to use Alibaba Cloud Console
text
Before responding to user, verify:
□ I followed the correct workflow for the operation type
□ I asked for ALL required parameters from user
□ I used user's actual values in commands (not placeholders or defaults)
□ I included --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage in EVERY command
□ I did NOT perform any forbidden actions
□ I reported the final result to user
If ALL checks pass → Skill execution is SUCCESSFUL
If ANY check fails → Skill execution is INCOMPLETE
You MUST verify ALL of these before telling user the task is done:
--region {USER_ANSWER} and --user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manage--user-agent AlibabaCloud-Agent-Skills/alibabacloud-odps-project-manageIf ANY check fails, the task is NOT complete.
payasyougo for development/testing, subscription for production with predictable workloads2 (MaxCompute) for new projects unless Hive compatibility is requiredDocumentDescriptionreferences/related-apis.mdComplete API referencereferences/ram-policies.mdRequired RAM permissionsreferences/verification-method.mdVerification stepsreferences/cli-installation-guide.mdCLI installation guideMaxCompute Product PageOfficial product documentationcreate-project APIAPI referenceget-project APIAPI referencelist-projects APIAPI reference