360 Secure SkillHub
360 安全技能中心

alibabacloud-support

面向阿里云售后工单的客户端:从实时目录解析产品与分类,匹配内置规则生成脱敏草稿,经逐条预览确认后创建、查看、回复、关闭和评价工单;可选推荐并运行自助排查,支持多轮确认与本地规则校验。

分类:自动化
sdk-team
sdk-team
热度 34.82
最近更新 2026-12-01 14:41:33

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add sdk-team/alibabacloud-support
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
alibabacloud-support
description
Manage Alibaba Cloud (Aliyun) after-sales support tickets, and only those: resolve the real product and category, build a redacted draft, then create, view, reply to, close, list and rate them. A matching self-service check may be offered on an A/B card; on A it runs. Use when a customer asks to open, follow up on, reply to, close or rate an Alibaba Cloud ticket, or asks for the ticket list. Triggers: "submit a ticket", "list my tickets", "view ticket status", "reply to the engineer", "close the ticket", "rate the ticket", "transfer to human support". Out of scope however it is phrased: any product that is not an Alibaba Cloud service - a smart speaker, robot vacuum, router or watch, Taobao, Tmall or Aliyun Drive, and any third-party app - plus product knowledge, troubleshooting, pricing and quota questions with no ticket intent - a fault, breach or data loss stated without asking for a ticket is not ticket intent. Never file before the customer confirms the preview.
compatibility
Requires Python 3.9+ and aliyun CLI >= 3.3.3 (verified 3.4.5 + plugin 0.9.0); install via brew or the setup script. Catalog, ticket and doctor calls use the CLI; `rules status`, `match --local-only`, `draft` and every `advisor` verb run locally. Product rules ship in the package and are never fetched at runtime. The single runtime download is a missing self-service skill from its pinned catalog coordinates, verified file by file. Credentials use the CLI default chain.
metadata
{"version":"1.9.0","openclaw":{"emoji":"🎧","homepage":"https://www.aliyun.com/service","primaryEnv":"ALIBABACLOUD_SUPPORT_HOME","requires":{"env":[],"bins":["python3","aliyun"],"os":["darwin","linux","windows"]},"install":[{"kind":"brew","formula":"aliyun-cli","bins":["aliyun"]}],"envVars":[{"name":"ALIBABACLOUD_SUPPORT_HOME","required":false,"description":"Local directory for confirmation tokens and non-rule state; rules live in the skill package and this variable does not affect them."},{"name":"ALIBABACLOUD_SUPPORT_CLI_PATH","required":false,"description":"Optional absolute path to the aliyun executable, used when the current process has not refreshed PATH."},{"name":"ALIBABACLOUD_SUPPORT_CLI_ENCODING","required":false,"description":"Optional explicit utf-8 or gb18030 decoding of aliyun CLI output, needed only when the CLI output really does not match the system preferred code page."},{"name":"ALIBABA_CLOUD_REGION_ID","required":false,"description":"Optional region used for the aliyun CLI call; defaults to cn-hangzhou, resolved through the default credential chain."},{"name":"SKILL_SESSION_ID","required":false,"description":"Optional 32-character hex session identifier reused by child processes for the User-Agent tracing value; generated automatically when absent."},{"name":"ALIBABACLOUD_SUPPORT_SKILL_INSTALL_DIR","required":false,"description":"Optional single existing directory used when a skill is installed directly; must sit inside the user's home or working directory and is never created by force. It does not move the advisor's own verified copy, which always lives under ALIBABACLOUD_SUPPORT_HOME, outside every skill discovery root."},{"name":"ALIBABACLOUD_SUPPORT_LOCAL_SKILL_DIRS","required":false,"description":"Optional path list searched for an already installed copy of a recommended self-service skill."}]}}

Alibaba Cloud Support Ticket Assistant

