kxwp2026814

Compress business card, license, and similar images in the browser to reduce bandwidth and file size. Intended for front-end image compression, browser-image-compression, and pre-upload compression scenarios.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kxwp2026814" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c83f29ae2bb2c4b11bc44eb8bf58b86bd845a4dfd7477ed7a715a8d7abbb8e92. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/kxwp2026814 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Compress business card, license, and similar images in the browser to reduce bandwidth and file size. Intended for front-end image compression, browser-image-compression, and pre-upload compression scenarios.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: local-image-compress
slug: kxwp2026814
displayName: 图片本地压缩
version: 1.0.0
summary: 上传前在浏览器内压缩名片/执照等图片,减少流量与体积。
license: MIT
description: 上传前在浏览器内压缩名片/执照等图片,减少流量与体积。当用户需要前端压图、browser-image-compression、上传前压缩时使用。

图片本地压缩

灵感:能力工具箱 image-compress(pkg: browser-image-compression)。

何时使用

  • CRM 上传名片、执照、现场照片前减小体积
  • 纯前端压缩,不经后端转码

硬约束

  1. 使用 browser-image-compression(或等价 canvas 方案,须在说明中标明)。
  2. 默认目标:maxSizeMB(如 0.8~1)+ maxWidthOrHeight(如 1920);可配置。
  3. 压缩后回显:原大小、新大小、耗时;失败有可读错误。
  4. 大图/HEIC:说明浏览器兼容限制;不支持则提示转换格式。
  5. 禁止静默丢 EXIF 而不告知(若库会剥元数据,写进说明)。

推荐实现要点

import imageCompression from 'browser-image-compression'

export async function compressImageFile(
  file: File,
  opts?: { maxSizeMB?: number; maxWidthOrHeight?: number },
) {
  const options = {
    maxSizeMB: opts?.maxSizeMB ?? 1,
    maxWidthOrHeight: opts?.maxWidthOrHeight ?? 1920,
    useWebWorker: true,
  }
  const out = await imageCompression(file, options)
  return {
    file: out,
    beforeKB: +(file.size / 1024).toFixed(1),
    afterKB: +(out.size / 1024).toFixed(1),
  }
}

Agent 步骤

  1. 实现压缩函数与进度回调(库支持 onProgress)。
  2. 自测:一张 >2MB 图压到目标附近。
  3. 与上传组件衔接:选图 → 压缩 → 再 FormData。

附加

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决用户上传名片、执照等图片前减小体积的实际需求
  • 属于明确场景的通用工具,具有广泛受众的实用能力
Trigger Precision90/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
Structure and Standards80/100

Areas to improve

  • 缺少端到端完整使用示例 Reported severity: Minor

    文档结构清晰,但缺少一个完整的端到端使用示例,用户可能难以快速上手。

    Recommendation: 建议在 Agent 步骤或附加章节补充一个完整的使用示例,展示从选图到压缩再到上传的完整流程。

Highlights

  • 文档结构清晰,包含何时使用、硬约束、推荐实现要点、Agent 步骤等
  • frontmatter 完整,有代码示例
Execution Reliability85/100

Highlights

  • 工具来源明确(browser-image-compression),参数正确
  • 覆盖了主要异常(大图/HEIC 兼容限制、EXIF 处理说明),有错误提示机制
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.