1. List the OBS (Object Storage Service) buckets of a Huawei Cloud account through the KooCLI obsutil-backed OBS module (`hcloud OBS ls`, the read-only ListBuckets operation), with an automatic fallback to the official huaweicloudsdkobs v1 SDK (`ObsClient.list_buckets`) when hcloud is not installed. 2. Export the bucket list into a well-formed local `.xlsx` workbook via openpyxl (headers 桶名称 / 创建时间 / 区域 / 存储类别 / 桶策略, optional summary row) — strictly local file generation, nothing is ever written back to OBS. `--output` sets the file path (default `obs_buckets_<region>_<timestamp>.xlsx`). 3. Three output modes: `--format xlsx` (default) / `table` / `json`. Region aware: `--region` (default cn-north-4) selects the OBS endpoint; optional `--endpoint` overrides it. `--page-size` caps the returned count. 4. Explicit error classification: missing AK/SK credentials (「缺少 AK/SK 凭证」), hcloud not installed (falls back to SDK, else a clear hint), invalid/insufficient credentials (403 / InvalidAccessKeyId → IAM hint), and generic API/network failures. Empty bucket lists produce a friendly hint and never a corrupt .xlsx. 5. Built-in write-intent guard: any mutating intent (create / delete / upload / download / copy / remove / restore / sync / modify …) or any operation other than the read-only `ls` is rejected before execution — this skill is strictly read-only. 6. Triggers include: "查询 OBS 生成 Excel", "OBS 桶列表导出 Excel", "obs excel", "导出 OBS 桶列表为 Excel", "桶列表报表", "桶清单 Excel", "OBS bucket list excel", "export OBS buckets to excel", "桶报表". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, parsing, xlsx format correctness, empty lists, error classification, SDK fallback, and the write-intent guard.
---
name: huawei-cloud-obs-list-excel
description: |
1. List the OBS (Object Storage Service) buckets of a Huawei Cloud account
through the KooCLI obsutil-backed OBS module (`hcloud OBS ls`, the
read-only ListBuckets operation), with an automatic fallback to the
official huaweicloudsdkobs v1 SDK (`ObsClient.list_buckets`) when hcloud
is not installed.
2. Export the bucket list into a well-formed local `.xlsx` workbook via
openpyxl (headers 桶名称 / 创建时间 / 区域 / 存储类别 / 桶策略, optional summary
row) — strictly local file generation, nothing is ever written back to
OBS. `--output` sets the file path (default
`obs_buckets_<region>_<timestamp>.xlsx`).
3. Three output modes: `--format xlsx` (default) / `table` / `json`. Region
aware: `--region` (default cn-north-4) selects the OBS endpoint; optional
`--endpoint` overrides it. `--page-size` caps the returned count.
4. Explicit error classification: missing AK/SK credentials (「缺少 AK/SK
凭证」), hcloud not installed (falls back to SDK, else a clear hint),
invalid/insufficient credentials (403 / InvalidAccessKeyId → IAM hint),
and generic API/network failures. Empty bucket lists produce a friendly
hint and never a corrupt .xlsx.
5. Built-in write-intent guard: any mutating intent (create / delete / upload
/ download / copy / remove / restore / sync / modify …) or any operation
other than the read-only `ls` is rejected before execution — this skill is
strictly read-only.
6. Triggers include: "查询 OBS 生成 Excel", "OBS 桶列表导出 Excel", "obs excel",
"导出 OBS 桶列表为 Excel", "桶列表报表", "桶清单 Excel", "OBS bucket list excel",
"export OBS buckets to excel", "桶报表".
7. Offline unit tests (mocked hcloud subprocess) cover output modes, parsing,
xlsx format correctness, empty lists, error classification, SDK fallback,
and the write-intent guard.
tags: [huawei-cloud, obs, storage, readonly, koo-cli, excel, xlsx]
---
# Huawei Cloud OBS Bucket List → Excel Export
## Overview
Query the OBS bucket list of a Huawei Cloud account through KooCLI's
obsutil-backed OBS module (`hcloud OBS ls` — the read-only ListBuckets
operation), with a fallback to the official `huaweicloudsdkobs` v1 SDK, and
export the result into a local **.xlsx** workbook (openpyxl). The skill is
aimed at resource inventory, daily operations patrol, and Excel-report style
deliverables.
Architecture:
```text
agent → python3 scripts/list_obs_buckets_excel.py → hcloud OBS ls [-limit=N] [-e=obs.<region>.myhuaweicloud.com]
→ Huawei Cloud OBS OpenAPI (ListBuckets) → parsed buckets → export_xlsx (openpyxl) → .xlsx / table / json
(hcloud binary missing) → fallback: huaweicloudsdkobs v1 ObsClient.list_buckets
(missing openpyxl) → run scripts/ensure_env.py (auto pip install)
```
Key properties:
- **Read-only by design** — the only API ever invoked is ListBuckets (GET). A
write-intent guard scans user arguments and validates the operation name;
mutating intents (create / delete / upload / download / copy / remove /
restore / sync ...) are rejected with an explicit message before any command
runs. The Excel file is generated on the **local filesystem only** — no OBS
write happens.
- **CLI first, SDK fallback** — KooCLI is the primary execution path; when the
hcloud binary is absent, the script falls back to the official
`huaweicloudsdkobs` SDK (`list_buckets`). Credentials are read from the
hcloud/obsutil profile or the SDK environment — never handled by the script.
- **Well-formed .xlsx** — a fixed header row (桶名称 / 创建时间 / 区域 / 存储类别 /
桶策略) plus one data row per bucket, with an **optional summary row**
(`--summary`) showing the total bucket count. The workbook is saved via a
temporary file + atomic rename, so an interrupted write never leaves a
corrupt/partial .xlsx behind.
- **No broken files** — an empty bucket list, missing credentials or a
permission failure print an explicit hint on stdout/stderr and **do not**
produce a .xlsx file.
- **Offline-testable** — every code path (parsing, output modes, xlsx format,
error classification, guard, SDK fallback) is covered by unit tests that mock
the hcloud subprocess.
> **Capability boundary:** this skill lists **buckets only**. It does not list
> objects inside a bucket, does not report bucket quota/usage, and does not
> export object-level inventories. Those require a separate skill/Issue.
Out of scope: every mutating OBS action (bucket create/delete, object
upload/download/copy/delete, ACL/policy/encryption/lifecycle changes) and any
write of the Excel file back into OBS.
## Prerequisites
1. **Python 3.8+** with `openpyxl` — run
`python3 scripts/ensure_env.py` to install it automatically (also installs
`huaweicloudsdkcore` / `huaweicloudsdkobs` for the SDK fallback). See
[references/cli-installation-guide.md](references/cli-installation-guide.md).
2. **KooCLI (`hcloud`) installed with the obsutil component** — see
[references/cli-installation-guide.md](references/cli-installation-guide.md).
Alternative: `pip install huaweicloudsdkcore huaweicloudsdkobs` to enable the
SDK fallback path.
3. **obsutil credentials configured out-of-band** — the `hcloud OBS` module
reads AK/SK/endpoint from the obsutil config file (`~/.obsutilconfig`),
separate from the KooCLI account profile. Never paste AK/SK into chat; the
script never reads, echoes, or stores secrets itself.
4. **IAM permission** — read-only `obs:bucket:list` (or the `OBS ReadOnlyAccess`
system policy); least-privilege policy in
[references/iam-policies.md](references/iam-policies.md).
5. **Outbound HTTPS** access to `obs.<region>.myhuaweicloud.com`.
## Workflow
1. **(Optional) prepare the environment** — `python3 scripts/ensure_env.py`
installs any missing dependency (openpyxl / SDK).
2. **Confirm the target region** (default `cn-north-4`); it selects the OBS
endpoint.
3. **Confirm hcloud/obsutil readiness** (optional, read-only):
`hcloud OBS ls -limit=1` (or `hcloud version`).
4. **Run the script** with the desired output mode (`--format xlsx` for the
worksheet, `table` / `json` otherwise).
5. **Read the result** — for `xlsx`, the printed path is the generated report;
hand that file/路径 to the user. For table/json, display the result.
6. **Handle the empty / error cases** per the Error Handling table below.
## Core Commands
```bash
# Default: query the account's buckets and generate an .xlsx report in cwd
python3 scripts/list_obs_buckets_excel.py
# Specify region and an explicit output path (recommended)
python3 scripts/list_obs_buckets_excel.py --region cn-north-4 \
--output /tmp/obs_buckets_cn-north-4.xlsx
# Append a summary row (total bucket count)
python3 scripts/list_obs_buckets_excel.py --summary
# Plain table / JSON for humans / tooling
python3 scripts/list_obs_buckets_excel.py --format table
python3 scripts/list_obs_buckets_excel.py --format json
# Custom endpoint / capped count
python3 scripts/list_obs_buckets_excel.py --region cn-south-1 --page-size 50
```
Equivalent direct KooCLI command (the script wraps exactly this call):
```bash
hcloud OBS ls -limit=1000 -e=obs.cn-north-4.myhuaweicloud.com
```
## Parameter Confirmation
| Parameter | Required | Description | Example |
| ----------- | ---------- | ------------- | --------- |
| `--region` / `-r` | No | Huawei Cloud region (default `cn-north-4`); selects the OBS endpoint | `cn-south-1` |
| `--format` / `-f` | No | Output mode: `xlsx` (default) / `table` / `json` | `--format table` |
| `--output` / `-o` | No | .xlsx file path (only used with `--format xlsx`; default `obs_buckets_<region>_<timestamp>.xlsx`) | `/tmp/report.xlsx` |
| `--summary` | No | Append a summary row (桶数量 / N) to the xlsx worksheet | `--summary` |
| `--page-size` | No | Maximum number of buckets to return (default 1000) | `50` |
| `--endpoint` | No | Override the OBS endpoint (default `obs.<region>.myhuaweicloud.com`) | `obs.custom.example.com` |
| `--operation` | No | hcloud OBS operation name; only the read-only `ls` is allowed | `ls` |
Output-mode precedence: `--format` selects the mode; `--output` only matters for
`xlsx`. The local `--output` path value (e.g. a folder literally named
`downloads`) is excluded from the write-intent guard because it is not an OBS
operation.
## Write-Intent Guard
- The script scans all user arguments (except the `--output` path value) plus
the `--operation` value for mutating vocabulary (`create`, `delete`,
`upload`, `download`, `copy`, `remove`, `move`, `restore`, `abort`, `sync`,
`modify`, `update`, `overwrite`, and OBS operation names such as
`CreateBucket`, `DeleteBucket`, `PutObject`).
- Any hit raises `GuardError`, prints `[错误] 检测到写操作意图 ... 已被守卫拦截`, and
exits with code 1 **before** a single hcloud command is executed.
- Only `hcloud OBS ls` (read-only ListBuckets) — or the SDK `list_buckets`
call in the fallback path — is ever constructed by `build_command()`; there
is no code path that can issue a mutating OBS API call.
## KooCLI Command Format Standard
```text
hcloud <Service> <Operation> [--key=value ...]
```
- **Service name** — exact KooCLI title-case service name: `OBS`.
- **Operation name** — the `hcloud OBS` module is **obsutil-backed**: operations
are lowercase obsutil commands, not PascalCase API names. Listing the account
buckets is `ls` with **no** `cloud_url`; there is **no** `hcloud OBS
ListBuckets` command.
- **Region / endpoint** — the OBS module does **not** accept `--cli-region`;
the region is expressed through the endpoint option `-e=obs.<region>.myhuaweicloud.com`
(the script derives it from `--region`).
- **Simple parameter** — `-key=value`, e.g. `-limit=1000`, `-e=obs.cn-north-4.myhuaweicloud.com`.
- **REST path (official SDK)** — `GET /` (`ListBuckets`), invoked by
`huaweicloudsdkobs` v1 `ObsClient.list_buckets`; the endpoint is resolved from
the requested region.
## Excel Format
| Column (header) | Source key | Notes |
| ---------- | ---------- | --------- |
| 桶名称 | `name` | Bucket name from `obs://<name>` / SDK list |
| 创建时间 | `creation_date` | Detected from CLI columns or SDK response; `-` when absent |
| 区域 | `location` | Region token from CLI columns or SDK response; `-` when absent |
| 存储类别 | `storage_class` | `Standard` / `Warm` / `Cold` / `Standard-IA` ...; `-` when absent |
| 桶策略 | `policy` | `private` / `public-read` / `public-read-write` ...; `-` when absent |
`--summary` appends a bolded footer row: `桶数量 | <N> | Region <region>`.
## Error Handling
| Scenario | Behavior |
| ---------- | --------- |
| Empty bucket list | Exit 0, prints `当前账号(Region <x>)无 OBS 桶,未生成 Excel 文件。` — no file is produced |
| Missing AK/SK / obsutil config | Exit 1, `缺少 AK/SK 凭证` hint to run `hcloud obs config` out-of-band (never in chat) |
| Invalid / insufficient credentials (403 / InvalidAccessKeyId) | Exit 1, `无权限访问 OBS,请检查 IAM 权限` hint; no xlsx is produced |
| hcloud not installed | Exit 1 after SDK fallback also unavailable; hint to install KooCLI or run `ensure_env.py` |
| openpyxl missing | Exit 1, `缺少依赖 openpyxl` hint to run `python3 scripts/ensure_env.py` |
| Bad `--output` path (permission / bad dir) | Exit 1, `Excel 文件写出失败` hint; no partial file is left |
| Network / API failure | Exit 1 with the hcloud stderr excerpt |
| KooCLI usage error (`[USE_ERROR] ...`) | Exit 1, explicit `hcloud 参数错误` hint pointing to `hcloud OBS ls --help` |
| Write intent detected | Exit 1, `GuardError` message, no command executed |
Exit codes: `0` success / empty list; `1` config, auth, guard, export, or API
error (`table`/`json` modes follow the same conventions).
## Edge Cases
| Scenario | Handling |
| ---------- | --------- |
| Account has no buckets | Friendly `无 OBS 桶,未生成 Excel 文件` message, exit 0 |
| Large number of buckets | `-limit` caps the CLI result; `--page-size` controls it (default 1000) |
| Extra obsutil columns (`-sc` etc.) | Creation date / region / storage class / policy detected heuristically |
| Duplicate `obs://` lines | Collapsed to the first occurrence per bucket name |
| Field missing on a bucket | Rendered as `-` in both the table and the xlsx cell |
| hcloud absent, SDK installed | Transparent fallback to `huaweicloudsdkobs` list_buckets, same output modes |
| `--output` points to a non-existing directory | Directory is created automatically |
| `--output` path contains a guard keyword (e.g. `downloads/`) | Path value is excluded from the guard (local path ≠ OBS operation) |
| User asks to create/delete/upload | Out of scope — blocked by the write-intent guard; a write-capable skill with explicit user confirmation is required |
## Testing
Offline unit tests with a mocked hcloud subprocess (no credentials, no network):
```bash
cd skills/storage/obs/huawei-cloud-obs-list-excel
python3 -m unittest discover -s tests -v
```
Coverage: write-intent guard (read passes / create / delete / upload / download
/ copy / remove / restore / sync / normalized variants / operation whitelist /
`--output` path exclusion), command construction (endpoint + limit, no write
flags), obsutil output parsing (names / columns / storage class / policy /
dedupe / empty), failure classification (missing AK/SK, InvalidAccessKeyId,
403, generic, `[USE_ERROR]`), SDK fallback (missing env credentials, success,
unavailable, bucket normalization), xlsx export (header / data rows / summary
row / cell fallbacks / openpyxl missing / bad path), rendering (table / json),
and all `main()` output modes including empty, xlsx, and error paths.
## Reference Documents
| Document | Content |
| ---------- | --------- |
| [references/iam-policies.md](references/iam-policies.md) | Least-privilege read-only IAM policy |
| [references/cli-installation-guide.md](references/cli-installation-guide.md) | KooCLI + obsutil installation, credential configuration and openpyxl setup |
| [references/verification-method.md](references/verification-method.md) | How the skill and its tests were verified |
| [references/dataflow-diagram.md](references/dataflow-diagram.md) | Mermaid data flow diagram |
| [references/acceptance-criteria.md](references/acceptance-criteria.md) | Acceptance criteria checklist |don't have the plugin yet? install it then click "run inline in claude" again.
reorganized the original skill into implexa's 6-component structure (intent, inputs, procedure, decision points, output contract, outcome signal), added detailed edge case handling in procedure and decision points, documented all external dependencies and credential flows, clarified error classification and exit code contracts, and preserved the original write-intent guard and sdk fallback logic.
query the obs bucket inventory of a huawei cloud account via koo-cli's obsutil-backed hcloud OBS ls command (read-only listbuckets operation), with automatic fallback to the official huaweicloudsdkobs v1 sdk when koo-cli is absent, then export the result into a local .xlsx workbook using openpyxl. use this when you need a daily resource patrol report, inventory deliverable, or excel-formatted bucket listing for a huawei cloud account. the skill is strictly read-only by design: mutating intents (create, delete, upload, download, copy, remove, restore, sync, modify) are rejected before execution by a write-intent guard.
python environment:
python3 scripts/ensure_env.py to auto-install openpyxl, huaweicloudsdkcore, and huaweicloudsdkobs. if running offline, pre-install via pip.koo-cli (primary path):
hcloud) with obsutil component installed. see references/cli-installation-guide.md for setup.~/.obsutilconfig (AK, SK, endpoint). the script does not read or echo secrets.sdk fallback (secondary path):
pip install huaweicloudsdkobs huaweicloudsdkcore).huawei cloud account permissions:
obs:bucket:list or the system OBS ReadOnlyAccess policy. see references/iam-policies.md.obs.<region>.myhuaweicloud.com (e.g. obs.cn-north-4.myhuaweicloud.com).command-line parameters:
--region / -r: target region (default cn-north-4). affects obs endpoint selection.--format / -f: output mode: xlsx (default), table, or json.--output / -o: .xlsx file path (only used with --format xlsx; default obs_buckets_--summary: boolean flag. if set, appends a bolded summary row (桶数量 / count) to the xlsx worksheet.--page-size: maximum bucket count to return (default 1000). passed as -limit to hcloud.--endpoint: override the default obs endpoint (e.g. obs.custom.example.com). if omitted, derived from --region.--operation: reserved for internal use (always ls for this skill). scanned by the write-intent guard.context (credential availability):
hcloud obs config (run out-of-band, never in chat).validate the environment: check if python 3.8+ is available. if openpyxl is missing, hint to run python3 scripts/ensure_env.py and exit 1.
parse and sanitize arguments: extract --region, --format, --output, --summary, --page-size, --endpoint, and --operation from the command line. default region is cn-north-4, default format is xlsx, default page-size is 1000.
run the write-intent guard: scan all arguments (excluding the --output path value itself) for mutating vocabulary: create, delete, upload, download, copy, remove, move, restore, abort, sync, modify, update, overwrite, createbucket, deletebucket, putobject, etc. if any match is found (case-insensitive), raise GuardError, print [错误] 检测到写操作意图 ... 已被守卫拦截 to stderr, and exit 1. do not proceed to the next step.
construct the obs endpoint url: if --endpoint is provided, use it. otherwise, derive from --region as obs.<region>.myhuaweicloud.com.
build the koo-cli command: construct the command hcloud OBS ls -limit=<page-size> -e=<endpoint> (all lowercase operation name ls, title-case service name OBS).
attempt koo-cli execution: run the command via subprocess with stdout and stderr captured. set a timeout of 30 seconds. if the binary is not found (FileNotFoundError or exit code indicating "hcloud: command not found"), proceed to step 7 (sdk fallback). if the command exits with a koo-cli usage error (stderr contains [USE_ERROR]), print hcloud 参数错误: <excerpt> and exit 1. if credentials are missing or invalid (stderr contains 缺少 AK/SK, InvalidAccessKeyId, or http 403), handle as step 9 (error classification). if the command succeeds (exit 0), parse the stdout as obsutil list output and proceed to step 10.
attempt sdk fallback (if koo-cli failed or was not found): try to import huaweicloudsdkobs. if the import fails, print 缺少依赖: huaweicloudsdkobs. 请运行 python3 scripts/ensure_env.py and exit 1. if the import succeeds, instantiate ObsClient with credentials from obsutil config or environment (ak_id, sk, server). call obs_client.list_buckets(). if credentials are missing or invalid, handle as step 9. if the call succeeds, extract bucket data into the same normalized format as step 10 and proceed to step 10.
parse and normalize the bucket list: from either koo-cli stdout or sdk response, extract each bucket's name, creation_date (or "-" if absent), location/region (or "-"), storage_class (or "-"), and policy (or "-"). if two rows have the same bucket name, keep only the first. collect all buckets into an ordered list.
classify and handle errors: if the bucket list is empty (zero buckets), print 当前账号(Region <region>)无 OBS 桶,未生成 Excel 文件。 to stdout and exit 0 (success, no file produced). if credentials are missing, print 缺少 AK/SK 凭证。请运行 hcloud obs config 配置凭证。 to stderr and exit 1. if permission is denied (403 or InvalidAccessKeyId), print 无权限访问 OBS,请检查 IAM 权限。 to stderr and exit 1. if hcloud and sdk are both unavailable, print hcloud 未安装。请参考 [cli-installation-guide](references/cli-installation-guide.md) 安装 KooCLI 或运行 python3 scripts/ensure_env.py。 to stderr and exit 1. if network or generic api failure, print the hcloud stderr excerpt to stderr and exit 1.
render output by format:
--format table: print bucket data as a human-readable ascii table (columns: 桶名称 / 创建时间 / 区域 / 存储类别 / 桶策略) to stdout and exit 0.--format json: serialize bucket list as json array (each object has keys: name, creation_date, location, storage_class, policy) to stdout and exit 0.--format xlsx (default): proceed to step 11.construct the xlsx workbook: create a new openpyxl Workbook. add a worksheet. write a fixed header row (row 1) with cells: 桶名称, 创建时间, 区域, 存储类别, 桶策略. starting at row 2, write one data row per bucket (name, creation_date, location, storage_class, policy). if --summary is set, append a bolded footer row: 桶数量 |
atomically write the .xlsx file: if the directory in --output does not exist, create it. write the workbook to a temporary file (e.g. /tmp/.obs_buckets_--output. if any i/o error occurs (permission denied, disk full, bad path), print Excel 文件写出失败: <error> to stderr, delete the temp file, and exit 1.
print success and exit: print the absolute path of the generated .xlsx file to stdout and exit 0.
if koo-cli is installed and credentials are present: use koo-cli hcloud OBS ls to query the bucket list (preferred path, faster, no python sdk overhead).
if koo-cli is not installed or not found: fall back to the official huaweicloudsdkobs sdk. if the sdk is also not installed, print an error and exit 1.
if the koo-cli command returns a usage error (exit code or stderr [USE_ERROR]): do not retry. print a hint pointing to hcloud OBS ls --help and exit 1.
if credentials are missing or invalid (stderr contains 缺少 AK/SK, InvalidAccessKeyId, or http 403): do not retry. print a credential/permission hint and exit 1. do not fall back to sdk if credentials failed in koo-cli (the issue is upstream).
if the bucket list is empty after successful query: do not produce an .xlsx file. print a friendly message, exit 0.
if the user argument scan detects a mutating keyword (e.g. --operation create): raise GuardError and exit 1 immediately, before any subprocess call.
if --format is table or json: skip xlsx generation and print the formatted result to stdout.
if --output path parent directory does not exist: create it automatically. if creation fails (permission denied), exit 1 with an error message.
if --output points to an existing file: overwrite it (via atomic rename, so no partial/corrupt file is left on interrupt).
success (--format xlsx, default):
/home/user/obs_buckets_cn-north-4_20250115_143022.xlsx.--summary was set.--output (or default name in cwd if --output was not provided).success (--format table):
success (--format json):
[{"name": "my-bucket", "creation_date": "2024-01-10T12:34:56Z", "location": "cn-north-4", "storage_class": "Standard", "policy": "private"}, ...].empty bucket list (exit 0, no file produced):
当前账号(Region <region>)无 OBS 桶,未生成 Excel 文件。.error (exit 1, no file produced):
you know the skill worked if:
for --format xlsx (default): the printed stdout path points to an existing, well-formed .xlsx file on disk. opening the file in Excel or a spreadsheet tool shows a header row (桶名称 / 创建时间 / 区域 / 存储类别 / 桶策略) in bold, followed by one row per bucket. all bucket names, dates, regions, storage classes, and policies are correct and readable. if --summary was used, a bolded summary row appears at the bottom showing the total bucket count.
for --format table: the printed stdout shows a formatted ascii table (not raw json or hcloud output) with the five bucket columns visible and human-readable.
for --format json: the printed stdout is valid json (not escaped or prettified unexpectedly). you can parse it with jq or any json tool.
for empty bucket list: stdout prints the friendly 当前账号(Region <x>)无 OBS 桶,未生成 Excel 文件。 message, exit code is 0, and no .xlsx file is produced.
for guard-blocked mutating request (e.g. user input contains delete): stderr prints [错误] 检测到写操作意图 ... 已被守卫拦截, exit code is 1, and no subprocess command was ever executed (guard ran first).
for credential error: stderr prints 缺少 AK/SK 凭证。请运行 hcloud obs config 配置凭证。, exit code is 1, and no .xlsx file is produced.
for permission error: stderr prints 无权限访问 OBS,请检查 IAM 权限。, exit code is 1, and no .xlsx file is produced.
for missing openpyxl: stderr prints 缺少依赖 openpyxl。请运行 python3 scripts/ensure_env.py 安装。, exit code is 1.