Alibabacloud Quickbi Smartq
by @sdk-team
Quick BI-SmartQ skill with multiple data analysis capabilities: 1. **File Q&A**: Upload Excel/CSV files for intelligent analysis via Quick BI API 2. **Datase...
This skill uses a layered configuration architecture, separating user configuration from the skill package. Skill package updates will NOT overwrite user configuration.
> convention: In this document, refers to the absolute path of the folder the user currently has open in the IDE / file manager. The Agent MUST confirm this path before the first operation by running a Python script with os.getenv('CODE_AGENT_CURRENT_SESSION_WORK_DIR'). If the script returns nothing or empty, use the absolute path of the folder selected by the user. MUST NOT infer using $PWD, $CWD, or Path.cwd() or similar runtime variables.
>
> convention: In this document, refers to the root directory of this skill after installation (i.e. the directory containing this SKILL.md file). The Agent can infer it from the path of this file.
Configuration Loading Priority (higher overrides lower)
1. Environment variable ACCESS_TOKEN (highest priority, suitable for container deployment)
2. Workspace-level configuration
3. QBI global configuration ~/.qbi/config.yaml (shared by all skills)
4. Default configuration default_config.yaml inside the skill package (package defaults, updated with the package)
server_domain, api_key, api_secret, and user_token can be placed in the workspace-level configuration or the global configuration. When both exist, the workspace-level configuration takes priority.
Configuration Item Descriptions
server_domain: Quick BI service domainapi_key / api_secret: OpenAPI authentication key pair (if not configured, built-in defaults are used for trial mode)user_token: Quick BI platform user ID; the Q&A interface requires userId (if not configured, it is registered automatically and written back)If use_env_property: true is enabled, the configuration can be overridden through the qbi_api_key, qbi_api_secret, qbi_server_domain, and qbi_user_token fields in the ACCESS_TOKEN environment variable JSON.
Automatic Trial Credential Registration
When neither api_key nor api_secret is configured (regardless of whether user_token exists), the script will:
1. If user_token is also not configured, print a friendly message informing the user that trial credentials will be registered automatically and trial mode will begin
2. Use built-in default credentials to populate api_key and api_secret
3. Automatically register a user based on the device's unique identifier and write the userId to the global configuration ~/.qbi/config.yaml (not affected by skill package updates)
> Note: user_token existing alone in the global configuration (from automatic trial registration) will NOT prevent trial credential population. ONLY when api_key or api_secret exists in an external configuration will the trial flow be skipped.
Trial expiration is controlled by the server-side interface through error code AE0579100004 — no local tracking is required.
Custom Configuration Guidance
When users want to use their own Quick BI account credentials (rather than trial credentials), sign in to the Quick BI console, click the avatar option "Copy skill configuration with one click", as shown below:
> Show the configuration screenshot to the user based on current locale: > - zh_CN: !Copy Skill Config > - en_US: !Copy Skill Config
After copying, paste the configuration to the Agent. The Agent will automatically write server_domain, api_key, api_secret, and user_token into the workspace-level configuration (and decide whether to sync to the global configuration based on the save_global_property switch).
clawhub install alibabacloud-quickbi-smartq