# Image Lowlight Enhance

> 对偏暗、夜景或曝光不足的已有图片进行暗部提亮与细节恢复，保持亮部不过曝。仅在用户明确说明是暗光、夜景或曝光不足修复，并已提供图片时触发；泛化的“提亮”或普通调色需求不单独触发。

- **Type:** Skill
- **Install:** `agentstack add skill-meitu-meitu-skills-image-lowlight-enhance`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [meitu](https://agentstack.voostack.com/s/meitu)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [meitu](https://github.com/meitu)
- **Source:** https://github.com/meitu/meitu-skills/tree/main/skills/image-lowlight-enhance

## Install

```sh
agentstack add skill-meitu-meitu-skills-image-lowlight-enhance
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 图片暗部增强（image-lowlight-enhance）

## Overview

暗光/夜景/曝光不足图片的智能亮度提升与暗部细节恢复。覆盖夜景拍摄提亮、暗光环境照片修复、曝光不足挽救、逆光/高对比场景补光；保持亮部不过曝的前提下提亮暗部、暗部噪点自动抑制。仅需 `image_url`，不需要 prompt。

执行前应让用户清楚知道：本 Skill 会读取 Meitu 凭证、调用本地 `meitu` CLI、将用户提供的图片 URL 发送到 Meitu OpenAPI 处理，并把结果写入 `./output/` 或 `$VISUAL/output/image-lowlight-enhance/`。

## API Mapping

- 暗光/夜景图片增强：`image_lowlight_enhance`

## Dependencies

- **meitu-cli**: `>=2.0.6`（`npm install -g meitu-cli@latest`）
- **凭证**：CONFIG AKSK → `meitu tools update`；EXEC AKSK → 实际执行（见根 `CONFIG.md`）
- **环境变量**：`MEITU_OPENAPI_TOOL_TASK_MODE=command`

> 路径别名：`$VISUAL` = `{OPENCLAW_HOME}/workspace/visual/`

## Core Workflow

```
Preflight → Execute → Deliver
```

### Preflight

1. `meitu --version` ≥ 2.0.6（否则 `npm install -g meitu-cli@latest`）
2. 确认已跑过 `meitu tools update`（用 CONFIG AKSK）
3. 当前 AKSK = EXEC，且 `MEITU_OPENAPI_TOOL_TASK_MODE=command`
4. 解析 output_dir：openclaw.yaml → `./output/` ｜else → `$VISUAL/output/image-lowlight-enhance/`；`mkdir -p`

### Execute

**触发信号 / 路由规则**

| 场景 | 判定关键词 | 路由 |
|------|----------|------|
| 太暗 / 夜景 / 曝光不足 | 太暗、夜景、提亮、暗光、逆光、曝光不足 | `image_lowlight_enhance` |

决策顺序：
1. `image_url` 缺失 → 追问
2. 唯一路由：调用 `image_lowlight_enhance`

单 API 工具：参数齐全即调用，失败重试 1 次后返回错误；不做跨工具兜底。图片本身曝光正常 → 正常调用，告知用户"原图曝光正常，增强后可能偏亮"。极度欠曝（纯黑）→ 正常调用，效果可能有限。

**参数定义**

| 参数 | 类型 | 必填 | 范围 | 默认值 | 说明 |
|------|------|------|------|--------|------|
| `image_url` | STRING | 是 | -- | -- | 图片地址。缺失 → 提示"请提供需要增强的图片" |

**工具调用**

```bash
meitu image-lowlight-enhance \
  --skill_name skill_image-lowlight-enhance \
  --image_url  \
  --json \
  --download-dir {output_dir}
```

**错误降级**

| 场景 | 处理方式 |
|------|------|
| `image_url` 缺失 | 提示"请提供需要增强的图片" |
| `image_url` 不可访问 | 直接返回图片链接无效错误，不重试 |
| 图片本身曝光正常 | 正常调用，告知"原图曝光正常，增强后可能偏亮" |
| 极度欠曝（纯黑） | 正常调用，效果可能有限，告知用户 |
| `image_lowlight_enhance` 调用失败 | 重试 1 次，仍失败返回错误 |
| 内容合规拦截 | 返回合规提示，不重试 |
| 视频输入 | 拒绝，仅支持图片 |

### Deliver

- 直接使用 Preflight 解析的 output_dir
- 从 `downloaded_files[0].saved_path` 读取已下载文件路径
- `mv {downloaded_files[0].saved_path} {output_dir}/{YYYY-MM-DD}_{descriptive}_image-lowlight-enhance.jpg`

## Output

- **格式**：JPEG/PNG（保持原格式）
- **命名**：`{YYYY-MM-DD}_{descriptive}_image-lowlight-enhance.jpg`
- **位置**：项目 → `./output/`，一次性 → `$VISUAL/output/image-lowlight-enhance/`

## 基线 Task ID

见 `references/task-id-baseline.md` 中对应行。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [meitu](https://github.com/meitu)
- **Source:** [meitu/meitu-skills](https://github.com/meitu/meitu-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-meitu-meitu-skills-image-lowlight-enhance
- Seller: https://agentstack.voostack.com/s/meitu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
