Skip to content
Development
Skill

/apple-image-representation-workflow

Guide Apple image decoding, encoding, metadata, thumbnails, multi-frame sources, and representation bridging across Image I/O, Core Graphics, AppKit NSImage and NSImageRep, UIKit UIImage, Core Image, and Core Video. Use when image work involves files, data, representations,

From plugin
socket
9200 skills5 MCP

Claude Code

$ npx -y skills add gaelic-ghost/socket --skill apple-image-representation-workflow --agent claude-code

SKILL.md

apple-image-representation-workflow.SKILL.md
name: apple-image-representation-workflow
description: Guide Apple image decoding, encoding, metadata, thumbnails, multi-frame sources, and representation bridging across Image I/O, Core Graphics, AppKit NSImage and NSImageRep, UIKit UIImage, Core Image, and Core Video. Use when image work involves files, data, representations, orientation, scale, color, metadata, or conversion rather than pixel effects or visual recognition.

Apple Image Representation Workflow

Purpose

Guide image source, destination, representation, and conversion work without flattening distinct Apple image types into a generic wrapper. Keep file encoding, rendered pixels, processing recipes, platform display containers, metadata, and auxiliary images visibly separate.

When To Use

  • Use for Image I/O sources and destinations, metadata, thumbnails, incremental loading, multi-frame images, `CGImage`, `NSImage`, `NSImageRep`, `NSBitmapImageRep`, `UIImage`, and representation conversion.
  • Recommend `core-image-processing-workflow` when filters, compositing, RAW development, custom kernels, or rendering are primary.
  • Recommend the Vision workflow when the requested outcome is recognition or analysis rather than representation ownership.

Single-Path Workflow

1. Classify the request:

  • source inspection or decoding
  • incremental loading or thumbnailing
  • metadata or auxiliary data
  • destination encoding or multi-frame output
  • Core Graphics raster ownership
  • AppKit representation or drawing
  • UIKit image display ownership
  • conversion or repair

2. Apply the Apple docs gate:

  • read current Image I/O, Core Graphics, AppKit, or UIKit documentation first
  • state the documented behavior relied on
  • check API, image-format, auxiliary-data, and platform availability before promising a decode, encode, or representation path
  • apply `../../shared/references/apple-image-type-ownership.md`
  • use `references/image-io-decoding-encoding-and-metadata.md` for source and destination work
  • use `references/apple-image-representations-and-bridging.md` for type selection and conversion

3. Preserve source meaning:

  • inspect type, frame count, dimensions, properties, orientation, color profile, alpha, dynamic range, and auxiliary data before conversion
  • choose decode-time thumbnailing or incremental loading when the workload requires it
  • identify whether metadata and original encoded bytes must survive

4. Choose the representation:

  • `CGImage` for concrete raster pixels and Core Graphics drawing
  • `CIImage` for a lazy processing graph
  • `NSImage` and `NSImageRep` for macOS display-oriented multi-representation behavior
  • `UIImage` for UIKit display semantics including scale and orientation
  • `CVPixelBuffer` for frame-oriented media and hardware interop

5. Encode deliberately:

  • choose destination type, frame count, properties, metadata policy, orientation policy, color profile, compression, and auxiliary-data policy
  • add every image or frame
  • require successful `CGImageDestinationFinalize` before claiming output exists

6. Return one recommendation with source facts, chosen types, conversion losses, decode/encode plan, memory and cancellation policy, diagnostics, and validation.

Inputs

  • `request`: image representation, decode, encode, metadata, or conversion task.
  • `representation_goal`: `inspect`, `decode`, `thumbnail`, `incremental`, `metadata`, `encode`, `appkit`, `uikit`, `bridge`, or `repair`.
  • `platform_context`: `ios`, `ipados`, `macos`, `tvos`, `watchos`, `visionos`, or `mixed-apple`.

Outputs

  • `status`: `success`, `handoff`, or `blocked`.
  • `path_type`: `primary` when image representation owns the work, `fallback` when processing, analysis, capture, or codecs own it.
  • `output`: documented behavior, source inventory, selected representation, conversion-loss ledger, decode/encode plan, diagnostics, and validation.

Guards and Stop Conditions

  • Do not assume `NSImage` contains one fixed bitmap; it can own multiple representations and select among them for drawing.
  • Do not assume `UIImage`, `NSImage`, `CGImage`, and `CIImage` preserve the same orientation, scale, metadata, color, or rendering semantics.
  • Do not fully decode large images merely to produce a small thumbnail when Image I/O thumbnailing fits the requirement.
  • Do not discard source metadata, ICC profiles, animation frames, depth, disparity, gain maps, mattes, or other auxiliary data silently.
  • Do not claim an encoded destination succeeded before finalization returns success.
  • Do not invent image repositories, managers, or mirrored metadata models when Image I/O properties and framework values express the boundary.
  • Stop when required source bytes, format support, destination policy, or preservation requirements are unavailable.

Fallbacks and Handoffs

  • Recommend `core-image-processing-workflow` for filters, RAW development, compositing, color processing, custom kernels, or rendering.
  • Recommend `vision-image-analysis-workflow` for recognition and analysis.
  • Recommend `appkit-app-architecture-workflow` for broader macOS view, controller, window, or application ownership.
  • Recommend `avfoundation-media-pipeline-workflow` for assets, capture, video, readers, writers, or export.
  • Recommend `photos-library-editing-workflow` for PhotoKit and PhotosUI ownership.
  • Recommend `xcode-build-run-workflow` for target resources, build, run, device, or profiling follow-through.
  • Recommend `xcode-testing-workflow` for image fixtures, metadata round trips, comparison tests, or performance baselines.
  • Recommend `explore-apple-swift-docs` when documentation lookup is the real need.

References

  • `references/image-io-decoding-encoding-and-metadata.md`
  • `references/apple-image-representations-and-bridging.md`
  • `../../shared/references/apple-image-type-ownership.md`
  • Recommend `references/snippets/apple-xcode-project-core.md` for reusable Xcode-project pol
Read more
@gaelic-ghost
Ships withsocket

Stuff for Agents on macOS Promo audio: Socket Codex Marketplace Promo

9200 skills5 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
9
Star history of gaelic-ghost/socket on GitHub, a chart by star-history.com

Other skills on socket.

orchestrate-agent-work

orchestrate-agent-work

Coordinate bounded worker tasks with a launch envelope, report-back, escalation, and synthesis contract. Use before spawning,…

@gaelic-ghost@gaelic-ghostInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about apple-image-representation-workflow.

Which coding agents can use apple-image-representation-workflow?
apple-image-representation-workflow installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.