Community画像github.com

getedgehq/linkedin-media-prep

画像や動画をLinkedInに最適なアップロード品質とファイルサイズに変換、トリミング、リサイズ、圧縮します。ユーザーがLinkedIn用の写真、画像、動画(プロフィール写真、カバー写真、投稿画像、記事画像、投稿動画、動画広告)を準備したい場合や、ファイルサイズの最適化、LinkedInサイズへのトリミング・リサイズ、HEIC/RAW/PNG/MOVからLinkedIn対応JPEGやMP4への変換、LinkedInのメディア要件や仕様、制限について言及した場合に使用します。

linkedin-media-prep とは?

このスキルは、画像や動画をLinkedInの厳格な仕様に合わせて準備するための包括的なツールです。ユーザーがLinkedInプロフィール写真、カバー写真、投稿画像、記事画像、動画(正方形、縦長、横長)などをアップロードする際に、適切な寸法、アスペクト比、ファイルサイズへの変換を自動化します。macOS標準の`sips`コマンドやImageMagick(`magick` / `convert`)を使用した画像処理、および`ffmpeg`/`ffprobe`を使用した動画処理をサポートしています。特にiPhoneやスマートフォンで撮影された画像・動画に含まれるEXIF回転情報や回転メタデータを自動的に補正し、LinkedInが推奨する形式(画像はJPEG、動画はH.264+AACのMP4)に変換します。また、ファイルサイズをLinkedInの上限(画像8MB、動画5GB)未満に抑えつつ、アップロード時間を短縮するための目安(画像1MB未満、動画200MB未満)も提示します。このスキルはClaude CodeやCursorなどのAIエージェント向けに設計されており、ユーザーの指示に基づいて対話的にトリミング位置を調整しながら、LinkedInに最適化されたメディアファイルを生成します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/linkedin-media-prep

Installed? Explore more 画像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

LinkedIn Media Prep

画像や動画をLinkedInに適した寸法、トリミング、圧縮で準備します。


画像仕様

使用ケース寸法比率備考
投稿(縦長、最大フィード表示)1080 × 13504:5デフォルトの写真向け
投稿(横長)1200 × 6271.91:1バナー、スクリーンショットに最適
投稿(正方形)1080 × 10801:1安全な汎用選択肢
投稿(4:3)1440 × 10804:3カメラネイティブ写真に最適
プロフィール写真400 × 400 以上1:1800 × 800を推奨
カバー写真1584 × 3964:1
記事の注目画像1200 × 6271.91:1
最大ファイルサイズ8 MB—高速アップロードには < 1 MB を目標
形式JPEG, PNG, GIF—写真には JPEG推奨

動画仕様

使用ケース寸法比率備考
投稿(正方形)1080 × 10801:1安全な汎用選択肢
投稿(横長)1920 × 108016:9標準フィード動画
投稿(縦長)1080 × 19209:16モバイル/リール向け;ソースが9:16でない場合はパディング
最大ファイルサイズ5 GB—高速アップロードには < 200 MB を目標
最大長さ30分—最小3秒
形式MP4 (H.264 + AAC)—MP4必須(互換性最優先)
フレームレート30 fps—ソースに合わせるか、30 fpsに統一
ピクセルフォーマットyuv420p—広範な再生サポートに必須

画像ワークフロー

1. ソースの確認

sips -g pixelWidth -g pixelHeight "<input>"
ls -lh "<input>"

2. EXIF向きの修正(必要な場合)

iPhoneやモバイル写真は、縦画像をピクセル回転ではなくEXIF向きタグで保存することがよくあります。ImageMagickは通常これを自動的に尊重しますが、変換後に画像が横向きになる場合は、トリミング前に強制的に正しい向きにできます。

magick "<input>" -auto-orient "<input>-upright.png"

正面向きバージョンをトリミング用の作業コピーとして使用します。

3. 編集可能な形式に変換

ソースがHEICなどPNG以外の場合:

sips -s format png "<input>" --out "<input>.png"

PNGをトリミング用の作業コピーとして使用します。

4. トリミング(ユーザーと対話的に)

最初のトリミング: 中央に配置し、ターゲットの比率に基づいて寸法を選択します。

縦長写真を4:5の縦長投稿にする場合:

  • トリミング幅 = 画像の全幅
  • トリミング高さ = 幅 × 5 / 4
  • Yオフセット = (元の高さ − トリミング高さ) / 2

3024 × 4032のソースの例:

magick "source.png" -crop 3024x3780+0+126 "cropped.png"

反復調整:

  • 「よりズームイン」→ トリミングWxHを小さく(例:3024×3780ではなく2000×2500)。同じ比率を維持。
  • 「上部のスペースが多すぎる」→ Yオフセットを増やす(トリミングを下にシフト)。
  • 「下部のスペースが多すぎる」→ Yオフセットを減らす(トリミングを上にシフト)。
  • 「より広く/狭くする必要がある」→ 比率を維持しながらWとHを調整します。

トリミング計算式:

magick "source.png" -crop <W>x<H>+<X>+<Y> "cropped.png"
# X = (original_width − W) / 2  (中央揃え)
# Y = 被写体の位置に応じて調整

5. LinkedIn用にリサイズ・圧縮

magick "cropped.png" -resize 1080x1350 -quality 85 "<name>-linkedin.jpg"

プロフィール写真の場合:

magick "cropped.png" -resize 800x800 -quality 85 "<name>-linkedin-profile.jpg"

カバー写真の場合:

magick "cropped.png" -resize 1584x396 -quality 85 "<name>-linkedin-cover.jpg"

4:3投稿の場合:

magick "source.png" -resize 1440x1080 -quality 85 "<name>-linkedin-4by3.jpg"

