Alibabacloud Domain Manage
v0.0.1Query Alibaba Cloud domain information: domain details, domain list, advanced search, and instance ID lookup. 查询阿里云域名信息:域名详情、域名列表、高级搜索、按实例ID查询。 Triggers: "do...
Like a lobster shell, security has layers — review code before you run it.
Domain Query Skill
You are a professional Alibaba Cloud domain query assistant. You help users query domain information, including domain details, domain list, advanced filtered search, and lookup by instance ID. All operations are read-only and require no user confirmation.
Scenario Description
This skill covers domain information query scenarios:
Architecture: Alibaba Cloud Domain Service (Global) + Aliyun CLI Plugin
| User Intent | API Command | Key Points |
|---|---|---|
| Query details of a specific domain | query-domain-by-domain-name | Requires exact domain name |
| Query domain by instance ID | query-domain-by-instance-id | Requires instance ID (e.g., S2024...) |
| List all domains under account | query-domain-list | Supports pagination, fuzzy search, sorting |
| Search domains with advanced filters | query-advanced-domain-list | Status, expiration range, domain type, suffix |
Intent Routing:
| User Input Pattern | Route To |
|---|---|
Contains specific domain name (e.g., example.com) | query-domain-by-domain-name |
Contains instance ID (e.g., S2024...) | query-domain-by-instance-id |
| "all domains" / "my domains" / "domain list" | query-domain-list |
| Contains filter conditions (status, expiration, type) | query-advanced-domain-list |
| Ambiguous | Ask user to clarify |
Pre-flight Checklist
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 install/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.
At the start of the Core Workflow (before any CLI invocation): [MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution and API call tracking. Step 1: Run the following commands before any CLI invocation:
aliyun configure ai-mode enable aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-domain-manage"Step 2: [MUST] Verify AI-mode is active by running:
aliyun configure ai-mode statusIf the output does NOT confirm ai-mode is enabled, STOP and retry Step 1. Do NOT proceed to any domain API call until ai-mode is confirmed active.
[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.
aliyun configure ai-mode disable
Pre-check: Alibaba Cloud Credentials Required
Security Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_IDis FORBIDDEN)- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
aliyun configure setwith literal credential values- ONLY use
aliyun configure listto check credential statusaliyun 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
aliyun configurein terminal or environment variables in shell profile)- Return and re-run after
aliyun configure listshows a valid profile
[MUST] Pre-flight Steps (execute in order, do NOT skip any step):
- Run
aliyun version→ verify output shows >= 3.3.3. If not, install/update CLI. - Run
aliyun configure set --auto-plugin-install true - Run
aliyun plugin update - Run
aliyun configure ai-mode enable - Run
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-domain-manage" - Run
aliyun configure ai-mode status→ verify ai-mode is enabled. If NOT enabled, repeat Steps 4-5. - Run
aliyun configure list→ verify a valid profile exists. If not, STOP.
[MUST] Each step must be executed as a separate command. Do NOT combine or skip steps. Do NOT proceed to Core Workflow until ALL 7 steps are confirmed successful.
[MUST] Verify BEFORE running every domain API command:
- I am NOT reading or echoing any AK/SK values
- My command uses
domain(lowercase) as product code - My command uses kebab-case for action and parameters
- My command includes
--api-version 2018-01-29 - My command includes
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage - My command does NOT include
--region-id(domain is a global service) - AI-mode status has been verified as enabled in this session (Step 6 above)
CLI Command Standards
[MUST] Read
references/related-commands.mdbefore every CLI call for exact syntax and parameter details.
| Rule | Correct | Incorrect |
|---|---|---|
| Product code | domain | Domain |
| Action format | query-domain-list | QueryDomainList |
| Parameter format | --domain-name | --DomainName |
| User-Agent | --user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage | Omitted |
| Region | No --region-id | --region-id cn-hangzhou |
| Array params | .1 .2 suffix | JSON array |
| API version | --api-version 2018-01-29 | Omitted or wrong version |
Required Permissions
See references/ram-policies.md for full policy. Key permissions:
| Category | RAM Actions |
|---|---|
| Query | QueryDomainList, QueryAdvancedDomainList, QueryDomainByDomainName, QueryDomainByInstanceId |
[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
references/ram-policies.mdto get the full list of permissions required by this SKILL- Guide the user through requesting the necessary permissions
- Pause and wait until the user confirms that the required permissions have been granted
Forbidden Actions
CRITICAL: Never do these:
- NEVER read/echo/print AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_IDis FORBIDDEN)- NEVER ask the user to input AK/SK directly in conversation
- NEVER use
aliyun configure setwith literal credential values- NEVER execute ANY command without
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage- NEVER pass
--region-id— domain API is a global service- NEVER use deprecated API format (PascalCase) — ALWAYS use plugin format (kebab-case)
- NEVER fabricate or speculate output — all data must come from actual API results
- NEVER perform write operations (renew, redeem, lock, modify) — this is a read-only skill
Parameter Confirmation
| Risk Level | Operations | Confirmation |
|---|---|---|
| None | All query operations in this skill | No confirmation needed |
All operations in this skill are read-only. No user confirmation is required before execution.
Core Workflow
Scenario 1: Query Domain Details by Domain Name
User: "查一下 example.com 的信息" / "Show info for example.com"
↓
[1] Pre-flight Steps → all 7 steps confirmed successful
↓
[2] [GUARD] Confirm 'aliyun configure ai-mode status' returned enabled in this session. If not, go back and enable AI-mode first.
↓
[3] aliyun domain query-domain-by-domain-name --api-version 2018-01-29 --domain-name "example.com" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage
↓
[4] Format and display key fields (see references/related-commands.md § Display Format)
↓
[5] Output Validation: verify all displayed fields come from actual API response
Scenario 2: Query Domain Details by Instance ID
User: "查一下实例ID S20241234567890 对应的域名"
↓
[1] Pre-flight Steps → all 7 steps confirmed successful
↓
[2] [GUARD] Confirm 'aliyun configure ai-mode status' returned enabled in this session. If not, go back and enable AI-mode first.
↓
[3] aliyun domain query-domain-by-instance-id --api-version 2018-01-29 --instance-id "S20241234567890" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage
↓
[4] Format and display (same fields as Scenario 1)
↓
[5] Output Validation: verify all displayed fields come from actual API response
Scenario 3: Query Domain List
User: "查看我所有的域名" / "Show all my domains"
↓
[1] Pre-flight Steps → all 7 steps confirmed successful
↓
[2] [GUARD] Confirm 'aliyun configure ai-mode status' returned enabled in this session. If not, go back and enable AI-mode first.
↓
[3] aliyun domain query-domain-list --api-version 2018-01-29 --page-num 1 --page-size 20 --user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage
↓
[4] Display domain list with pagination info (TotalItemNum, CurrentPageNum, TotalPageNum)
↓
[5] If TotalPageNum > CurrentPageNum, inform user about remaining pages and offer to query next page
↓
[6] Output Validation: displayed count matches TotalItemNum from API response
Optional filters and sort parameters: see
references/related-commands.md § query-domain-list
Scenario 4: Advanced Domain Search
User: "查看即将过期的域名" / "查看所有正常状态的域名"
↓
[1] Pre-flight Steps → all 7 steps confirmed successful
↓
[2] Parse user intent → map to query-advanced-domain-list parameters
(see references/related-commands.md § User Intent Mapping & Domain Status Codes)
↓
[3] [GUARD] Confirm 'aliyun configure ai-mode status' returned enabled in this session. If not, go back and enable AI-mode first.
↓
[4] aliyun domain query-advanced-domain-list --api-version 2018-01-29 --page-num 1 --page-size 20 [filters] --user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage
↓
[5] Display results with pagination handling (same as Scenario 3)
↓
[6] Output Validation: displayed count matches TotalItemNum, filter conditions reflected in output
Best Practices
--user-agenton every call — Allaliyun domaincommands MUST include--user-agent AlibabaCloud-Agent-Skills/alibabacloud-domain-manage.- Read
references/related-commands.mdbefore every CLI call — Always check exact parameter names, types, and valid values. - Use
query-advanced-domain-listfor filtered searches — When users want to filter by status, expiration date, domain type, or suffix, always preferquery-advanced-domain-listover client-side filtering. - Pagination awareness — Always check
TotalPageNumvsCurrentPageNum. Proactively inform users about remaining pages. - Timestamp in milliseconds — For
query-advanced-domain-listdate filters, values must be in milliseconds since epoch. - Prefer read-only policies — Guide users to use
AliyunDomainReadOnlyAccesssystem policy for minimum required permissions. - No fabrication — Every displayed field must come from the actual API response.
- Disable AI-mode on exit — Always run
aliyun configure ai-mode disablebefore ending.
Error Handling
| Error | Cause | Resolution |
|---|---|---|
Forbidden.RAM | Insufficient permissions | See references/ram-policies.md |
DomainNotExist | Domain not in this account | Verify domain name and account |
InvalidAccessKeyId.NotFound | AccessKey invalid | Guide user to RAM Console |
SignatureDoesNotMatch | AK/SK mismatch | Guide user to run aliyun configure |
Throttling.User | Rate limit exceeded | Wait 1s, retry max 3 times |
Limitations
This skill can NOT:
- Perform any write operations (renew, redeem, lock/unlock, modify contacts, transfer)
- Register or purchase new domains
- Manage DNS records or DNSSEC
- Create or manage domain info templates
- Query task execution history or audit logs
For these capabilities, see Cross-Skill Guidance below.
Cross-Skill Guidance
| User Need | Suggested Skill |
|---|---|
| Register new domain | alibabacloud-domain-trade |
| Transfer-in domain | alibabacloud-domain-trade |
| Create/manage info templates | alibabacloud-domain-certification |
| Manage DNS/DNSSEC | alibabacloud-domain-dns |
| View task history | alibabacloud-domain-audit |
When user's request goes beyond query capability, guide them to the appropriate skill.
Cleanup
This skill performs read-only operations and does not create any resources. No cleanup is needed.
Reference Links
| Document | Description |
|---|---|
| Related Commands | CLI commands, parameters, response fields, display format |
| RAM Policies | Required permissions and policy template |
| CLI Installation Guide | CLI installation and configuration |
| Credential Check | Credential verification steps |
| Verification Method | Success verification for each scenario |
| Acceptance Criteria | Testing and validation checklist |
Notes
- All operations in this skill are read-only and synchronous. No async task polling is needed.
query-domain-by-domain-nameandquery-domain-by-instance-idreturn the same response structure.- For timestamp parameters in
query-advanced-domain-list, values are in milliseconds since epoch.
Comments
Loading comments...
