Skip to main content

Process Media

Atomic function to process media URLs (video, image, Linear attachment) and return structured output. Wraps the video skill's core processing. Called by /new and /go before DESIGN.

Process Media

Atomic function that takes a URL (video, image, or Linear attachment) and returns structured output. This is NOT a standalone user-facing command — it is a procedure referenced by /new (when a media URL is in args) and /go (before DESIGN step). The /video skill remains the standalone user-facing entry point for video processing.

Scope: This skill covers media URL detection and processing dispatch. It is NOT about video summarization output formats (see video skill for terminal/Linear/Obsidian output modes).

Inputs

  • URL (required) — A video, image, or Linear attachment URL

Outputs

Structured output depending on media type:

  • Video: transcript text, keyframe paths, manifest metadata
  • Image: fetched image available for viewing
  • Linear attachment: downloaded file available for viewing/reading

Procedure

M1. Detect media type

Classify the URL:

Pattern Type
youtube.com, youtu.be, vimeo.com, loom.com, screencast.com, or any yt-dlp-compatible URL video
.png, .jpg, .jpeg, .gif, .webp, .svg, or image hosting domains image
uploads.linear.app linear-attachment

If the URL doesn't match any pattern, return: "Unrecognized media URL format."

M2. Process by type

Video URLs

Process via the existing video skill's core script:

MANIFEST=$(bash ~/.claude/skills/video/process_video.sh "<url>")

Read the manifest, transcript, and segments files. Return:

  • Transcript text (from transcript.txt)
  • Keyframe paths (from manifest)
  • Video metadata (title, duration, source)

Image URLs

Fetch and make available for viewing:

curl -sL -o /tmp/process-media-image "<url>"

Return: path to downloaded image for the caller to view via Read tool.

Linear attachment URLs

Fetch with auth header:

curl -sL -H "Authorization: $LINEAR_API_KEY" -o /tmp/process-media-attachment "<url>"

Return: path to downloaded attachment for the caller to view/read.

M3. Return structured output

Return to the calling command:

  • type: video | image | linear-attachment
  • content: transcript text, image path, or attachment path
  • metadata: any extracted metadata (title, duration, dimensions, filename)

Integration points

From /new

If a media URL is provided alongside the title argument, call process-media before generating the structured description. Use the media content to enrich the Summary and Acceptance Criteria.

From /go

Before starting DESIGN (Step 4), scan the issue description for media URLs. For each URL found, call process-media. If media fails to load, apply awaiting-input label and STOP with comment: "Cannot access attached media."

If media is present, update the issue description with findings (chapters, transcript in collapsible blocks).

Error handling

  • If process_video.sh fails → return error with stderr output
  • If image download fails → retry once, then return error
  • If Linear attachment requires auth and LINEAR_API_KEY is not set → return error: "LINEAR_API_KEY required for Linear attachments"
  • All errors are returned to the caller — process-media does not apply labels or stop the pipeline itself

Search Framework Explorer

Search agents, skills, and standards