All Workorder operations and all self-service advisor operations go through scripts/aliyun_support.py. ABSOLUTE PROHIBITION on calling aliyun workorder ... directly, on editing the installed SKILL.md or scripts/*.py at the customer site, on downloading or executing runtime updates of this skill, and on sending any credential, UID or raw customer content to any external destination. The client is the only place that builds CLI commands, redacts content, binds confirmation tokens, matches self-service skills and verifies what it installs.

Prerequisites

  • Python 3.9+ — required for scripts/aliyun_support.py (entry script).
  • aliyun CLI >= 3.3.3 — required for every Workorder OpenAPI call (list-products, list-categories, create-ticket, list-tickets, get-ticket, reply-ticket, close-ticket, evaluate-ticket, list-ticket-notes). The plugin-mode command surface this skill invokes was introduced in aliyun CLI 3.3.3 and hardened in 3.4.x; the current verified combination is aliyun CLI 3.4.5 with the aliyun-cli-workorder 0.9.0 plugin. Install or upgrade with brew install aliyun-cli / brew upgrade aliyun-cli on macOS, or curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash on Linux; confirm with aliyun version. If the installed version is below 3.3.3 the entry script returns an not-installed diagnostic and no CLI process is spawned.

Data Flows and External Calls

The destinations below are the complete set of network endpoints present in this skill's shipped code; there are no others.

  • Workorder OpenAPI (via the aliyun CLI plugin mode, aliyun workorder <plugin-command>) — ListProducts, ListCategories, ListTickets, GetTicket, ListTicketNotes, CreateTicket, ReplyTicket, CloseTicket, EvaluateTicket. Requests carry the operation name, paging parameters and the ticket fields the user supplied and confirmed (title, category id, description, reply content, rating), plus a tracing User-Agent, and authenticate through the caller's default aliyun CLI credential chain.
  • Three public skill-publishing hosts, only for one missing self-service skill, in this order: the Alibaba Cloud skill platform https://skills.aliyun.com, then https://clawhub.ai, then the pinned commit on https://api.github.com plus https://raw.githubusercontent.com. Anonymous GET of the exact paths recorded in references/selfservice-skills.json, no credential and no customer content. An archive is unpacked in memory only, every file is re-hashed against the pinned value before anything is placed, no downloaded code is executed here, and this happens only after the customer chose the self-service option.
  • No other destination exists. Product collection rules are read from references/products-*.json inside this skill package; the skill never calls OSS and never fetches anything that is not described by the self-service catalog.

Ticket-write boundary: this skill never creates, modifies, deletes or bills any cloud resource. Its only write operations are Workorder ticket records (create, reply, close, rate), and each one requires the user's explicit confirmation of the full preview before submission. All catalog lookups, ticket status queries and rule verification are read paths that make no state change outside the ticket record itself.

Execution Principle

  1. Every customer-visible write is prepared, previewed and confirmed one ticket at a time. MANDATORY: run the matching preview-* command, show the complete preview, and only then use the returned confirmationToken for the write. The confirmation is an affirmative answer to that preview, given after it was shown. ABSOLUTE PROHIBITION on treating B, any other card-option letter, silence, a reply that was already queued before the preview existed, or any answer that is not an affirmative as that confirmation: the token proves the bytes, never the customer's yes. Ask once more in one line, and stop there. MANDATORY: after preview-create returns, send the preview, ask once whether to submit it, and end the turn without calling any further tool. The write happens only in a later turn, after the customer's affirmative answer to that preview; an instruction given before any preview existed authorises nothing, however explicit it sounded. 2. One clarification round, then no further question. Information collection never blocks a ticket. Values already in the conversation are reused. The run asks at most ONE clarification message and that message bundles every open question at once: each candidate the live catalog returned, as a numbered option in its own words, plus only the four key values when missing - region, instance or resource id, symptom detail, occurrence time. The other suggestedMissing fields are never asked of the customer; they stay defaulted and are disclosed in the draft. Never drip one field per message, never open a second round, never ask when nothing is open - and this round is separate from the three touches that keep their own places: the card (install consent), the preview (write confirmation) and the one closing check question. Bundling is not politeness: a ticket without region, instance id, the exact symptom or the occurrence time reaches an engineer who must ask for all of it, so the customer loses a whole round trip - which is why the ask is bundled rather than dropped. The assistant words the question and calls no model for it: every candidate shown is a value a script returned in this run. Unanswered values are defaulted and disclosed in the final answer. ABSOLUTE PROHIBITION on asking for a UID, account id, CreatorId or identity number — ownership comes from the aliyun CLI default credential chain. 3. Ambiguous results are never retried. A timeout, interrupt, abnormal exit or unverifiable CreateTicket response triggers exactly one non-mutating reconciliation via ListTickets plus GetTicket and nothing else; other ambiguous writes stop with an explicit "do not retry" instruction. 4. Rule matching and drafting are always offline. When a bundled rule cannot be verified or does not map to the real category, match and draft fall back to the built-in DEFAULT_ISSUE template without changing the OpenAPI-returned category. ABSOLUTE PROHIBITION on inventing categories, reusing a category id across runs, or substituting a rule-declared category for the OpenAPI result. 5. The customer reads their own language, and results rather than a trace. MANDATORY: answer in the language the customer used. From the customer's message until the card they read no progress line at all: the only messages the customer receives are the card, the draft, and conclusions in their own language. Reading this skill's own files is never announced, and no run is ever described by a preamble - not one line per step, and not one shared line either: one run is never described by several preamble messages, and a message shaped as a step report does not count as one shared allowance - never send a preamble of the form "I'll now …", "I'll load the skill first", "Now running …", "Let me check …", because each of those names an internal stage or accounts to the customer for reading this skill's own files, and the cap is one line for the whole run, not one line per tool call. A host that offers no choice control earns no extra framing - the card's fallback lines are one message, and the cap before them is the same one line. A progress line is narration about this run and nothing else: the one bundled clarification round of item 2, the card, a draft and a degradation stated once are each substantive content, are not progress lines and are not counted against the cap. When one line is not enough, send none: the cap is measurable, not stylistic, and identical in every host. 6. Customer-visible text carries no internal state. ABSOLUTE PROHIBITION, in any message the customer reads, on: a numeric identifier the customer did not say - product, category, resource, UID, or a ticket from another run; an internal field name or state value such as ruleMatched, localState, nextAction, score or readyForTicketOperations; a command or subcommand of this skill's entry script, a file path, a line number or a step number; the name of this skill's own SKILL.md, its references/ or its scripts/, and any account of reading them; a name for an internal stage - a pre-check, a self-test, a readiness probe, a match, a catalog lookup, a bundled rule or a category resolution; a product or category conclusion stated before the draft exists, where listing the candidates the customer must choose between is not a conclusion and stays required by item 2; a count of bundled rules; an account of what was already ruled out; a RAM or account principal; an engineer reply that is not already in this conversation. Every ban here holds in every message the customer reads, not only in the one progress line item 5 allows. The same ban covers an after-the-fact recap - an "Execution Summary", a "✓ Step N: … completed" list, or any enumeration of the calls this run made - because narrating the steps afterwards discloses exactly what narrating them beforehand would. A file path is banned in every shape - /home/user/…, outputs/…, ran_scripts/…, and any absolute sandbox path of this run's working directory, image name included. The product and category this run resolved are shown as names with no identifier beside them, and a degradation is stated once in the customer's own words. Every customer message is forwarded verbatim from the script's customerMessage field - advisor match returns the card's, draft returns the draft's. ABSOLUTE PROHIBITION on composing, translating, re-ordering or adding anything to that string: no preamble, no heading, no leading rule, no closing summary. A message only reporting which steps ran or where files were saved is not an answer; every other artefact belongs to the log, deleted before sending rather than reworded. A permission failure is stated as what the customer needs to do next, never as a RAM or OpenAPI action name. The complete list is the internal-field ban in references/self-service-flow.md, which applies verbatim.

Observability

Every aliyun CLI invocation carries:

  • User-Agent: --user-agent AlibabaCloud-Agent-Skills/{SKILL_NAME}/{session-id} skill-version/{version}, with SKILL_NAME = alibabacloud-support; the same value is exported to the child process through ALIBABACLOUD_USER_AGENT and ALIBABA_CLOUD_USER_AGENT.
  • skill-version: MANDATORY source of the version component is references/manifest.json (version, a semantic version string). It is read lazily when the first User-Agent is built, cached for the run and propagated on every Workorder call and every self-service fetch. ABSOLUTE PROHIBITION on hardcoding, inferring or placeholder-substituting that version: when the manifest is missing, unreadable or declares no valid semantic version, the client raises a ClientError before any process is spawned, so catalog and ticket return success: false with exit code 1 and zero cloud calls. rules status, match --local-only, draft and the advisor verbs stay available because they make no cloud call.
  • session-id: a 32-character hex string. It is read from SKILL_SESSION_ID when that variable already holds a valid 32-hex value, otherwise uuid.uuid4().hex generates one and writes it back to the process environment so nested processes share the same session id.

scripts/aliyun_support.py prints a single machine-readable JSON document on stdout and progress or degradation notes on stderr. rules status reports source, sourceType, networkFetchDisabled, skillVersion, contentDigest, listedCount, acceptedCount, rejectedCount, rejectedFiles, usableCount, partial, degraded and manifestError, so any rule degradation is visible in the output, never only in prose.

Credentials

The Workorder API is authenticated only by the aliyun CLI default credential chain (environment variables or ~/.aliyun/config.json). ABSOLUTE PROHIBITION on hardcoding, asking for, echoing, transcribing or repairing credential values, on putting secrets in command arguments, temporary files or ticket bodies, and on printing AccessKey, STS token, bearer token, cookie or private key material. Confirmation tokens are random, expiring local handles, not credentials. The confirmation-token cache and every state file are written with 0600 permissions under ALIBABACLOUD_SUPPORT_HOME.

User Confirmation

  • Installing or repairing the aliyun CLI, or writing the local OAuth configuration, needs its own explicit agreement: the first request to "submit a ticket" is not consent to install anything. After a refusal or no answer, continue with a local draft and point to the console instead of pressing.
  • aliyun configure --mode OAuth --profile default can only be run by the customer in their own interactive terminal. The agent must not execute it, capture its output, record the authorization URL, complete the login, or read the browser session.
  • Each write is bound to the exact bytes of its own preview: the token is single-use, expires after 30 minutes and is invalidated when the content or ticket status changes; reply, close and evaluate re-read the status first and stop if it moved to a terminal state.

Trigger Conditions

Use this skill when the customer expresses ticket intent about an Alibaba Cloud service: create or submit a ticket, report a fault, escalate to Alibaba Cloud support or a human agent, check the ticket list, status or engineer reply, add missing information, close or rate a ticket. Ticket intent alone is never enough - the subject must be an Alibaba Cloud service. For a consumer device such as a smart speaker, robot vacuum, router or watch, for a marketplace or drive product, and for any third-party app, say plainly that this skill only files Alibaba Cloud tickets, and stop: never resolve a product, build a draft or preview one for it. Inside an existing ticket conversation, an engineer reply that asks the customer to run a check also uses the self-service branch of this flow. Do not use it for pure product knowledge, pricing or quota discussion, or for troubleshooting that carries no ticket request - a matching self-service check in the catalog is not a reason to enter this skill. Batch operations are never triggered: creating, replying, closing or rating several tickets in one run is out of scope.

Input Parameters

Command Required Optional
doctor — --home
rules status — —
match --product-id, --category-id (from the live catalog in this run) --local-only (with --input and --product)
advisor match — --input (problem text; - or omitted reads standard input, preferred for customer content), --product (the productName step 2 read from the live catalog; decides the evidence threshold and never a word from the customer's sentence), --candidates (0-5)
advisor resolve slug --download-if-missing (only after the customer answered A) together with --consent-token (the installConsentToken this run's advisor match returned with that slug's card) and --customer-answer A; the fetch is refused in code without either. --dest does not relocate the cached copy: a verified copy always lands under this skill's state directory, never under a skill discovery root
advisor verify — --slug
draft --input (a JSON file, or - for stdin) "closingAsked": true in that JSON, only after the closing question was actually asked
catalog products — --name, --language zh|en|jp (default zh)
catalog categories --product-id --name, --language
ticket get --ticket-id —
ticket list — --days (1-3650, default 30), --page-number, --page-size (10-100), --keyword, --ticket-id
ticket preview-create / ticket create --category-id, --title, --content-file --severity (1 or 2, default 1), --confirmation-token (write only)
ticket preview-reply / ticket reply --ticket-id, --content-file --confirmation-token
ticket preview-evaluate / ticket evaluate --ticket-id, --score (1-5), --solved (true/false) --content-file, --confirmation-token
ticket preview-close / ticket close --ticket-id --confirmation-token

--content-file - and --input - read the content from standard input, so customer text never has to be written to a local file or exposed as a process argument beyond the CLI call itself. match --local-only is the explicit offline path used only when the caller cannot obtain a real category id from the OpenAPI in this run; a ticket created after local-only must state honestly that the real classification is unverified.

Module Index

  • references/ram-policies.md — verified permission model, the measured STS probe result and the least-privilege policy for the ticket operations this skill uses.
  • references/api-reference.md — the nine Workorder operations, their plugin-mode commands, parameters, verified response envelope and the exact CLI form the client builds.
  • references/error-handling.md — exit code and Success semantics, deterministic versus indeterminate failures, and the create-timeout reconciliation contract.
  • references/windows.md — MANDATORY on CMD or PowerShell: single-line command form, UTF-8 input files, shell-variable rules and token reuse.
  • references/rule-sources.md — the bundled rule loader layout, manifest integrity checks, per-file and cross-file isolation rules, and the DEFAULT_ISSUE generic-template fallback.
  • references/manifest.json — the semantic version source for the User-Agent skill-version component; must equal the script VERSION constant and rules-manifest.json's skillVersion.
  • references/rules-manifest.json and references/products-*.json — the packaged product collection rules and their per-file size and sha256 record. Loaded at every match and draft; never fetched over the network.
  • references/selfservice-skills.json — the packaged catalog of published self-service diagnosis skills: scene words, exclude words, the customer-facing name and capability, the public install coordinates and the pinned commit with per-file hashes. This is the only source of what the advisor may recommend or fetch.
  • references/selfservice-skills.md — the catalog field spec, the matching rules as implemented, the integrity model and the re-pinning procedure. MANDATORY: read it before editing the catalog or changing a threshold.
  • references/card-copy.json — the pinned customer-facing card copy that advisor match returns as cardText, plus the slot map and the rendering notes. To change what the customer reads on the card, edit this file; never reword the returned strings inside a message.
  • references/self-service-flow.md — MANDATORY reading before rendering the A/B card or acting on an answer: card template and wording rules, delivery through the host's choice control or as a message, what may never be shown, the run after A, install discipline, the closing statement and the handback contract.
  • scripts/selfservice_advisor.py — the matcher, the local resolver and the verified installer behind the advisor verbs. Called only through aliyun_support.py.

Orchestration

customer problem └─ doctor (readiness gate) └─ catalog products → catalog categories → live ProductId and CategoryId └─ match --product-id --category-id → real category and either a specific
collection rule or the DEFAULT_ISSUE generic fallback └─ advisor match → routed=true: the card alone as its own whole message; routed=false: no card, straight to the draft └─ on A: advisor resolve
<slug> --download-if-missing --consent-token <installConsentToken-from-this-run's-advisor-match> --customer-answer A → that skill's own check → findings plus the one solve question, and no draft yet; a "no" builds the draft and asks whether to file. On B: the draft now └─ draft →
validated, redacted, non-blocking ticket body → preview-* └─ customer confirmation → create | reply | evaluate | close └─ ticket get / ticket list → status, engineer reply, clickable ticket URL

There is no rule download and no self-update anywhere in this chain. The one acquisition it can perform is the pinned, hash-verified install of a missing self-service skill, and only after the customer chose A.

Execution Flow

1. Quiet preflight

python3 scripts/aliyun_support.py doctor python3 scripts/aliyun_support.py rules status

readyForTicketOperations: true gates ticket writes only; rules status, match --local-only, draft and every advisor verb run in all readiness states, so a failed login never cancels the self-service branch or the draft. The capability probe is a single offline aliyun workorder --help listing, so it sends no request and needs no credential; capabilityMatrix[].available reflects the plugin command surface, and permissionVerified: false means the write permissions were deliberately not probed.

2. Resolve the real product and category from the live catalog

Extract a short, non-sensitive product keyword from the customer's original problem — never the full log, message or resource identifier — then query the live catalog:

python3 scripts/aliyun_support.py catalog products --name <short-keyword> python3 scripts/aliyun_support.py catalog categories --product-id <ProductId-from-this-run>

The real ProductId and ProductName live inside each directory's ProductList; never treat the directory id as the product id. If the name filter returns nothing, refetch without the filter. Use a unique high-confidence result; when several categories under the same product stay plausible, pick the one the customer's own words name, or keep the generic draft, and say which was used. When the candidates are different products, settle it inside the one clarification round the Execution Principle defines, listing the catalog's own ProductName values as the numbered options, because that choice decides which engineer queue receives the ticket and only the customer can make it. ABSOLUTE PROHIBITION on auto-picking the first row, inventing a category id, or reusing a historical one.

3. Match the bundled rules against the real category

python3 scripts/aliyun_support.py match --product-id <ProductId-from-step-2> --category-id <CategoryId-from-step-2>

match re-runs the two catalog queries under the hood, verifies the id, ownership and displayed name against the real OpenAPI result, then applies the loader described in references/rule-sources.md: a rule maps only when the real product name matches the rule's product or an alias AND the real category name (after NFKC, casefold, whitespace and known product-prefix normalisation, plus a secondary "strip one trailing qualified parenthesis" attempt) matches the rule's issue type name or categoryHints. Unique mapping yields the specific collect list; no mapping, ambiguity, per-file rejection, or cross-file alias conflict yields DEFAULT_ISSUE, while category keeps the OpenAPI-verified values.

If authentication or the CLI is unavailable and the customer accepts an unverified classification, use the offline path:

python3 scripts/aliyun_support.py match --local-only --product <product-name-from-customer>

The local-only branch calls no OpenAPI, loads no specific rule and returns the generic template; any draft produced this way MUST be labelled "real classification not verified" and MUST NOT be submitted through ticket create in the same run.

3.5 Self-service match, and the one A/B card it may produce

Run the local matcher on the customer's own words, once, after the catalog is resolved and before any draft is built; on the offline branch it runs in the same place, since it needs no credential: python3 scripts/aliyun_support.py advisor match --input - --product "<productName>". --product is the productName step 2 read from the live catalog and nothing else - never a product word lifted from the customer's sentence, because a guessed label silently changes which skill is offered - and is omitted on the offline branch. --language defaults to zh, which is the language the card copy is pinned in; pass --language en when the customer writes English, and the response says so with cardText.available=false. routed=false, including reason=ambiguous_tie where two skills tied and the matcher refused to guess, means no card, no mention and no second attempt: continue straight to step 4 silently. confidence=doc is the documentation exit, which this rule - not the assistant

  • decides when no diagnosis skill matched and the customer asked a documentation question; it renders the same card. ABSOLUTE PROHIBITION on re-running the matcher with rewritten phrasing to fish for a hit: a re-worded hit presented as the recommendation is fabrication, even if both calls are disclosed.

routed=true produces exactly one card per problem, and showing it is MANDATORY: ticket intent, an already installed copy, the offline branch and the conversation branch cancel nothing - only the 24-hour ledger (card_already_offered) and an explicit customer refusal of offers do. A plain request to file a ticket is not a refusal: nearly every ticket request is phrased that way, and reading it as B is what buries the choice. The card is the whole message and nothing else - no product, no category, no draft body, no missing value, no degradation line, nothing after the B line, and at this point no draft exists to print.

MANDATORY: the card's wording is cardText in the same advisor match response, copied verbatim into the host's structured choice control - cardText.header as the control's short chip, cardText.question as its heading, and the two cardText.options in their returned order as its only two options, each with its own label and description. ABSOLUTE PROHIBITION on rewording, translating, extending, merging or re-ordering any of those strings, on adding a framing sentence or a question mark to the heading, on a third option, and on also posting the card into the chat. The heading is one single line, because the host collapses a newline inside it. cardText.localState is the disclosure the A description already carries - verified runs the copy already on this machine and installs nothing, absent and unverified install an official skill and run the check from it - so never claim an install that will not happen, never claim a local copy that does not exist, never describe either as updating, repairing or replacing the customer's own copy, and never show localState as a field, a value or a path. When cardText.available is false, or the host offers no such control, fall back to the five template lines of references/self-service-flow.md word for word, sent as their own message with nothing before or after them: a missing control licenses no rewriting, no translating those lines into the customer's language, and no closing note under them, because those five lines are the pinned copy as well. No heading goes above the card either - the message must begin with the first character of the card's own first line; any heading, rule or note before it breaks this whatever it says. Never repeat a card already sent or wrap it in a results summary. An English rendering of those lines is not the card: the pinned copy is what the customer reads, in the language it was returned in. MANDATORY: read that file's Two message shapes, its Delivery and its internal-field ban, which applies verbatim here. The same response carries installConsentToken, the internal handle that authorises the one fetch this card can lead to. MANDATORY: keep it for step 5.5 and replay it there unchanged; it is bound to this slug, spent by the first fetch and expires with the 24-hour card ledger. ABSOLUTE PROHIBITION on showing it, naming the field, asking the customer for it, or reusing one from another card or another run. --download-if-missing on its own installs nothing - the code refuses the fetch and reports the gap, so a card that was never rendered cannot lead to an install even if the flag is passed. The fetch also requires --customer-answer A, the option the customer actually chose, recorded beside the spent token as an audit trail. ABSOLUTE PROHIBITION on passing an answer the customer did not give: the code cannot tell a stated A from a fabricated one, so that honesty is yours alone. When the field is absent the offer could not be recorded, so no install is authorised: report the check as unavailable rather than passing the flag alone.

B answers this card and nothing else: it sends the flow to step 4, where the draft is built. Silence and any answer that is not A are B; neither is consent to run or install anything, and a verified local copy is not consent either, because A authorises the run, not only the install. B is never a confirmation of a preview - step 5 names what is. Never promise a duration or outcome, and never write a self-service finding into the ticket body before the customer confirmed it.

ABSOLUTE PROHIBITION on entering any self-service check before an A is on record in this conversation: no file of a recommended skill is read, no script of one is run, no step of its workflow is taken. The ban covers a source repository or development copy sitting in the workspace, in a sibling directory, or anywhere else the agent can reach with its own file tools - proximity is not presence in the catalog, and a source tree is never a verified copy. The only sanctioned entry to a check is advisor resolve after A, and the only copy it may follow is one that passed the published-content re-hash. The turn that renders the card issues no other tool call: it asks, and waits. When a card is offered it is the whole of its own message - nothing before its lines and nothing after them, no draft, no summary, no note - and a draft built in that same turn is held until the customer answers, then sent as a separate later message. A customer who names a skill and asks for that check is giving an instruction rather than answering our offer, and may be honoured.

4. Collect information and build the draft

Step 4 runs the moment the flow has a ticket to write: at once on routed=false, on B or any answer that is not A, and on an explicit upfront refusal; on the A branch only after the check has handed back and the customer said the problem is not solved (step 5.5). It never runs on the strength of the card alone. Pass match.category through unchanged; do not substitute values from the customer's text or from the rules. On the offline path - match --local-only, whose confidence is fallback and which yields no category at all - pass "category": null, which is the supported offline shape and returns the generic template with an unspecified product. ABSOLUTE PROHIBITION on hunting for a numeric product or category id to populate that object when the catalog was unreachable: do not re-query the catalog, do not read this skill's references/ for an id, and do not announce the gap to the customer. A category object that is only partly filled is rejected outright, so null is the only correct offline input:

python3 scripts/aliyun_support.py draft --input - <<'JSON' { "category": {"productId": "<ProductId-from-step-2>", "productName": "<real-product-name>", "categoryId": "<CategoryId-from-step-2>",
"categoryName": "<real-category-name>"}, "summary": "The instance cannot be reached over SSH since 2026-10-08 16:30 +08:00", "stepsTried": ["confirmed the security group allows the target port"],
"values": {"instanceId": "i-example", "regionId": "cn-hangzhou", "errorMessage": "Connection timed out"} } JSON

values carries only what the customer actually supplied - an unsupplied field is omitted or left empty, never filled with an invented timestamp, description, impact scope, identifier or error. The draft is ready: true even when suggested fields are missing; suggestedMissing improves quality and never blocks. When match returned ruleMatched: false, draft keeps the OpenAPI-verified category, switches the template to DEFAULT_ISSUE and reports one fallbackReason from the table in references/rule-sources.md. That reason value belongs in the run log. To the customer this is one plain statement in business language: the draft was built on the generic template, so its real classification is not verified and it is not submittable in this run. ABSOLUTE PROHIBITION on carrying the name fallbackReason, its value, or any field name of this skill into that message - item 6 bans them in every message the customer reads, and the business-language sentence above is what discharges the honesty requirement here; one does not license the other. If a password, AccessKey secret, token, cookie, Authorization header or private key is detected, stop and produce no submittable draft.

draft refuses twice, and both refusals are the live test's, not a hypothesis. matcher_not_run means advisor match was never called in this run, so the customer was never offered the choice - run step 3.5 and come back. closing_not_asked means a check was loaded and the flow walked into the draft without asking the customer once whether it solved the problem - ask it, then add "closingAsked": true to the draft JSON. That flag is a declaration that the question was asked; setting it without asking is a false statement to the customer, not a way around the gate. A state directory that is missing, unwritable or corrupt fails open: an unavailable record is never evidence that a step was skipped, and no ticket is held hostage to a file.

Missing key values (region, instance or resource id, symptom detail, occurrence time) are collected only inside the one bundled round of the Execution Principle, before draft is called - never a question per field, never a pause waiting for an answer: ready: true always comes back, so the chain continues on documented defaults. That no-pause rule covers the clarification round only - the write confirmation always waits. The final answer MUST carry one explicit line listing every value this run defaulted - region, severity, the generic issue template - phrased as a "filled in automatically:" sentence in the language the customer is writing in. It must sit in a message the customer reads: a table in the draft file or a line in the action log is not a disclosure, and a disclosure the customer cannot point to in the reply was not made; reuse that template's wording while restating only what the customer said, and never invent anything they did not supply - no timestamp, resource id, IP address, error code, ticket number, protocol or console behaviour - and never say the "missing information still needs to be collected": values were defaulted, nothing was invented, the draft proceeds. A call that failed and had to be corrected is part of the answer, not only of the log: state in one plain line which lookup failed, the error code it returned, and what was changed before it succeeded, then name the product and issue type the draft ended on. The answer also carries the concrete object the customer named - the URL, domain, instance, sub-account or ticket this run was about - and what became of it: filed, replied, installed, or not available. A recap that never mentions the customer's own object is not an answer about their problem.

5. Preview and wait for confirmation

python3 scripts/aliyun_support.py ticket preview-create \ --category-id <CategoryId-from-step-2> --severity 1 --title <TITLE> --content-file -

Show product, category, severity, title and the complete redacted body, and nothing that belongs to a card: this is the draft-only shape of references/self-service-flow.md — product and category with the verification state put in business language in one line - never an internal label or field name - the body, its client request id, then the one bundled clarification when values are missing. Shown at once when advisor match returned routed=false, otherwise only after the customer's answer; no process narration, no fact twice.

MANDATORY: what follows this preview is one question - submit it or not - and only an affirmative answer to this preview authorises ticket create. ABSOLUTE PROHIBITION on reading B, another card-option letter, silence, an answer that was queued before this preview existed, or anything that is not an affirmative as that confirmation. Ask once more in one line and stop; a second non-affirmative answer means the ticket is not filed, and the draft stays available. preview-create succeeding proves only that the bytes are ready - it is not a permission to write, and the confirmationToken binds the content, never the customer's yes. preview-create returns preview.content — the exact body to replay — next to preview.clientRequestId, a visible [client request id] <24 hex characters> value derived from the random confirmation token; it is not a credential and exists only to reconcile a timed-out creation. Show the request id with the preview, never remove, replace or reuse it. That id belongs to the preview message only: once the ticket exists, the answer gives the ticket number and what was filed, and does not repeat the request id, name outputs/ or ran_scripts/, or list any file this run wrote - a path is internal state under item 6, and the customer has no use for a manifest of our own working files. The client appends [client request id] <value> as the body's last line inside the create request itself, so replay preview.content unchanged and never add the marker line yourself. Titles are normalized to start with [aliyun-support], and the token is bound to the normalized title and the final body.

A create that returns a token-mismatch, a stale-content rejection or any other non-timeout failure is final for this run. ABSOLUTE PROHIBITION on calling create a second time because the first one errored: a second write is a second ticket, and exactly one create call is the whole of this step. Do not re-run preview-create on your own initiative after such a failure - a freshly minted token is not a fresh consent: state plainly that the ticket was not filed and what blocked it, and let the customer ask for a new preview. Only a request that timed out with no answer at all is reconciled, and it is reconciled with the [client request id] above, never by a blind retry.

5.5 Running the self-service check (the customer answered A)

Answering A authorises resolution, running the chosen skill's own check and installing a missing copy from the pinned, hash-verified sources - no second confirmation, no repeated card, and a request for the ticket always wins.

python3 scripts/aliyun_support.py advisor resolve <slug> --download-if-missing --consent-token <installConsentToken-from-this-run's-advisor-match> --customer-answer A
Result Action
reason=local_verified or installed_verified, nextAction=load_local The only two states worth running: the bytes at <local.path> equal the published ones, in a customer root or in the advisor cache (already_present means the cache already held them). local_verified carries no installResult at all - nothing was fetched - so never report one. Read that SKILL.md and follow its own workflow in this turn; never improvise substitute commands
decision=local_unverified, nextAction=report_gap Something claims the slug, none of it is published content, and the customer has not chosen A. Continue the ticket silently and never read that copy
ok=false, reason=install_answer_required, install_consent_required or install_consent_unavailable, nextAction=report_gap No stated A or no usable card consent is on record, so nothing was fetched and no installResult exists. Never pass an answer the customer did not give, never retry with a guessed, reused or other-slug token, and never render a second card to obtain one: one honest sentence that the check is not available right now, then hand back and continue the ticket
installResult.ok=false Every source failed: one honest sentence that the check is not available right now, then hand back — no retry, no internals, no new question

Reading the file is how a copy that advisor resolve returned gets loaded, and only that: it is never an alternative to calling advisor resolve, and never a reason to skip the card. A customer copy older than the baseline, or whose bytes do not match the published content, is never overwritten and never followed: a verified copy is fetched into this skill's own .alibabacloud-advisor-cache, under its state directory and never under a skill discovery root, and used from there, so the check still runs. Present the conclusion and 1-3 observed facts as a statement, then ask once whether it solved the problem, saying in that same line that if it did not, these findings go into the ticket - and show no draft and no preview at this moment: the check's outcome is a question, not a ticket. That answer is context the flow carries, not a permission: it decides what the next check looks at and what goes into draft.stepsTried. The draft is built only afterwards. A "no" goes to step 4 with the findings carried, and what comes back is shown as the draft-only message asking whether to file it - the preview confirmation stays the only gate a write has, so nothing is created on that answer alone; an explicit "file it" is the same decision given earlier. Silence or "yes" ends here with no draft and one line offering to file whenever they want. ABSOLUTE PROHIBITION on asking the question twice, on showing a draft or a preview as part of asking it, on making the answer a precondition of filing, and on a conclusion that is not in the attempt log or a log written anywhere but the conversation. Handback for every other outcome resumes at draft (filing) or ticket preview-reply (conversation), anchored on the command name, never on a step number; the attempted skill and what it showed go into draft.stepsTried, and ticket preview-create re-shows the complete body with a fresh token.

6. Create the ticket

After the customer confirms exactly that preview, replay preview.content unchanged:

python3 scripts/aliyun_support.py ticket create \ --category-id <CategoryId-from-step-2> --severity 1 --title <TITLE> --content-file - \ --confirmation-token <CONFIRMATION_TOKEN>

Render the ticket number as a clickable link to ticketUrl, for example [000MOCKTICKET](https://smartservice.console.aliyun.com/service/ticket-detail?ticketId=000MOCKTICKET); never return only the bare number or the raw JSON. If the response says success but no verifiable ticket id can be extracted, the client does not claim creation: it reconciles the result through the two non-mutating queries ListTickets and GetTicket inside a narrow time window, matching creation time, title, the full body including this request marker, category and severity. creationState is reconciled_after_timeout or reconciled_after_indeterminate_result only for a unique complete match; zero, several, incomplete pages or an interrupted reconciliation stop with an explicit prohibition on automatic retry and require manual verification through ticket list or the console.

7. Follow up on an existing ticket

python3 scripts/aliyun_support.py ticket list --days 30 --page-number 1 --page-size 20 python3 scripts/aliyun_support.py ticket get --ticket-id <TICKET_ID> python3 scripts/aliyun_support.py ticket
preview-reply --ticket-id <TICKET_ID> --content-file - python3 scripts/aliyun_support.py ticket reply --ticket-id <TICKET_ID> --content-file - --confirmation-token <TOKEN> python3
scripts/aliyun_support.py ticket preview-evaluate --ticket-id <TICKET_ID> --score 5 --solved true --content-file - python3 scripts/aliyun_support.py ticket evaluate --ticket-id <TICKET_ID> --score 5
--solved true --content-file - --confirmation-token <TOKEN> python3 scripts/aliyun_support.py ticket preview-close --ticket-id <TICKET_ID> python3 scripts/aliyun_support.py ticket close --ticket-id
<TICKET_ID> --confirmation-token <TOKEN>

ticket get returns both GetTicket and the full ListTicketNotes conversation. Quote engineer replies verbatim, never rewrite them, and only point to the console for attachments. Evaluate one ticket at a time with an explicit 1-5 score and an explicit solved value.

When an engineer reply asks the customer to run a check, reuse the step 3.5 gate: run advisor match once on the customer's words and offer a card only if this problem has not already had one and the matcher did not already return routed=false. The card stays its own whole message, never merged into the reply preview, and never delays ticket reply, ticket evaluate or ticket close nor re-appears after a decline.

Windows Conventions

MANDATORY on Windows (CMD or PowerShell): read references/windows.md before building any command. The python3 and heredoc forms above do not copy there, and its input-file, encoding, shell-variable and token-reuse rules are not optional.

Bundled Rule Integrity

references/rules-manifest.json is the only trusted index, contentDigest is recomputed at every load over all entries sorted by their UTF-8 path bytes, and a single damaged file isolates only itself - never "first one wins", never a partial set. The complete check list, the manifest field rules, the cross-file alias-conflict isolation and every fallbackReason value live in references/rule-sources.md, which is the file to read before touching a rule file or the manifest. ABSOLUTE PROHIBITION on relaxing any of these checks at the customer site; the rules change only when the customer installs a newer skill package. advisor verify is the equivalent gate for the self-service catalog.

Safety Boundaries

  • Bundled rules may declare only product aliases, issue types, match keywords, category hints and collection fields; anything else — URLs, commands, scripts, SQL, regular expressions, execution instructions or secret material — is rejected at load, as is any credential-shaped collection value except the five documented metadata fields. See references/rule-sources.md for the exact schema. Customer problems, collected values, drafts and replies are never written into the rule package.
  • All Workorder calls go through the aliyun CLI in plugin mode (aliyun workorder list-products, aliyun workorder create-ticket, …) with --retry-count 0, an explicit read timeout, no shell and no command history. Verified with --cli-dry-run, every Workorder operation is sent as POST and customer content travels in the request body, not in a URL query parameter. CreateTicket, ReplyTicket, CloseTicket and EvaluateTicket are never retried; the only follow-up to an indeterminate create is the non-mutating reconciliation described in step 6.
  • The aliyun CLI offers no standard-input or file transport for RPC string parameters, so the redacted title, body, reply or evaluation text is briefly visible in the local aliyun process arguments. If that local exposure is not acceptable, stop the write and use the console.
  • Batch creation, batch reply, batch close and batch evaluation are prohibited, as is any attachment upload; attachments stay in the console.
  • This skill never patches or updates itself. The only content it can fetch is the one skill named in references/selfservice-skills.json, only after the customer answered A, only from the three allowed publishing hosts in the documented order, and only after every file and the whole package hash match; nothing fetched is executed during install. No npx, no package manager, no mirror, no customer-supplied URL, no other host, no retry. Stating the public install command is text guidance and grants nothing.
  • Encoding, PATH, authentication or API problems are solved only with the documented commands, flags and environment variables.

Error Handling

Run doctor to see the Python, CLI, bundled rule and legacy environment state. A missing or unusable CLI returns readiness.state cli_missing or cli_unusable and blocks only the CLI-dependent capabilities. After authentication, treat the exit code and the boolean Success as primary and keep the redacted Code, Message and RequestId; 0 and 200 both count as success. Only an explicit Success: false is a deterministic API rejection; a missing or invalid Success, or Success: true with an error Code, is indeterminate and forbids retry. Distinguish api_probe_failed causes — expired login, network failure and insufficient RAM permission — from workorder_access_unavailable, and never fall back to another credential silently. When the bundled rule set cannot be verified, match and draft keep running on the built-in generic template and rules status reports the isolation reason honestly.

Important Notes

  • Ticket operations act on the account behind the default credential chain; state results as belonging to that account instead of claiming a global view.
  • Ticket status labels come back in Chinese from Workorder and are translated by the console (completed, awaiting your rating, closed); the client compares Status.Value and Status.Label before any write.
  • Four values must equal each other and are checked at import time: the script VERSION, references/manifest.json version, references/rules-manifest.json skillVersion and this file's metadata.version; a drift in any one invalidates every cloud call and rule load, so a release that bumps one must bump all four.
  • Timeouts are bounded on every network, CLI and subprocess call; --days, --page-size and content lengths are range-checked instead of paging indefinitely.

Examples

  • "The ECS instance in cn-hangzhou cannot be reached over SSH since this afternoon; file a ticket." → doctor, rules status, catalog products --name ecs, catalog categories, match, draft; if advisor match routes, the card first as its own message and the draft after the answer - asking to file is not a refusal, so it cancels nothing.
  • "Wait, is there something I can check myself first?" → advisor match --input -; on routed=true the one A/B card, naming the check and what A does on this machine, through the host's choice control where there is one and otherwise as its own whole message, no draft yet. On A: advisor resolve <slug> --download-if-missing --consent-token <installConsentToken> --customer-answer A, that skill's workflow, the findings and the one solve question, still no draft; a "no" then builds the draft and asks whether to file, a "yes" or silence ends with none. On B: straight to draft and the draft-only message.
  • "List my tickets from the last 30 days and show me the engineer reply of 000MOCKTICKET." → doctor, ticket list, ticket get, verbatim engineer reply, no write.
  • "Reply that the port is open now and then close it." → two previews, two confirmations, then ticket reply and ticket preview-close / ticket close, never in one batch.