home/dot_agents/skills/webp-convert/SKILL.md
cwebpを使って画像をWebP形式に変換するスキル。「webp変換」「画像をwebpに」「画像最適化」「cwebp」などと言及された際や、画像ファイル(jpg, png, gif等)をWebPに変換する必要がある場合に使用する。Web用画像の配置・最適化時にも活用すること。
npx skillsauth add kryota-dev/dotfiles webp-convertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
指定された画像を cwebp で WebP 形式に変換する。単一ファイルおよび複数ファイルの一括変換に対応。
$ARGUMENTS を解析して以下のオプションを抽出する。未指定の場合はデフォルト値を使用。
| オプション | デフォルト | 説明 |
|-----------|-----------|------|
| <path> | (必須) | 変換対象の画像パスまたは glob パターン(例: src/images/*.png) |
| -q | 85 | 品質(0-100)。85 がサイズと画質のバランスが良い |
| -w | (なし) | リサイズ幅(px)。高さは自動計算。例: 1920 |
| -o | (なし) | 出力先ディレクトリ。未指定時は入力ファイルと同じディレクトリ |
変換開始前に cwebp の存在を確認する:
which cwebp
未インストールの場合はユーザーに伝える:
brew install webpsudo apt install webpcwebp がネイティブ対応: JPEG, PNG, TIFF, WebP
以下のフォーマットは事前に PNG へ変換が必要:
sips -s format png input.gif --out /tmp/input.png(macOS)rsvg-convert input.svg -o /tmp/input.png(librsvg)cwebp -q 85 "path/to/image.jpg" -o "path/to/image.webp"
for f in path/to/*.{jpg,jpeg,png,gif,tiff,bmp}; do
[ -f "$f" ] || continue
out="${f%.*}.webp"
cwebp -q 85 "$f" -o "$out"
done
outdir="path/to/output"
mkdir -p "$outdir"
for f in path/to/source/*.{jpg,jpeg,png}; do
[ -f "$f" ] || continue
name=$(basename "${f%.*}")
cwebp -q 85 "$f" -o "$outdir/$name.webp"
done
幅 1920px にリサイズ(アスペクト比維持):
cwebp -q 85 -resize 1920 0 "input.jpg" -o "output.webp"
.webp に置換: photo.jpg → photo.webp変換完了後、元ファイルとの比較サマリーを表示する:
for f in path/to/*.webp; do
orig="${f%.*}.jpg"
[ -f "$orig" ] && printf "%-40s %8s -> %8s\n" "$(basename "$f")" "$(du -h "$orig" | cut -f1)" "$(du -h "$f" | cut -f1)"
done
| 用途 | 品質 | リサイズ幅 | 備考 | |------|------|-----------|------| | ヒーロー/バナー画像 | 85 | 1920px | フル幅表示 | | コンテンツ画像 | 85 | 1200px | 記事・ページ本文 | | サムネイル | 80 | 400px | グリッド・カード表示 | | 高品質写真 | 92 | (なし) | ポートフォリオ、商品写真 | | アイコン/ロゴ | 90 | (なし) | 元サイズ維持 |
development
`cc-code-review` エージェントを起動して独立したコンテキストでコードレビューを実行する。 現在のセッションのバイアスのないフレッシュな視点で、プロジェクトの CLAUDE.md を踏まえたレビューを行う。 トリガー: "cc-code-review", "ccでレビュー", "別の視点でレビュー", "セカンドオピニオン" 使用場面: (1) PRのコードレビュー (2) ブランチ差分のレビュー (3) 特定ファイルのレビュー (4) 現在の変更のレビュー
tools
Comprehensive guide for the `wtp` (Worktree Plus) CLI by satococoa — an enhanced Git worktree manager. Use this whenever the user wants to create, list, remove, or navigate Git worktrees with wtp, mentions `wtp add`/`wtp cd`/`wtp list`/`wtp remove`/`wtp exec`, asks about automatic worktree paths from branch names, post-create hooks (copy/symlink/command) in `.wtp.yml`, branch tracking for worktrees, or shell integration (`wtp shell-init`, `wtp hook`, tab completion, auto-cd). Trigger this even when the user just describes the workflow — e.g. 'spin up a worktree for this feature branch', 'jump to my auth worktree', 'clean up the worktree and its branch' — without naming wtp explicitly, as long as wtp is the available tool.
tools
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.