licell CLI Skill
Use the licell CLI as a structured deployment and operations tool for Alibaba Cloud.
Scope
- This file teaches an agent how to drive
licellsafely. - It is not the canonical command reference.
- If a detail can be discovered from CLI help or catalog output, prefer the CLI over this file.
Operating Contract
- Do not guess command names, flags, argument order, or result fields.
- Discover commands with
licell catalog --output json. - Read per-command usage with
licell <command> --help --output json. - Execute real work with
licell <command> --output json. - For streamed output, parse only lines prefixed with
@@LICELL_JSON@@. - Prefer structured fields like
nextActions[],result,error, anddetailsover human-readable console text. - If the task is mutating or destructive, inspect help first and follow the command's structured guidance.
- Verify
kindbefore trusting a record shape, and then verifyschemaVersion. - Do not scrape plain-text terminal output when
--output jsonis available. - Do not assume one command's result shape applies to another; read the command's help contract first.
- If the user requires Licell-only execution and both curated commands and protocol capabilities are missing, report the capability gap. Do not inspect Licell package internals or credential files, and do not write ad hoc SDK scripts to bypass Licell.
- Never parse or pass
cs.DescribeClusterUserKubeconfigoutput to an Agent orkubectl;[REDACTED]is an intentional security boundary. Use a curatedk8scommand, and report a capability gap when no safe command exists.
Preconditions
licellis installed and on PATH.- Authentication is configured, usually via
licell login. - If the command operates on a project, run it inside the target repo or initialized workspace.
Canonical Invocation Sequence
licell catalog --output json
licell <command> --help --output json
licell <command> --output json
Use the first command for discovery, the second for contract lookup, and the third for execution.
Natural-Language Intent Routing
- The Agent owns natural-language understanding. Extract the service/product, action, resource, region, identifiers, and constraints; do not treat the full user sentence as CLI syntax.
- Always inspect
licell catalog --output jsonfirst. When a curated command covers the outcome, inspect its help contract and execute it. - If no curated command covers the outcome, run
licell capability products <service> --output json, thenlicell capability search --product <code> --intent "<action resource>" --action <action> --output json. - Keep capability search input concise. Use
inspect|create|update|delete|executefor--actionand use the resource name for--intent. - Describe the selected candidate with
licell capability describe <ref> --output json. Followexecution.preferred; do not infer execution from prose or API names. - Do not conclude that Licell cannot handle an Alibaba Cloud request until both the curated catalog and the matching raw protocol capability space have been searched.
- Raw reads may execute after required inputs are resolved; raw write operations require
--dry-runreview and explicit--yes. - After a mutation, follow
nextActions[]and perform a read-back verification before reporting success.
Schema Contracts
- Raw CLI JSON output is emitted line-by-line with the
@@LICELL_JSON@@prefix. Each record currently conforms tolicell-cli-record@1.0, then branches bytype=event|result|error. - For
licell <command> --help --output json, readhelp.kindandhelp.schemaVersion; the current contract islicell-help@1.0. - For
licell catalog --output json, readkindandschemaVersion; the current catalog contract islicell-agent-command-catalog@1.0. licell catalog --output jsonalso declares the help schema and CLI record schema explicitly:licell-help@1.0/licell-cli-record@1.0.- Read
catalog.agentWorkflowfor the curated-first natural-language routing contract. Only conclude a request is unsupported after curated command discovery and raw capability search both fail. - Agents should prefer
nextActions[]as the stable next-step surface;recommendedFlow,decisionGuide, andremediation[]are supporting guidance layers. - For command-specific business payloads, keep reading the command help/catalog
resultdescriptor; the three sections below only describe the shared CLI record envelope.
CLI Event Record · licell-cli-record@1.0
- Streaming CLI event record for progress tracking, log bridging, and stage-aware automation.
kind: Fixed tolicell-cli-record.schemaVersion: CLI record schema version; currently1.0.type: Fixed toevent.ts: Event timestamp in ISO 8601 format.command: Current command key, such asdeployoross upload.stage: Stable stage identifier, such asdeploy,deploy.api, orauth.restore.action: Stable action identifier, such asrun,execute, orstdout.status:start/ok/failed/skipped/info.source:command/console/stream.terminal: Whether this event marks the terminal state of the current action.ok(optional): Present only on terminal success/failure events;truemeans success andfalsemeans failure.message(optional): Human-readable supplemental message.data(optional): Additional structured context object.stream(optional): Stream type whenaction=stdout|stderr.
CLI Result Record Envelope
- Successful CLI result envelope; command-specific payload fields should still be read from the corresponding help/catalog
resultdescriptor. kind: Fixed tolicell-cli-record.schemaVersion: CLI record schema version; currently1.0.type: Fixed toresult.ts: Result timestamp in ISO 8601 format.command: Current command key.stage: Command stage identifier; usually aligned with the command key or sub-stage.ok: Fixed totrue.
CLI Error Record
CLI error envelope with compatibility remediation/nextCommands plus the preferred
nextActionssurface.kind: Fixed tolicell-cli-record.schemaVersion: CLI record schema version; currently1.0.type: Fixed toerror.ts: Error timestamp in ISO 8601 format.command: Current command key.stage: Error stage, such asparse,runtime, ordeploy.ok: Fixed tofalse.error: Stable error object.code: Stable error code, such asCLI_INVALID_INPUTorAUTH_MISSING_CREDENTIAL.category:auth/permission/input/network/quota/conflict/not_found/internal.message: Primary error message.retryable: Whether the error is suitable for direct retry.
provider(optional): Alibaba Cloud provider-side context.service(optional): Cloud product name, such asfc,oss, oralidns.action(optional): Cloud API action name.code(optional): Original cloud-side error code.requestId(optional): Cloud-side requestId.httpStatus(optional): Cloud-side HTTP status code.endpoint(optional): Resolved cloud API endpoint.
details(optional): Additional structured error context.remediation[]: Compatibility remediation suggestions.type: Suggestion type, such asnoteorcommand.title: Remediation title.reason: Why this action is recommended.commandTemplate: Suggested command template.commandKey(optional): Stable command key when the command can be matched from the CLI registry.commandDescription(optional): Matched command description.phase: Remediation phase, such asinspect,mutate, orverify.priority:primary/secondary.order: Stable sort order.
nextCommands[]: Compatibility command suggestions.commandTemplate: Suggested command template.commandKey(optional): Stable command key when the command can be matched from the CLI registry.description(optional): Command suggestion description.intent: Command intent, such asinspect,repair, orbind.priority:primary/secondary.
nextActions[]: Preferred unified next-step suggestions.title: Next action title.description: Why this action is recommended.commandTemplate: Suggested command template.commandKey(optional): Stable command key when the command can be matched from the CLI registry.phase: Action phase, such asinspect,verify, ormutate.priority:primary/secondary.source: Action source, such aserror-remediation.
When parsing strictly, match
kindfirst and then verifyschemaVersion; if a higher unknown version appears, fall back to a compatibility path instead of assuming the old shape.