claude/skills/x-media-resizer/SKILL.md
画像・動画ファイルを X(旧Twitter)投稿向けに自動リサイズ/圧縮/変換する。 具体的には、画像は自動回転(EXIF)→サイズ調整→5MB目標の圧縮、 動画は変換(H.264/AACのMP4)→推奨解像度へリサイズ→(必要なら)140秒へトリム→faststart最適化を行い、 dist/x に出力する。ユーザーが「添付の画像/動画をXに投稿できるサイズにして」「tweet用に圧縮して」などと言ったら起動。
npx skillsauth add lilpacy/dotfiles x-media-resizerInstall 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.
X(旧Twitter)に投稿しやすい形に、画像/動画を自動で整形して dist/x/ に出力します(元ファイルは変更しません)。
brew install ffmpeg imagemagickffmpeg と imagemagick をインストールbash scripts/x_media_resize.sh path/to/media1.jpg path/to/movie.mov./attachments → なければカレント配下から、画像/動画っぽい拡張子を探索して変換します--preset auto の場合、元画像の向きで以下を自動選択して出力
※ 画像のサイズ上限や推奨はUIや用途で揺れますが、1:1 / 16:9 / 1.91:1 などが一般的に使われます。参考: resources/x_media_specs.md
--preset auto の場合、元動画の向きで以下を自動選択して出力
--strategy cropで中央クロップにも変更可)--no-trimで無効化)-movflags +faststart(アップロード/再生開始を早める)を付与dist/x/<元名>__x_<preset>.<ext>--preset auto|landscape|portrait|square|wide-card--strategy pad|crop|fit--out-dir dist/x--max-image-mb 5--max-video-sec 140--no-trim--dry-runresources/x_media_specs.mdscripts/x_media_resize.sh --helpdevelopment
Use when searching the web or reading online documentation. Prefer DuckDuckGo for search and read documents through npx curl.md instead of raw HTML.
testing
Use when writing or editing tests. Tests should be ordered by near-normal, normal, then abnormal cases where applicable, and test names must be Japanese behavior descriptions from a reviewer/user perspective.
development
GoF/オブジェクト指向デザインパターンを関数型プログラミング(pure functions, higher-order functions, ADT, composition, immutability, effect boundaries)でシンプルに整理・設計・リファクタリングする。Strategy/Factory/Adapter/ObserverなどGoF全23パターンのFP置き換え、適用判断、具体事例を提示する必要があるときに使う。
tools
Use when committing, pushing, or preparing PRs. Defines the user's commit workflow, message style discovery, review handoff, and branch/worktree push requirements.