Skip to content
Development
Skill

/photos-library-editing-workflow

Guide privacy-preserving PhotosUI media selection and PhotoKit authorization, limited-library access, assets, collections, fetches, change observation, image/video requests, caching, iCloud delivery, asset resources, creation transactions, albums, content editing, adjustment

From plugin
socket
9200 skills5 MCP

Claude Code

$ npx -y skills add gaelic-ghost/socket --skill photos-library-editing-workflow --agent claude-code

SKILL.md

photos-library-editing-workflow.SKILL.md
name: photos-library-editing-workflow
description: Guide privacy-preserving PhotosUI media selection and PhotoKit authorization, limited-library access, assets, collections, fetches, change observation, image/video requests, caching, iCloud delivery, asset resources, creation transactions, albums, content editing, adjustment data, nondestructive edits, cancellation, and diagnostics. Use when selecting user media or reading, saving, observing, organizing, exporting, or editing the Apple Photos library.

Photos Library and Editing Workflow

Purpose

Guide PhotosUI selection and PhotoKit library work while requesting the narrowest access, preserving typed asset/resource identity, and keeping image processing and video pipelines with their owning frameworks.

When To Use

  • Use for `PhotosPicker`, `PHPickerViewController`, `PHPhotoLibrary`, assets, fetches, collections, image/resource requests, changes, creation, albums, or nondestructive editing.
  • Prefer PhotosUI when the app only needs media the user explicitly selects.
  • Use PhotoKit authorization only for concrete library read, add, observe, organize, or edit behavior.

Single-Path Workflow

1. Classify the request:

  • user-selected image/video through PhotosUI
  • add-only save
  • read/write or limited-library browse
  • asset/collection fetch and change observation
  • image, video, Live Photo, data, or resource request
  • iCloud-backed delivery, progress, cancellation, or caching
  • asset/album creation or transactional change
  • content-editing input/output and adjustment data
  • privacy, lifecycle, or correctness repair

2. Apply the Apple docs gate:

  • read current PhotosUI, PhotoKit, SwiftUI, and Core Transferable documentation for the platform
  • state the documented behavior relied on
  • check API/platform availability before making macOS, iOS, iPadOS, or visionOS claims

3. Choose the narrowest access:

  • use `PhotosPicker` or `PHPickerViewController` for explicit user selection when broad library access is unnecessary
  • use `.addOnly` when the app only saves into Photos
  • use `.readWrite` only for fetch, limited-library, organization, observation, or edit requirements
  • handle `.notDetermined`, `.restricted`, `.denied`, `.authorized`, and `.limited` distinctly
  • require `.authorized`, not merely `.limited`, before fetching, creating, or modifying user albums and provide a picker, selected-assets, or settings fallback when full-library organization is unavailable

4. Preserve typed identity and lifecycle:

  • keep `PhotosPickerItem`, `PHPickerResult`, `PHAsset`, `PHAssetCollection`, `PHFetchResult`, `PHAssetResource`, request IDs, placeholders, and adjustment data typed
  • attach asynchronous results to the current selection, asset local identifier, request ID, fetch result, or edit generation
  • cancel obsolete loads and ignore stale callbacks

5. Perform changes transactionally:

  • create `PHAssetCreationRequest`, asset/collection change requests, and placeholders only inside `PHPhotoLibrary.performChanges`
  • surface transaction errors and fetch created objects after commit when needed

6. Return documented behavior, picker-versus-library decision, authorization/purpose-string policy, asset/resource identity, request/cancellation and iCloud policy, transactional/editing plan, diagnostics, validation, and handoffs.

Inputs

  • `request`: Photos selection, library, resource, save, or edit task.
  • `photos_goal`: `pick`, `add`, `browse`, `fetch`, `observe`, `request`, `resource`, `create`, `album`, `edit`, or `repair`.
  • `platform_context`: Apple platform, deployment target, UI framework, and Photos availability.
  • `privacy_context`: required access level, user explanation, metadata policy, network/iCloud policy, retention, and export behavior.

Outputs

  • `status`: `success`, `handoff`, or `blocked`.
  • `path_type`: `primary` for PhotosUI/PhotoKit, `fallback` for image decode/process, video, UI architecture, or execution.
  • `output`: documented behavior, access decision, identity/lifecycle, request/change/edit plan, diagnostics, validation, and handoffs.

Guards and Stop Conditions

  • Do not request PhotoKit read/write authorization when a system picker or add-only access fulfills the feature.
  • Do not treat `.limited` as fully authorized or as denial; operate on the visible library and provide the documented management path when appropriate.
  • Do not promise album browsing or organization under `.limited`; require full `.authorized` read/write access before fetching, creating, renaming, deleting, or changing user albums.
  • Do not mirror the entire library into app-owned state or introduce a Photos repository when `PHFetchResult`, local identifiers, change details, and picker bindings express the requirement.
  • Do not assume a picker item, asset, or resource is local; model iCloud/network delivery, progress, cancellation, and failure explicitly.
  • Do not treat degraded or opportunistic image callbacks as final, and do not let stale request callbacks overwrite a newer selection.
  • Do not silently substitute adjusted content for original resources, flatten Live Photos, discard RAW/paired resources, or copy metadata without an explicit policy.
  • Do not claim a library change succeeded before `performChanges` completes successfully.
  • Do not destructively replace edited content when PhotoKit's content-editing and adjustment-data contract requires nondestructive output.
  • Stop when authorization, selected item, resource identity, network policy, or required runtime evidence is unavailable.

Fallbacks and Handoffs

  • Recommend `apple-image-representation-workflow` for Image I/O decode/encode, metadata inspection, thumbnails, and image representations.
  • Recommend `core-image-processing-workflow` for image effects, color, RAW processing, masks, and rendering.
  • Recommend `avfoundation-media-pipeline-workflow` for video assets, playback, export, reader/writer, and tra
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.

skills11d309k
@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 photos-library-editing-workflow.

Which coding agents can use photos-library-editing-workflow?
photos-library-editing-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.