byted-las-image-resample

byted-las-image-resample is a skill for Claude Code, Codex from bytedance/agentkit-samples. It costs 164 tokens per session (1,733 once invoked), scanned A, original, Apache-2.0.

An image resizing and compression tool for JPEG, PNG, and TIFF files stored in Volcengine's cloud storage. It only makes images smaller and can also change DPI and some image formats.

In plain words
What is it for?
Use it to downsample images, compress them, change DPI, or convert between supported formats.
Why use it?
It reduces image dimensions and file size when an image is too large for storage, transfer, or delivery.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to downsample images, compress them, change DPI, or convert between supported formats.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bytedance/agentkit-samples/byted-las-image-resample
About the project

bytedance/agentkit-samples is a collection of examples and tutorials for Volcengine AgentKit, an AI-agent development platform for building, deploying, and operating agent applications. Developers use the samples to learn agent creation, multi-agent collaboration, memory, retrieval, MCP integrations, media generation, customer service, and other workflows. The catalogue skills provide agent workflows based on these examples.

bytedance/agentkit-samples · 449 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bytedance/agentkit-samples --skill byted-las-image-resample
Clone the repo
git clone --depth 1 https://github.com/bytedance/agentkit-samples

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for byted-las-image-resample

README.md
[![agentmods](https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-las-image-resample.svg)](https://agentmods.dev/skills/bytedance/agentkit-samples/byted-las-image-resample)
Your own site
<a href="https://agentmods.dev/skills/bytedance/agentkit-samples/byted-las-image-resample"><img src="https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-las-image-resample.svg" alt="Measured on agentmods" height="20"></a>
Per session 164 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00164 $0.01733
Opus 5 $0.00082 $0.00866
Sonnet 5 $0.00033 $0.00347
Haiku 4.5 $0.00016 $0.00173

Measured 4d ago against content hash 9c34b8876622, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

byted-las-image-resample scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/check_format.sh, scripts/env_init.sh, scripts/generate_result.md.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/byted-las-image-resample/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LAS 图像重采样(las_image_resample

对图像进行降采样缩放(仅缩小,不支持放大),支持修改 DPI、JPG/PNG 互转。

设计模式

本 skill 主要采用:

  • Tool Wrapper:封装 lasutil CLI 调用
  • Pipeline:包含 Step 0 → Step N 的顺序工作流

核心 API 与配置

  • 算子 ID: las_image_resample
  • API: 同步(process
  • 环境变量: LAS_API_KEY (必填)

详细参数与接口定义见 references/api.md

Gotchas

  • 仅支持降采样target_size 不得超过原图尺寸,本算子不支持放大。
  • 输入限制:仅支持 JPEG/PNG/TIFF,≤100MB,像素总数 ≤225,000,000。
  • 密钥安全:若聊天框屏蔽密钥,让用户在当前目录创建 env.sh 并写入 export LAS_API_KEY="...",SDK 会自动读取。
  • 免责声明:最终回复结果时必须包含:"本方式的计费均为预估计费,与实际费用有差距,实际费用以运行后火山产生的账单为准。计费说明请参考 Volcengine LAS 定价。",且禁止使用"实际费用"字眼描述预估价。

工作流(严格按步骤执行)

复制此清单并跟踪进度:

执行进度:
- [ ] Step 0: 前置检查
- [ ] Step 1: 初始化与准备
- [ ] Step 2: 预估价格
- [ ] Step 3: 执行/提交任务
- [ ] Step 4: 结果呈现

Step 0: 前置检查(⚠️ 必须在第一轮对话中完成)

在接受用户的任务后,不要立即开始执行,必须首先进行以下环境检查:

  1. 检查 LAS_API_KEYLAS_REGION:确认环境变量或 .env 中是否已配置。
    • 若无,必须立即向用户索要(提示:LAS_REGION 常见为 cn-beijing)。
    • 注意LAS_REGION 必须与您的 API Key 及 TOS Bucket 所在的地域完全一致。如果用户中途切换了 Region,必须提醒用户其 TOS Bucket 也需对应更换,否则会导致权限异常或上传失败。
  2. 检查输入路径
    • 如果用户要求处理的是本地文件,则需要先通过 File API 上传至 TOS(只需 LAS_API_KEY,无需额外 TOS 凭证)。
    • 如果算子的输出结果存放在 TOS 上,且用户需要下载回本地,则需要 VOLCENGINE_ACCESS_KEYVOLCENGINE_SECRET_KEY。对于仅需要上传输入文件的场景,TOS 凭证不再必须
  3. 确认无误后:才能进入下一步。

Step 1: 初始化与准备

环境初始化(Agent 必做)

# 执行统一的环境初始化与更新脚本(会自动创建/激活虚拟环境,并检查更新)
source "$(dirname "$0")/scripts/env_init.sh" las_image_resample
workdir=$LAS_WORKDIR

如果网络问题导致更新失败,脚本会跳过检查,使用本地已安装的 SDK 继续执行。

  • 处理本地文件时:先本地检查格式和尺寸,预估价格,用户确认后再上传:
    # 提前检查图片格式(避免参数错误)
    ./scripts/check_format.sh <local_path>
    # 本地使用 identify 获取尺寸(无需上传即可预估价格)
    identify -format "%wx%h" <local_path>
    
    计算预估价格并等待用户确认后,再执行上传:
    # 用户确认后,上传到 TOS
    lasutil file-upload <local_path>
    
    上传成功后返回 JSON,取其中的 presigned_url(HTTPS 预签名下载链接,24 小时有效)传给算子作为输入 URL。

Step 2: 预估价格(⚠️ 必须获得用户确认)

Read the full file on GitHub · 140 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 140 lines · 164 tokens per session scan A 9c34b8876622

Subscribe to this mod's changes

byted-las-image-resample is a skill published in the GitHub repository bytedance/agentkit-samples (449 stars, last pushed 3d ago), licensed Apache-2.0. It adds 164 tokens to every session and 1,733 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

image-generation

Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.

bytedance/deer-flow · 42 tokens

podcast-generation

Use this skill when the user requests to generate, create, or produce podcasts from text content. Converts written content into a two-host conversational podcast audio format with natural dialogue.

bytedance/deer-flow · 38 tokens

brandkit

Premium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional…

Leonxlnx/taste-skill · 89 tokens

video-still-animator

Turn a single still image (PNG/JPG) into a short MP4 with a slow Ken-Burns zoom and a silent audio track. Pure ffmpeg wrapper. Designed as the onfailure substitute for AI video-gen steps that get blocked by content moderation: when seedance refuses, this skill emits a valid replacement clip from the already-generated…

opensquilla/opensquilla · 88 tokens

spotify-player

Terminal Spotify playback/search via spogo (preferred) or spotifyplayer. Use when the user asks to play music, search for a song, skip a track, pause playback, check what is currently playing, control Spotify, list audio devices, or manage a Spotify queue from the terminal.

elizaOS/eliza · 60 tokens

sn-image-base

Base-layer skill for the SenseNova-Skills project, providing low-level APIs for image generation, recognition (VLM), and text optimization (LLM). This skill does not preprocess inputs; it only calls backend services and returns results. This skill is not user-facing and is intended for upper-layer skills only.

OpenSenseNova/SenseNova-Skills · 66 tokens