Request
Skill CloudChef/atlasclaw-providers/providers/SmartCMP-Provider/skills/request
atlasclaw-providers are the integration with enterprise systems through skills and webhook.
npx -y skills add CloudChef/atlasclaw-providers --skill requestAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Self-service request skill. Request cloud resources, application environments, ticket/work order services, or check submitted request status by Request ID. Keywords: request, provision, deploy, create VM, apply resources, submit ticket, request status, 申请资源, 创建虚拟机, 提交工单, 申请状态.
SKILL.md
42.5 KB, as published. Nobody here has run it
request
Submit cloud resource, application environment, or ticket/work order requests through the service catalog.
Flow
Eight tools exist: smartcmp_list_services, smartcmp_get_request_catalog, smartcmp_list_available_bgs, smartcmp_list_flavors, smartcmp_list_facets, smartcmp_list_resource_bundles, smartcmp_submit_request, and smartcmp_get_request_status.
Multi-resource routing boundary
This skill is for one CMP request flow at a time. That single flow may still represent one service catalog / one resource type / one shared parameter set with quantity N.
Keep the request in this skill when the user wants multiple instances of the same resource type with the same configuration, for example:
- "several identical Linux VMs for one project"
- "multiple instances of the same database service with shared parameters"
- "quantity N of one resource type with one shared parameter set"
Route to request-decomposition-agent only when the request needs to be split
into distinct sub-requests, especially when the user gives:
- multiple resource types in one ask
- per-instance differences such as "first ..., second ..., third ..."
- different specs per instance
- mixed roles/components that should become separate CMP requests
Quantity by itself is not a decomposition signal. The request workflow and
submit tool should interpret same-type quantity from the user's original
language without requiring AtlasClaw core to pre-structure resource_count.
When this boundary is hit, do not continue with the single-catalog parameter collection flow in this skill.
Single-instance vs shared-quantity contract
This skill supports two request shapes, and they are not interchangeable:
- Single-instance request: one resource type, one instance, one
resourceSpecsitem, and no top-level count field unless the selected catalog explicitly requires one. - Same-type multi-instance request: one resource type, one shared
parameter set, one explicit quantity value from the selected catalog schema
or fallback
quantity, withresourceSpecsfollowing the selected catalog schema.
For same-type multi-instance requests:
- Read the selected catalog instructions before choosing the quantity key. If
an active field in
instructions.topLevelFieldsorinstructions.paramsclearly declares instance quantity, use that exact key and location. Do not choose from a fixed alias list. - If the selected catalog does not declare a quantity/count field, use fallback
top-level
quantity. - When the selected catalog has one
instructions.resourceSpecsitem, keep one sharedresourceSpecsitem for the shared parameter set. - When the selected catalog declares multiple
instructions.resourceSpecsitems, build each declared item exactly once; do not treat the number of specs as the requested instance count. - Do not duplicate identical
resourceSpecsentries just to represent quantity N. - Do not invent per-instance names, hostnames, IPs, disk sizes, or other per-instance overrides when the user asked for shared parameters.
- If the user supplies per-instance differences, separate names for each
instance, or mixed component roles, stop using this skill and route to
request-decomposition-agent.
Do not infer decomposition solely from resourceSpecs length. A single catalog
can legitimately declare multiple resource specs. Decomposition is driven by
user semantics, such as separate CMP requests or per-instance differences, not
by a submit-script spec-count heuristic.
Submitted request status flow
Use smartcmp_get_request_status only for submitted request status or
approval-result checks. Pass an explicit Request ID when present. For "刚才提交的
申请", reuse the most recent smartcmp_submit_request Request ID in this
conversation; if none exists, ask for the Request ID. Request IDs are
user-facing values such as REQ20260501000095, RES20260501000095,
TIC20260316000001, or CHG20260413000011. Never pass UUID-shaped internal
identifiers to the status tool.
The status script returns structured fields only. Treat the tool output as
lookup data, not final user-facing text. Explain the result in the current user's message language using
state, statusCategory, approvalPassed, currentStep, currentApprover,
provisionState, error, and updatedAt.
Status semantics:
APPROVAL_PENDING: not approved yet; approval is still pending.APPROVAL_REJECTED/APPROVAL_RETREATED: not approved; rejected or returned.STARTED/TASK_RUNNING/WAIT_EXECUTE/FINISHED: approval has passed or the request has entered later execution.INITIALING/INITIALING_FAILED/FAILED/CANCELED: report the current state as initialization, failure, or cancellation; do not claim approval or rejection.
Complete flow
- Call
smartcmp_list_servicesonce. Auto-select a catalog only when the user's wording clearly matches one returned catalog; otherwise ask a numbered catalog-selection question. - Call
smartcmp_get_request_catalogonce with the selected catalog UUID to load only that catalog's generated request instructions. - Call
smartcmp_list_available_bgswith the selected catalog UUID. If one business group is returned, use it. If multiple are returned, ask a concise numbered question using display names only and wait for the user's selection. Do not show business group IDs to the user. - Before asking for request fields, check the selected catalog metadata. If a
ticket/work-order catalog (
serviceCategory: "GENERIC_SERVICE") hasinstructions.genericRequest, build from that metadata. If a cloud/resource catalog has noinstructions.resourceSpecsbut its selected catalog metadata hastype: "cloudchef.nodes.Compute", use the Compute fallback below. If it has no Markdown and is not Compute, stop and explain that the catalog is missing generated Markdown instructions. - Build the request from the selected catalog's generated Markdown metadata:
instructions.resourceSpecs,instructions.genericRequest, andinstructions.topLevelFields. - Ask only for active required fields with no default, plus fields explicitly
marked
ask: true. Defaults are used silently. - Show a JSON preview and ask for confirmation.
- After the user confirms, call
smartcmp_submit_requestwith the preview JSON.
Steps 1 through 3 are mandatory for every new request. Never ask the user to type a
business group before calling smartcmp_list_available_bgs.
Catalog identity contract
- Displayed service list numbers are conversation choices only. Resolve them
against the latest
smartcmp_list_servicesresult. - Preserve each returned
indexwhen displaying a filtered subset; never renumber catalog choices in the assistant response. - A catalog-selection question MUST show the exact returned
indexat the start of every option line, for example3. LinuxOS. Never ask the user to reply with a number unless those numbers are visible in the response. catalogIdmust be the selected catalog metadata UUID, never the displayed list number and neversourceKey.- After catalog selection, the next tool call must be
smartcmp_get_request_catalogwith that UUID. After the selected catalog detail returns, callsmartcmp_list_available_bgswith the same UUID. - There is no catalog questionnaire/default-property/preview tool in this skill. Do not invent one.
Tool sequencing
- One lookup tool call per turn.
- Mandatory catalog discovery is the exception: when the initial list has one
clear automatic match,
smartcmp_list_servicesmay be followed bysmartcmp_get_request_catalogand thensmartcmp_list_available_bgsin the same user turn. When the user must choose a catalog, stop after the list and continue with detail plus business-group lookup after their selection. smartcmp_get_request_catalogis a schema-loading step, not a user-facing lookup. It may be followed bysmartcmp_list_available_bgsin the same turn so catalog selection does not create an empty conversational round trip.- After a lookup tool result, summarize the resolved result in natural language and ask at most one next question.
- Do not paste raw tool output,
_internalmetadata, UUID dumps, or JSON meta blocks into the reply. - If the previous assistant message asked the user to choose a business group and the user replies with a bare number or group name, treat it as a business group selection, never as an unsupported operation.
- In a tool-required turn after a business group selection, call
smartcmp_list_available_bgsagain with the same selected catalog UUID to refresh the business group list, resolve the user's selection against that result, then continue with generated Markdown, Compute fallback, or the JSON preview. - During request building, do not call datasource-only tools such as
smartcmp_list_components,smartcmp_list_applications, orsmartcmp_list_images. The selected catalog metadata and generated Markdown are the request contract.
User Response Language
- Use the current user's language for user-facing replies.
- Keep JSON keys, API fields, catalog names, provider names, and tool names unchanged.
- In Chinese user-facing text, always call SmartCMP resource pools
资源池. Never call them资源包. Keep API field names such asresourceBundleIdandresourceBundleTagsunchanged inside JSON or code.
Generated Markdown Instructions
Catalog instructions is expected to be the Markdown generated by the Java
catalog instruction builder. For request building, only these sections are in
scope:
# Request Parameter Instructions: YAML parameter contract.# Request Instructions: optional request-building guidance.
smartcmp_get_request_catalog exposes the selected catalog's parsed
# Request Parameter Instructions YAML as metadata:
instructions.topLevelFieldsinstructions.topLevelRequiredinstructions.paramsinstructions.genericRequestinstructions.resourceSpecsinstructions.requestInstructionsfrom exactly# Request Instructions, when that section exists
Ignore old JSON instruction payloads. Do not use instructions.parameters or
legacy raw params as the request schema. Use instructions.params only when
it is parsed from # Request Parameter Instructions.
Instruction section boundary
The catalog Markdown body may contain multiple instruction sections, such as
# Request Parameter Instructions, # Request Instructions,
# Preapproval Instructions, or other future sections. For this request skill,
only # Request Parameter Instructions and # Request Instructions are in
scope.
- Read
# Request Parameter Instructionsfirst; it is the authoritative schema contract. - The
# Request Instructionssection is optional. If it is absent, use# Request Parameter Instructionsonly. - For free-form Markdown instructions, read only the content under exactly
# Request Instructions. - Stop reading request instructions at the next same-level heading that starts
with
#, such as# Preapproval Instructions. - Never fall through to
# Preapproval Instructionsor any other section when# Request Instructionsis missing. - Ignore all other sections for request building. They must not change required
fields, defaults,
whenbehavior, resource tag handling, payload shape, or submit/preview behavior. - A catalog body with only
# Preapproval Instructionshas no request-body instructions. It is still requestable only if# Request Parameter Instructionscontains enough request schema metadata.
Markdown field rules
- Top-level JSON always includes
catalogId,catalogName,businessGroupId, andname. - For same-type multi-instance requests with shared parameters, fill the
selected catalog's declared quantity field in its exact declared location. If
none exists, use fallback top-level
quantity. KeepresourceSpecsaligned to the selected catalog schema; for a single-spec catalog, use one sharedresourceSpecs[]item. - Quantity alone does not require decomposition; per-instance differences do.
- Generated field attributes belong in
# Request Parameter Instructions, not in the# Request Instructionsprose. Keep field metadata such astype,required,defaultValue,default_value,when,ask,label,description,source, lookup hints, and selectable values on the declared field itself. - If an active field declares static
options, use optionidas the payload value and display option labels only as user-facing help. - Do not add a second field-property list after body text such as "Do not
invent fields that are not declared in
# Request Parameter Instructions." Treat the body as generic request guidance only. - If
topLevelFields.name.ask: trueand the user has not supplied a name, ask for the request/resource name. Do not auto-generate it. - Do not include
userLoginId;submit.pyinjects it. - Put root request fields declared in
instructions.params.<key>under the top-level JSON objectparams.<key>. These are catalog form fields fromcatalog.form_definition_id, not resource spec fields. - Root
instructions.paramsfields follow the same active-field rules as resource fields: evaluatewhen, use defaults silently, show staticoptions, ask only for active required/no-default orask: truefields, and omit inactive or empty optional fields. - Do not put root
instructions.paramsfields intoresourceSpecs[].params. Do not putresourceSpecs[].paramsfields into the top-levelparamsobject. - For ticket/work-order catalogs (
serviceCategory: "GENERIC_SERVICE") withinstructions.genericRequest, build agenericRequestobject instead ofresourceSpecs. Putinstructions.genericRequest.descriptionatgenericRequest.description. Put fields declared underinstructions.genericRequest.processForm.<key>atgenericRequest.processForm.<key>. Follow the same active-field rules: evaluatewhen, use defaults silently, ask only for active required/no-default orask: truefields, and omit inactive or empty optional fields. - For each
instructions.resourceSpecs[], create oneresourceSpecs[]item and copynodeandtypeexactly when present. - Treat field schemas declared directly on
instructions.resourceSpecs[], other thannode,type,resourceBundleId,resourceBundleTags,resourceBundleParams, andparams, as direct resource spec fields. Put each active value directly on the sameresourceSpecs[]item as<key>. These fields are for special resources such as Compute/VM, where SmartCMP expects values likecomputeProfileId,flavorId,logicTemplateId,templateId,credentialUser,credentialPassword,networkId,securityGroupIds, orsystemDiskatresourceSpecs[]level rather than underparams. - Preserve each direct field's declared type from Markdown. In particular,
serialize Compute
securityGroupIdsas a JSON array of security group id strings, even when only one security group is selected; never serialize it as a single string or comma-separated string. - Direct resource spec fields declared with
type: "object"must be serialized as JSON objects atresourceSpecs[]level. For ComputesystemDisk, preserve the object shape from Markdown or user input, for example"systemDisk": {"size": <disk size>}. Never serializesystemDiskas a raw number or string, and never move it underparams. - For direct Compute fields, use the exact field names declared by generated
Markdown, such as
computeProfileName,cpu, andmemory. Do not replace them with alternate fields such ascomputeProfileIdunless the selected catalog declares those alternate fields. - Do not create or consume a literal
fieldsobject. Direct resource spec fields must be declared directly oninstructions.resourceSpecs[]. - Put
resourceBundleTagsat the same level asresourceBundleId,resourceBundleParams, andparamsin Markdown. If it is active and has nodefaultValue/default_value, callsmartcmp_list_facetsafter business group selection withnode_typefrom that spec'stype, then ask the user to choose resource tags. Serialize selected values atresourceSpecs[].resourceBundleTagsas["<facet.key>:<option.key>"]. resourceBundleTagsandresourceBundleIdare mutually exclusive for the sameresourceSpecs[]item. If both are declared and active, useresourceBundleTagsand omit bothresourceBundleIdandresourceBundleParams.- If
resourceBundleId.defaultValueexists and no activeresourceBundleTagsis used for that spec, put that value atresourceSpecs[].resourceBundleId. - If an active
resourceBundleIdhas no default and no activeresourceBundleTags, callsmartcmp_list_resource_bundlesafter business group selection and ask the user to choose one. Use the selected bundleidatresourceSpecs[].resourceBundleId. - For
smartcmp_list_resource_bundles, passbusiness_group_idfrom the selected business group,node_typefromresourceSpecs[].type, andcomponent_typefrominstructions.componentType/ catalogcomponent_type, falling back to catalogsourceKeyonly when generated Markdown does not declare it. - Put
resourceBundleParams.<key>values underresourceSpecs[].resourceBundleParams.<key>. resourceBundleParamsis only for defaulted resource-pool placement fields declared there, such asavailable_zone_idandresource_group_id. Include those fields only when they already have a non-empty default value. Do not ask the user for missingresourceBundleParams; omit them instead. VPC, VSwitch, subnet, security group, and other network configuration fields must be underresourceSpecs[].paramsunless generated Markdown declares them directly on the resource spec, such as ComputenetworkIdandsecurityGroupIds.- Put
params.<key>values underresourceSpecs[].params.<key>. - External API lookup fields such as VPC, VSwitch, subnet, security group, and table-async selections, including direct Compute lookup fields, should appear in generated Markdown only when they already have a non-empty default. If old Markdown still declares one of these lookup fields without a default, omit it and do not ask the user for an internal id.
- Use
defaultValue/default_valuesilently. Do not ask the user whether to modify a default. - When an active field has static
options, always show the option labels and ids as user-facing help when collecting remaining fields or showing the preview summary. This applies even when the field has a default. Do not ask a blocking question only for that defaulted field, but make alternatives clear so the user can override the default before confirmation. - Format defaulted static options like:
地址类型: 默认 internet(公网);可选:internet=公网,intranet=私网. - Ask only when an active required field has no default, or when a field has
ask: true, except missingresourceBundleParamsvalues, which are omitted. - Optional fields without a user value or non-empty default are omitted.
- Never serialize metadata keys such as
type,required,defaultValue,default_value,when,source,label,ask, oroptions.
when rules
- Evaluate
whenbefore asking or serializing a field. - If
whenis false, the field is inactive: do not ask for it and do not include its default. - Evaluate from already resolved values in the same spec.
- Treat unquoted right-hand words as string literals:
AddressType == intranetmeansAddressType == "intranet". - Boolean values use
trueandfalse. - If the user explicitly provides a value for a field with a default, use the
user value and re-evaluate dependent
whenfields.
Request shape
{
"catalogId": "<selected catalog UUID>",
"catalogName": "<selected catalog name>",
"businessGroupId": "<selected business group id>",
"name": "<user-provided request name>",
"quantity": 3,
"resourceSpecs": [
{
"node": "<from instructions.resourceSpecs[].node>",
"type": "<from instructions.resourceSpecs[].type>",
"resourceBundleId": "<from resourceBundleId default or selected resource pool id>",
"resourceBundleTags": ["<facet.key>:<option.key>"],
"resourceBundleParams": {
"<key>": "<active value>"
},
"<directResourceSpecKey>": "<active value>",
"params": {
"<key>": "<active value>"
}
}
],
"params": {
"<key>": "<active value from instructions.params>"
}
}
Omit empty objects. Do not move resourceBundleId into either top-level
params or resourceSpecs[].params, do not put declared resourceBundleParams
fields inside any params, and do not put network fields inside
resourceBundleParams. Never include resourceBundleId or
resourceBundleParams when resourceBundleTags is used in the same spec. Do
not serialize a fields wrapper. Serialize each active direct resource-spec
field schema as resourceSpecs[].<key>. Same-type multi-instance requests must
use the catalog-declared quantity field or fallback quantity; never duplicate
identical resourceSpecs[] entries just to represent quantity. Catalogs that
declare multiple resourceSpecs should include each declared item once.
For Compute, securityGroupIds must be an array, for example
"securityGroupIds": ["sg-xxxxxxxx"].
For Compute, systemDisk must be an object, for example
"systemDisk": {"size": <disk size>}.
Ticket/work-order generated Markdown request shape:
{
"catalogId": "<selected catalog UUID>",
"catalogName": "<selected catalog name>",
"businessGroupId": "<selected business group id>",
"name": "<user-provided request name>",
"genericRequest": {
"description": "<active value from instructions.genericRequest.description>",
"processForm": {
"<key>": "<active value from instructions.genericRequest.processForm>"
}
}
}
Omit genericRequest.processForm when no form fields are declared or active.
Business-Group Resolution
- Use
smartcmp_list_available_bgsas the authoritative source. - If the user already specified a tenant / 租户 / 部门 / BU / 项目 and it uniquely matches an available business group, use that business group.
- If multiple groups remain, ask one concise numbered question with group names only. Do not display business group UUIDs.
- Use the selected business group's
idas top-levelbusinessGroupId. - If a request name is still missing when asking for business group selection,
ask for both in the same sentence, for example:
请回复业务组编号和资源名称,例如:2 slbtest01.
Service Selection
- Call
smartcmp_list_servicesonce at the start of a new request. - Match user wording against the returned catalog name and service category.
- If the result contains zero catalogs, report that no matching published catalog exists and stop the request workflow.
- If multiple catalogs could match, ask a numbered catalog-selection question.
- When the user selects by number, resolve the number to the selected catalog
metadata UUID, then call
smartcmp_get_request_catalogwith that UUID before any catalog-dependent lookup or request-field assembly.
Runtime Lookups
Use extra lookup tools only when generated Markdown requires or explicitly asks for a value that cannot be taken from the user or a default.
smartcmp_list_facets: use only when generated Markdown declares an activeresourceBundleTagsfield without a default. Passnode_typefromresourceSpecs[].type. Build tag values as["<facet.key>:<option.key>"]from the API response.smartcmp_list_resource_bundles: use only when generated Markdown declares an activeresourceBundleIdfield without a default and no activeresourceBundleTagsfield. Pass the selected business group id,component_type, andnode_type. The tool applies fixedstrategy=RB_POLICY_STATIC,enabled=true, andreadOnly=falsefilters.smartcmp_list_flavors: use only when generated Markdown declares an active required compute-profile field without a default and the value must be chosen from SmartCMP flavor data, or when the selected catalog is a no-Markdown Compute fallback and the user provided a spec such as2c4g.- Do not call those tools for fields that already have active defaults.
Facet lookup result handling
After smartcmp_list_facets returns, treat the result as selectable resource
tag data only:
- Do not call
smartcmp_list_componentsor any other datasource tool to interpret facet results. - Do not display raw facet records,
id,aspects,createdBy, timestamps, lock versions, deleted flags, or JSON meta blocks. - Use the compact
FACET_METAdata from the tool result. The payload shape is[{ "key": "<facet key>", "label": "<display label>", "options": [{ "key": "<option key>", "label": "<display label>" }] }]. - If the user already supplied a tag/environment word, match it against facet
option
keyorlabel. If exactly one option matches, use it. - If exactly one active facet and one option are available, use that option.
- Otherwise ask one concise numbered question using display labels only, for
example:
请选择资源环境:1. 开发 2. 测试 3. 生产. - When asking the facet question, stop and wait for the user's answer. Do not show a JSON preview in the same reply.
- Store selected tags only as
"<facet.key>:<option.key>"strings inresourceSpecs[].resourceBundleTags.
Missing Markdown
If a cloud/resource catalog has no instructions.resourceSpecs, use Compute
fallback only when the selected catalog metadata explicitly has
type: "cloudchef.nodes.Compute". For other cloud/resource catalogs, do not
guess provider-specific request fields and do not submit. Explain that the
catalog is missing generated Markdown instructions.
Compute fallback
This fallback keeps legacy Linux VM / Windows VM catalogs usable while newer cloud component catalogs use generated Markdown.
Use Compute fallback only when all of these are true:
- The selected catalog has no
instructions.resourceSpecs. - The selected catalog metadata has
type: "cloudchef.nodes.Compute". - Business group has already been resolved through
smartcmp_list_available_bgs.
Compute fallback sequence:
- Ask for missing request
nameanddescription, plus VM login user/password if they were not provided. MaskcredentialPasswordin previews. - Call
smartcmp_list_facetswith the selectedbusinessGroupIdto choose resource pool tags. Use returnedfacet.keyand option key, not display labels. - Call
smartcmp_list_flavorswhen the user supplied a spec such as2c4g, or ask the user to choose a flavor if no unambiguous match exists. Use the flavoridascomputeProfileId. - Build one
resourceSpecs[]item using selected catalognodeandtypewhen present.
Compute fallback JSON shape:
{
"catalogId": "<selected catalog UUID>",
"catalogName": "<selected catalog name>",
"businessGroupId": "<selected business group id>",
"name": "<user-provided request name>",
"description": "<user-provided request description>",
"resourceSpecs": [
{
"node": "<selected catalog node, when present>",
"type": "cloudchef.nodes.Compute",
"resourceBundleTags": ["<facet.key>:<option.key>"],
"computeProfileId": "<flavor id>",
"credentialUser": "<user-provided login user>",
"credentialPassword": "<user-provided login password>"
}
]
}
For ticket/work-order catalogs (serviceCategory: "GENERIC_SERVICE") without
generated instructions.genericRequest Markdown, submit only this minimal shape
after collecting name and description:
{
"catalogId": "<selected catalog UUID>",
"catalogName": "<selected catalog name>",
"businessGroupId": "<selected business group id>",
"name": "<user-provided request name>",
"genericRequest": {
"description": "<user-provided description>"
}
}
Submit Contract
Before submit:
- Show a short summary in the user's language.
- Show
JSON 预览/JSON Previewwith a fenced JSON block. - Mask
credentialPasswordas"******". - Ask the user to confirm.
- Stop. Do not call
smartcmp_submit_requestuntil the user confirms.
After confirmation:
- User says yes → call
smartcmp_submit_requestwithjson_body. - User says no → ask what to change.
- Any field added or changed after a preview or failed submission changes the request payload and invalidates every earlier confirmation. Show the updated summary and JSON preview, then ask for fresh confirmation before the next submit attempt.
- A bare number is a selection for the latest displayed list unless the immediately previous assistant message displayed a JSON preview and asked for confirmation.
Interaction Rules
smartcmp_list_servicesat most once per request conversation.smartcmp_get_request_catalogonce after catalog selection and before catalog-dependent lookups or request-field assembly.smartcmp_list_available_bgsis normally called once after catalog selection. It may be called one extra time only to resolve a user's business group selection in a tool-required turn.- Never claim submitted unless
smartcmp_submit_requestactually executed. - Never display raw internal metadata to the user.