Datasource
Skill CloudChef/atlasclaw-providers/providers/SmartCMP-Provider/skills/datasource
atlasclaw-providers are the integration with enterprise systems through skills and webhook.
npx -y skills add CloudChef/atlasclaw-providers --skill datasourceAssembled 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
Discovery skill. Browse SmartCMP reference data such as service catalogs, business groups, tenant/租户/部门/BU/项目 scopes, applications, OS templates, images, and generic resource details before submitting a request. Standalone business-group discovery belongs here; standalone resource-pool and resource browsing still use their dedicated skills.
SKILL.md
12.0 KB, as published. Nobody here has run it
datasource
Reference data discovery skill (read-only).
Purpose
Query and browse reference data as standalone read-only operations. Use when
user wants to explore available options without submitting a request. This
skill owns standalone business-group scope discovery. Dedicated
resource-pool and resource skills still handle standalone resource-pool
and resource browsing.
Terminology Mapping
Treat SmartCMP business group as a generic organizational scope. Users may
describe the same concept as:
- tenant
- 租户
- 部门
- BU
- Department
- 项目
- Project
Resolve these terms against SmartCMP business-group data unless the user is
clearly referring to some other system-level tenant concept. Mirror the user's
wording in replies when it helps readability, but keep the SmartCMP field names
businessGroupName and bgId when calling scripts or building request data.
Trigger Conditions
Activate this skill when user intent matches:
| Intent | Keywords |
|---|---|
| View catalogs | "show catalogs", "list services", "available services" |
| View business-group scopes | "show business groups", "show tenants", "查看租户", "查看部门", "查看项目" |
| List applications | "list applications", "show apps" |
| List OS templates | "list OS templates", "available OS" |
| List images | "list images", "available images" |
| Show resource details | "resource details", "show resource", "analyze resource data" |
NOT for: Resource provisioning -> use request skill instead.
NOT for: Direct "查询资源池", "查看所有资源", "查看所有云主机", or
"查看某个云主机详情" requests -> use resource-pool or resource.
Scripts
Most scripts are located in scripts/.
| Script | Description | Arguments |
|---|---|---|
scripts/list_all_business_groups.py | List all business-group scopes (tenant / 租户 / 部门 / BU / 项目) from the standalone UI directory endpoint | [QUERY_VALUE] |
scripts/list_services.py | List published service catalogs; the request skill also uses its internal exact-detail mode | [KEYWORD] or --catalog-id <CATALOG_ID> |
scripts/list_resource.py | List resource evidence by resource ID from /nodes/{resourceId}/view first, with legacy resource fallback | <RESOURCE_ID> [RESOURCE_ID ...] |
../shared/scripts/list_applications.py | List applications for a selected business group | <BUSINESS_GROUP_ID> |
../shared/scripts/list_components.py | List component metadata for a catalog sourceKey | <SOURCE_KEY> |
../shared/scripts/list_images.py | List image options for a selected resource pool and logic template | <RESOURCE_BUNDLE_ID> <LOGIC_TEMPLATE_ID> <CLOUD_ENTRY_TYPE> |
scripts/list_resource.py emits resource.data as the canonical SmartCMP
resource evidence pack and also emits a normalized type + properties view per
resource. It currently calls PATCH /nodes/{resourceId}/view because SmartCMP
exposes this read-only view through PATCH; switch to GET after the CMP API bug
is fixed. If /view is unavailable or returns no data, fallback to
GET /nodes/{resourceId} and GET /nodes/{resourceId}/details; preserve the
primary /view error in errors. If fallback provides resource data, keep
fetchStatus=ok and set fallbackUsed=true.
Environment Setup
Option 1: Direct Cookie
# PowerShell - CMP_URL auto-normalizes (adds /platform-api if missing)
$env:CMP_URL = "<your-cmp-host>" # e.g., "cmp.example.com" or "https://cmp.example.com/platform-api"
$env:CMP_COOKIE = '<full cookie string>'
# Bash
export CMP_URL="<your-cmp-host>"
export CMP_COOKIE="<full cookie string>"
Option 2: Auto-Login (Recommended)
Automatically obtains and caches cookies (30-minute TTL). Auth URL is auto-inferred.
# PowerShell
$env:CMP_URL = "<your-cmp-host>"
$env:CMP_USERNAME = "<username>"
$env:CMP_PASSWORD = "<password>"
# Bash
export CMP_URL="<your-cmp-host>"
export CMP_USERNAME="<username>"
export CMP_PASSWORD="<password>"
Workflow Examples
Example 1: List Business-Group Scopes
User: "Show available tenants or projects"
python scripts/list_all_business_groups.py
Output: Numbered list + ##BUSINESS_GROUP_DIRECTORY_META_START## ... ##BUSINESS_GROUP_DIRECTORY_META_END##
Example 2: List Available Catalogs
User: "Show available catalogs"
python scripts/list_services.py
Output: Numbered list + ##CATALOG_META_START## ... ##CATALOG_META_END##
Example 3: Show Resource Details
User: "Show resource details for ID X"
python scripts/list_resource.py <resource_id>
This calls PATCH /nodes/{resourceId}/view first. resource.data is the
evidence pack passed to standalone IT Ops skills. If the primary view fails,
the script falls back to the older resource/detail APIs. If fallback provides
resource data, the result remains fetchStatus=ok with fallbackUsed=true.
Data Flow
scripts/list_all_business_groups.py [query_value]
-> standalone business-group scope discovery
scripts/list_services.py [keyword]
-> (catalogId, sourceKey)
scripts/list_services.py --catalog-id <catalog_id>
-> exactly one normalized catalog detail for internal request-skill use
Output Meta Blocks
| Script | Meta Block |
|---|---|
scripts/list_all_business_groups.py | ##BUSINESS_GROUP_DIRECTORY_META_START## ... ##BUSINESS_GROUP_DIRECTORY_META_END## |
scripts/list_services.py | ##CATALOG_META_START## ... ##CATALOG_META_END## |
Critical Rules
All operations are read-only - no data is created or modified.
Scripts are shared with the
requestskill.
Standalone directory queries for all business-group scopes belong to
datasource. Standalone resource-pool and resource browsing belong toresource-poolandresource.
On error (
[ERROR]), report to user immediately; do NOT self-debug.
Error Handling
| Error | Resolution |
|---|---|
401 / Token expired | Ask user to refresh cookie |
| Missing arguments | Check script usage in docstring |
References
- WORKFLOW.md - Detailed script usage and query flows