Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

huawei-cloud-obs-image-desens

БесплатноЗапускает вложенные скриптыНе проверен

One-click OBS image desensitization skill for Huawei Cloud. Lists images in an OBS bucket/prefix, applies desensitization rules (full-image mosaic, Gaussian…

huaweicloudskillот huaweicloudskill202 установки в других каталогах

Об этом скилле

Huawei Cloud OBS Image Desensitization Skill

Overview

This skill provides a one-click flow to desensitize images stored in Huawei Cloud OBS: list → download → desensitize → write back. The user only needs to specify a bucket name (and optionally a prefix) plus a desensitization rule; the skill discovers matching images, applies the rule locally with Pillow, and uploads the processed results to a target bucket/prefix.

Architecture:

  • obsutil (via hcloud obs) — OBS object listing, download and upload (KooCLI maps obs sub-commands to obsutil)
  • Pillow (PIL) — local image desensitization processing (mosaic, Gaussian blur, region occlude)
  • huaweicloudsdkfunctiongraph — optional automation: create a FunctionGraph function with an OBS event trigger so newly uploaded images are desensitized automatically

Applicable Scenarios:

  • Batch mosaic / blur all images under a bucket or prefix (e.g. input/)
  • Occlude sensitive regions (ID numbers, license plates, faces) in images
  • Full-image desensitization of exported screenshots or photo collections
  • Build an automatic "upload → desensitize → store" pipeline on an OBS bucket

Typical Use Cases:

  1. "打码 my-bucket input/ 下的所有图片" → list input/, mosaic each image, write to desensitized/
  2. "把 xxx图片的人脸区域打码" → region rule with face-region coordinates
  3. "上传到桶里的图片自动脱敏" → setup-trigger creates a FunctionGraph function + OBS trigger

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Prerequisites

1. KooCLI / obsutil

  • KooCLI >= 3.2.0 required for OBS list/download/upload (obsutil mode). Verify: hcloud version
  • obsutil credentials must be configured (same AK/SK as the console). OBS operations go through hcloud obs ...; if credentials are missing the first hcloud obs ls returns a configuration hint.

2. Python + Pillow

> **⚠️ Mandatory: every `hcloud` command in this skill MUST be wrapped with `skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- ` — bare `hcloud` calls are strictly forbidden.**

skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- pip install Pillow

3. Optional: FunctionGraph SDK (only for setup-trigger)

skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- pip install huaweicloudsdkfunctiongraph

4. Authentication (Environment)

For the setup-trigger sub-command, provide Huawei Cloud credentials:

export HUAWEI_AK="your-access-key"
export HUAWEI_SK="your-secret-key"
export HUAWEI_REGION="cn-north-4"
export HUAWEI_PROJECT_ID="your-project-id"

Security rules: never echo AK/SK; never ask the user to paste AK/SK into the conversation; reuse environment/hcloud configured credentials where possible.

5. IAM Permissions

See IAM Policies for the least-privilege permissions of OBS listing/download/upload and, for the optional automation path, FunctionGraph functiongraph:function:create + functiongraph:trigger:create.

  • skill-quality-cli — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
    • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
    • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Workflow

User Request → Parse bucket/prefix + rule → obsutil ls (filter image files)
  → hcloud obs cp download → Pillow desensitization (mosaic/blur/region)
  → hcloud obs cp upload to target bucket/prefix → Report per-file results
Optional: setup-trigger → FunctionGraph CreateFunction (auto-desens code)
  → CreateFunctionTrigger (OBS event) → auto pipeline on upload

Core Commands

All commands are executed with the skill script scripts/obs_image_desens.py. Run from the skill directory:

cd scripts
skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- python3 obs_image_desens.py --help

List candidate images

skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- python3 obs_image_desens.py list --bucket {bucket} --prefix {prefix}

Lists image files (.jpg/.jpeg/.png/.bmp/.webp/.gif/.tif/.tiff) under obs://{bucket}/{prefix}.

Parameter Required Description
--bucket Yes OBS bucket name
--prefix No Object key prefix to filter (default empty = whole bucket)
--show-all No Also list non-image objects

One-run desensitization

skill-quality-cli run --skill-name huawei-cloud-obs-image-desens -- python3 obs_image_desens.py process \
  --source-bucket {source_bucket} \
  --source-prefix {source_prefix} \
  --target-bucket {target_bucket} \
  --target-prefix {target_prefix} \
  --rule {whole|blur|region|region-blur|region-block} \
  [--block-size {block_size}] [--radius {radius}] [--regions {regions}] [--fill {fill}] [--yes]

Downloads each matched image, app

Полный SKILL.md на ClawHub

Установить huawei-cloud-obs-image-desens в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-obs-image-desens?

One-click OBS image desensitization skill for Huawei Cloud. Lists images in an OBS bucket/prefix, applies desensitization rules (full-image mosaic, Gaussian blur, region mosaic/blur/occlusion) locally via Pillow, and writes results back to a target bucket/prefix; optionally creates a FunctionGraph function + OBS event trigger for automatic on-upload desensitization. Use this skill when the user wants to: (1) desensitize/blur/mosaic images stored in OBS, (2) batch mosaic or blur all images under a bucket prefix, (3) occlude sensitive regions (faces, license plates, IDs) in OBS images, (4) set up automatic image desensitization when files are uploaded to an OBS bucket. Triggers include: "OBS图片脱敏", "图片打码", "图片马赛克", "图片模糊", "人脸打码", "敏感区域遮挡", "OBS图片一键脱敏", "批量打码", "自动脱敏", "image desensitization", "mosaic image in OBS", "blur OBS images", "auto desensitize uploads", "打码", "脱敏"

Как установить скилл huawei-cloud-obs-image-desens?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-obs-image-desens запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-obs-image-desens с