Loading...
Loading...
Alicloud CMS Dataset lifecycle management and querying skill. Covers listing, inspecting, creating, updating, deleting datasets and executing dataset queries via the aliyun CLI (CMS API version 2024-03-30). Triggers: "CMS dataset", "数据集", "创建数据集", "查询数据集", "dataset 查询", "ExecuteQuery", "CreateDataset", "GetDataset", "ListDatasets", "UpdateDataset", "DeleteDataset".
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-cms-datasetaliyunCMS Workspace + Dataset (Schema + Fields) + ExecuteQueryaliyun version3.3.3[MUST] runto enable automatic plugin installation. [MUST] runaliyun configure set --auto-plugin-install trueto ensure that any existing plugins are always up-to-date.aliyun plugin update
At the start of the Core Workflow (before any CLI invocation): [MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution.bashaliyun configure ai-mode enable aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cms-dataset"
[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed.bashaliyun configure ai-mode disable
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
is FORBIDDEN)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
in terminal or environment variables in shell profile)aliyun configure- Return and re-run after
shows a valid profilealiyun configure list
cms:ListDatasetscms:GetDatasetcms:CreateDatasetcms:UpdateDatasetcms:DeleteDatasetcms:ExecuteQuery[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this SKILLreferences/ram-policies.md- Use
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter | Required/Optional | Description | Default Value |
|---|---|---|---|
| Required | CMS workspace ID | — |
| Required (except ListDatasets) | Dataset name (4-63 chars) | — |
| Optional | Region ID | CLI profile region |
| Required (CreateDataset) | Schema JSON object | — |
| Optional | Dataset description | — |
| Required (ExecuteQuery) | Query text | — |
| Auto-filled (ExecuteQuery) | Query type placeholder. Always | |
| Optional (ListDatasets) | Max results per page | — |
| Optional (ListDatasets) | Pagination token for next page | — |
^[a-z](?!.*__)[a-z0-9_]{2,61}[a-z0-9]$[CRITICAL] Product Binding: All dataset operations in this skill use theproduct ONLY. The correct command pattern iscms. DO NOT use any other product for dataset operations —aliyun cms <action> --api-version 2024-03-30,dataworks,adb,sls,maxcompute,opensearch,pai, or any other service are WRONG for this scenario. If a command fails, check parameters and permissions — do NOT switch to a different product.dashvector
--api-version 2024-03-30--endpoint--region--region-id[MUST] Before executing any dataset operation, callto verify the workspace exists. Do NOT skip this step or use ListDatasets to infer workspace existence.get-workspace
aliyun cms get-workspace --api-version 2024-03-30 \
--workspace <workspace>put-workspacealiyun cms put-workspace --api-version 2024-03-30 \
--workspace-name <workspace> \
--sls-project <sls-project>--sls-projectaliyun cms list-datasets --api-version 2024-03-30 \
--workspace <workspace> \
[--dataset-name <filter>] \
[--max-results <n>] \
[--next-token <token>]aliyun cms get-dataset --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name>aliyun cms create-dataset --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name> \
--schema '{"message_text":{"type":"text","chn":true,"embedding":"text-embedding-v4"},"service_name":{"type":"text","chn":false}}' \
[--description "<description>"]--schematypechnembeddingjsonKeystype: "text"embeddingjsonKeystypechnembedding{
"event_data": {
"type": "text",
"chn": false,
"jsonKeys": {
"source": {
"type": "text",
"chn": false
},
"message": {
"type": "text",
"chn": true
}
}
}
}# Show current state
aliyun cms get-dataset --api-version 2024-03-30 \
--workspace <workspace> --dataset-name <dataset-name>
# Update after user confirms
aliyun cms update-dataset --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name> \
--description "<new-description>"# Show dataset to confirm
aliyun cms get-dataset --api-version 2024-03-30 \
--workspace <workspace> --dataset-name <dataset-name>
# Delete after explicit confirmation
aliyun cms delete-dataset --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name>aliyun cms execute-query --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name> \
--type SQL \
--query '<query>'--typeSQLaliyun cms delete-dataset --api-version 2024-03-30 \
--workspace <workspace> \
--dataset-name <dataset-name>| Command | Description |
|---|---|
| Verify workspace exists |
| Create or update a workspace |
| List datasets in a workspace |
| Get dataset details and schema |
| Create a new dataset with schema |
| Update dataset description |
| Delete a dataset |
| Execute a query against a dataset |
--api-version 2024-03-302019-01-01--region--region-id--endpointcms.<region>.aliyuncs.com--type SQL--schemacmsdataworksadbslsmaxcompute--read-timeout 30 --connect-timeout 10--read-timeout 120 --connect-timeout 10| Reference | Description |
|---|---|
| references/ram-policies.md | RAM permission requirements |
| references/related-commands.md | Full CLI command reference |
| references/verification-method.md | Success verification steps |
| references/acceptance-criteria.md | Correct/incorrect pattern examples |
| references/cli-installation-guide.md | CLI installation guide |