6. 出力の確認

ls -lh "<output>.jpg"
sips -g pixelWidth -g pixelHeight "<output>.jpg"

確認事項:

  • 寸法がターゲットと一致しているか
  • ファイルサイズが8MB未満(できれば1MB未満)
  • 品質が許容範囲か

どの動画形式を選ぶべきですか?

ソースの向き目的推奨ターゲット
縦向き(スマホ動画)最大モバイルフィード表示縦長 1080×1920(ソースが3:4や4:5の場合は黒でパディング)
縦向き(スマホ動画)安全な汎用互換性正方形 1080×1080(中央クロップ)
横向き(画面録画、カメラ)標準フィード動画横長 1920×1080
横向き安全な汎用互換性正方形 1080×1080(中央クロップ)
不明—正方形 1080×1080

経験則: 正方形はどこでも使えます。縦長はモバイル画面のスペースを最大限に活用できますが、デスクトップではレターボックス表示になる可能性があります。横長はデモ、インタビュー、シネマティックコンテンツに最適です。


動画ワークフロー

1. ソースの確認

ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,avg_frame_rate,duration,bit_rate \
  -show_entries format=duration,size,bit_rate \
  -of csv=p=0 "<input>"

回転メタデータも確認:

ffprobe -v error -select_streams v:0 -show_entries stream_side_data=display_matrix \
  -of default=nk=1:nw=1 "<input>"

2. 回転の処理(iPhone / モバイルソース)

モバイル動画はフレームを横向きで保存し、回転タグを付けることがよくあります。トリミング/スケーリング前にフィルターチェーンでtransposeを適用します。

表示行列Transpose値意味
-90° (270°)190°時計回り
+90°290°反時計回り
180°3180°
回転なし省略—

3. ターゲットを選択し、フィルターチェーンを構築

正方形(1080×1080) — 回転後に中央クロップ:

transpose=1,crop=1080:1080:(in_w-1080)/2:(in_h-1080)/2,format=yuv420p

横長(1920×1080) — フィットするようにスケールしてからパディング、または中央クロップ:

transpose=1,scale=1920:-2,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black,format=yuv420p

縦長(1080×1920) — 幅に合わせてスケールし、上下にパディング:

transpose=1,scale=1080:-2,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black,format=yuv420p

ソースのアスペクト比がすでにターゲットと一致している場合は、padを省略し、単にscale=1080:1080またはscale=1920:1080を使用できます。

4. よくあるワンライナー(縦向きiPhone → 正方形)

最も頻繁なリクエスト:縦向きiPhone動画をLinkedIn対応の正方形MP4に変換。

ffmpeg -y -i "IMG_xxxx.MOV" \
  -vf "transpose=1,crop=1080:1080:(in_w-1080)/2:(in_h-1080)/2,format=yuv420p" \
  -c:v libx264 -profile:v main -level 4.2 -preset medium -crf 23 -r 30 \
  -c:a aac -b:a 128k -movflags +faststart \
  "output_linkedin_square.mp4"

transpose=1をステップ2で確認した正しい回転値に置き換えるか、ソースに回転メタデータがない場合はtranspose=1,を省略します。

5. トランスコード

ffmpeg -y -i "<input>" \
  -vf "<filter_chain>" \
  -c:v libx264 -profile:v main -level 4.2 -preset medium -crf 23 -r 30 \
  -c:a aac -b:a 128k \
  -movflags +faststart \
  "<output>.mp4"

パラメータの補足:

  • -profile:v main -level 4.2 — 広範なデバイス互換性
  • -crf 23 — 品質とサイズのバランスが良好(低いほど高品質)
  • -r 30 — フレームレートの統一
  • -movflags +faststart — ウェブストリーミングのためにmoovアトムを先頭に配置

6. 出力の確認

ls -lh "<output>.mp4"
ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,avg_frame_rate,duration,bit_rate \
  -show_entries format=duration,size,bit_rate \
  -of csv=p=0 "<output>.mp4"

確認事項:

  • 寸法がターゲットと一致しているか
  • ファイルサイズがアップロード可能な範囲(理想的には200MB未満)
  • 回転メタデータが残っていないか(プレーヤーが再度回転しないように)

ツール

  • 画像: magick(ImageMagick 7)またはconvert(ImageMagick 6)を推奨。macOSでは基本的な形式変換にsipsをフォールバックとして使用。brew install imagemagickでインストール。
  • 動画: ffmpeg + ffprobe。brew install ffmpegでインストール。

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

getedgehq/http-error-triage

Run before concluding anything from an HTTP error on a third-party API. Separates a real credential/entitlement problem from a CDN or WAF block, a wrong endpoint, or a client-signature ban. Use whenever an API returns 401/403/402/429 and you are about to say "the key is dead", "credits are exhausted", "the plan lacks access", or "we are rate limited".

getedgehq/monid

>-

getedgehq/opendraft

An 18-agent pipeline that turns one topic line into a drafted

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/shadcn-first

>-

getedgehq/skills

Develop or review a branded long-form YouTube channel using Simon Kaiser's public creator-led approach: audience fit, recurring formats, natural brand integration, Time with Brand, and an organic, paid, and Shorts strategy. Use for channel strategy, format briefs, and pilots.

getedgehq/skills

Build a YouTube strategy, evidence-backed idea slate, and title plus thumbnail package using Paddy Galloway's public method. Use when planning a channel, choosing concepts, or preparing a video before filming.

getedgehq/skills

Build or review a buyer-centered strategic narrative using Andy Raskin's public method. Use for sales or investor deck stories, homepage positioning, keynotes, launch narratives, and why-now messaging.

getedgehq/skills

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

関連スキル