/social-export
Generates infrastructure for exporting app content to social platforms (Instagram Stories, TikTok, Twitter/X) with platform-specific formatting, aspect ratios, and metadata. Use when user wants social media export, share to stories, or platform-specific sharing pipelines.
$ npx -y skills add rshankras/claude-code-apple-skills --skill social-export --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/social-export
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generates infrastructure for exporting app content to social platforms (Instagram Stories, TikTok, Twitter/X) with platform-specific formatting, aspect ratios, and metadata. Use when user wants social media export, share to stories, or platform-specific sharing pipelines.
SKILL.md
social-export.SKILL.mdname: social-export
description: Generates infrastructure for exporting app content to social platforms (Instagram Stories, TikTok, Twitter/X) with platform-specific formatting, aspect ratios, and metadata. Use when user wants social media export, share to stories, or platform-specific sharing pipelines.
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion]
last_verified: 2026-07-16
review_by: 2027-06-22
os_version: iOS 27 / macOS 27
Social Export Generator
Generate a production social export pipeline with platform-specific formatters, aspect ratio handling, branding overlays, and a complete SwiftUI export flow. Different from share-card (which creates the visual image) — this handles the full export pipeline to each social platform.
When This Skill Activates
Use this skill when the user:
- Asks to "export to Instagram" or "share to Instagram Stories"
- Wants "social media export" or "social sharing pipeline"
- Mentions "share to TikTok" or "export for TikTok"
- Asks about "platform-specific sharing" or "export to Twitter/X"
- Wants to "format content for social platforms"
- Mentions "story export" or "share to stories"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 16+ / macOS 13+)
- [ ] Check for @Observable support (iOS 17+ / macOS 14+)
- [ ] Identify source file locations
2. Conflict Detection
Search for existing social export or sharing code:
Glob: **/*SocialExport*.swift, **/*ShareExport*.swift, **/*StoryExport*.swift
Grep: "UIActivityViewController" or "instagram-stories" or "SocialPlatform"
If existing share infrastructure found:
- Ask if user wants to extend or replace it
- If extending, integrate with existing sharing code
3. Framework Detection
Check for frameworks already in use:
Grep: "import Photos" or "import PhotosUI" or "import LinkPresentation"
Grep: "UIDocumentInteractionController" or "UIActivityViewController"
If Photos framework is used, export pipeline can integrate save-to-library as a fallback.
Configuration Questions
Ask user via AskUserQuestion:
1. **Target platforms?** (multi-select)
- Instagram Stories (URL scheme + pasteboard)
- TikTok (URL scheme + share API)
- Twitter/X (URL scheme + activity controller)
- General share sheet (UIActivityViewController fallback)
2. **Content type?**
- Image only (photo, illustration, screenshot)
- Video (short-form video export)
- Text + Image (quote cards, text overlays on images)
3. **Include app branding overlay?**
- Yes — add app logo/name watermark to exported content
- No — export clean content
4. **Watermark style?** (if branding selected)
- Corner logo (small, unobtrusive)
- Bottom banner (app name + URL strip)
- None
Generation Process
Step 1: Read Templates
Read `templates.md` for production Swift code.
Step 2: Create Core Files
Generate these files: 1. `SocialPlatform.swift` — Enum for supported platforms with requirements (aspect ratio, max file size, URL scheme) 2. `ExportConfiguration.swift` — Configuration struct for export options (platform, quality, branding, watermark) 3. `SocialExporter.swift` — Protocol + platform-specific implementations for each social network
Step 3: Create Content Formatting
4. `ContentFormatter.swift` — Formats content per platform (resize, crop to aspect ratio, add metadata)
Step 4: Create UI Files
5. `ExportPreviewView.swift` — SwiftUI preview showing how content will look on each platform 6. `SocialExportSheet.swift` — Complete export flow with platform picker, preview, and share action
Step 5: Determine File Location
Check project structure:
- If `Sources/` exists -> `Sources/SocialExport/`
- If `App/` exists -> `App/SocialExport/`
- Otherwise -> `SocialExport/`
Output Format
After generation, provide:
Files Created
SocialExport/
├── SocialPlatform.swift # Platform enum with requirements
├── ExportConfiguration.swift # Export options configuration
├── SocialExporter.swift # Protocol + platform exporters
├── ContentFormatter.swift # Resize, crop, metadata
├── ExportPreviewView.swift # Platform-specific preview
└── SocialExportSheet.swift # Complete export flow UI
Integration Steps
**Export an image to Instagram Stories:**
let config = ExportConfiguration(
platform: .instagramStories,
quality: .high,
branding: .cornerLogo(UIImage(named: "AppLogo")!)
)
let exporter = SocialExporter()
try await exporter.export(image: myImage, configuration: config)**Present the export sheet:**
struct ContentDetailView: View {
let content: AppContent
@State private var showExportSheet = false
var body: some View {
VStack {
ContentView(content: content)
Button("Share to Social") {
showExportSheet = true
}
}
.sheet(isPresented: $showExportSheet) {
SocialExportSheet(image: content.renderedImage)
}
}
}**Quick share with fallback:**
let exporter = SocialExporter()
// Tries platform-specific export first, falls back to share sheet
try await exporter.export(
image: shareImage,
configuration: .init(platform: .instagramStories),
fallbackToShareSheet: true,
presentingViewController: viewController
)Testing
@Test
func instagramStoriesExportFormatsCorrectly() async throws {
let formatter = ContentFormatter()
let testImage = UIImage.testSolidColor(.red, size: CGSize(width: 1000, height: 1000))
let formatted = try formatter.format(testImage, for: .instagramStories)
// Instagram Stories expects 9:16 aspect ratio (1080x1920)
#expect(formatted.size.width == 1080)
#expect(formatted.size.height == 1920)
}
@Test
func fallsBackToShareSheetWhenAppNotInstalled() async throws {
let exporter = MockSocialExporter(installedAppRead more
name: social-export description: Generates infrastructure for exporting app content to social platforms (Instagram Stories, TikTok, Twitter/X) with platform-specific formatting, aspect ratios, and metadata. Use when user wants social media export, share to stories, or platform-specific sharing pipelines. allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion] last_verified: 2026-07-16 review_by: 2027-06-22 os_version: iOS 27 / macOS 27
Social Export Generator
Generate a production social export pipeline with platform-specific formatters, aspect ratio handling, branding overlays, and a complete SwiftUI export flow. Different from share-card (which creates the visual image) — this handles the full export pipeline to each social platform.
When This Skill Activates
Use this skill when the user:
- Asks to "export to Instagram" or "share to Instagram Stories"
- Wants "social media export" or "social sharing pipeline"
- Mentions "share to TikTok" or "export for TikTok"
- Asks about "platform-specific sharing" or "export to Twitter/X"
- Wants to "format content for social platforms"
- Mentions "story export" or "share to stories"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 16+ / macOS 13+)
- [ ] Check for @Observable support (iOS 17+ / macOS 14+)
- [ ] Identify source file locations
2. Conflict Detection
Search for existing social export or sharing code:
Glob: **/*SocialExport*.swift, **/*ShareExport*.swift, **/*StoryExport*.swift Grep: "UIActivityViewController" or "instagram-stories" or "SocialPlatform"
If existing share infrastructure found:
- Ask if user wants to extend or replace it
- If extending, integrate with existing sharing code
3. Framework Detection
Check for frameworks already in use:
Grep: "import Photos" or "import PhotosUI" or "import LinkPresentation" Grep: "UIDocumentInteractionController" or "UIActivityViewController"
If Photos framework is used, export pipeline can integrate save-to-library as a fallback.
Configuration Questions
Ask user via AskUserQuestion:
1. **Target platforms?** (multi-select)
- Instagram Stories (URL scheme + pasteboard)
- TikTok (URL scheme + share API)
- Twitter/X (URL scheme + activity controller)
- General share sheet (UIActivityViewController fallback)
2. **Content type?**
- Image only (photo, illustration, screenshot)
- Video (short-form video export)
- Text + Image (quote cards, text overlays on images)
3. **Include app branding overlay?**
- Yes — add app logo/name watermark to exported content
- No — export clean content
4. **Watermark style?** (if branding selected)
- Corner logo (small, unobtrusive)
- Bottom banner (app name + URL strip)
- None
Generation Process
Step 1: Read Templates
Read `templates.md` for production Swift code.
Step 2: Create Core Files
Generate these files: 1. `SocialPlatform.swift` — Enum for supported platforms with requirements (aspect ratio, max file size, URL scheme) 2. `ExportConfiguration.swift` — Configuration struct for export options (platform, quality, branding, watermark) 3. `SocialExporter.swift` — Protocol + platform-specific implementations for each social network
Step 3: Create Content Formatting
4. `ContentFormatter.swift` — Formats content per platform (resize, crop to aspect ratio, add metadata)
Step 4: Create UI Files
5. `ExportPreviewView.swift` — SwiftUI preview showing how content will look on each platform 6. `SocialExportSheet.swift` — Complete export flow with platform picker, preview, and share action
Step 5: Determine File Location
Check project structure:
- If `Sources/` exists -> `Sources/SocialExport/`
- If `App/` exists -> `App/SocialExport/`
- Otherwise -> `SocialExport/`
Output Format
After generation, provide:
Files Created
SocialExport/ ├── SocialPlatform.swift # Platform enum with requirements ├── ExportConfiguration.swift # Export options configuration ├── SocialExporter.swift # Protocol + platform exporters ├── ContentFormatter.swift # Resize, crop, metadata ├── ExportPreviewView.swift # Platform-specific preview └── SocialExportSheet.swift # Complete export flow UI
Integration Steps
**Export an image to Instagram Stories:**
let config = ExportConfiguration(
platform: .instagramStories,
quality: .high,
branding: .cornerLogo(UIImage(named: "AppLogo")!)
)
let exporter = SocialExporter()
try await exporter.export(image: myImage, configuration: config)**Present the export sheet:**
struct ContentDetailView: View {
let content: AppContent
@State private var showExportSheet = false
var body: some View {
VStack {
ContentView(content: content)
Button("Share to Social") {
showExportSheet = true
}
}
.sheet(isPresented: $showExportSheet) {
SocialExportSheet(image: content.renderedImage)
}
}
}**Quick share with fallback:**
let exporter = SocialExporter()
// Tries platform-specific export first, falls back to share sheet
try await exporter.export(
image: shareImage,
configuration: .init(platform: .instagramStories),
fallbackToShareSheet: true,
presentingViewController: viewController
)Testing
@Test
func instagramStoriesExportFormatsCorrectly() async throws {
let formatter = ContentFormatter()
let testImage = UIImage.testSolidColor(.red, size: CGSize(width: 1000, height: 1000))
let formatted = try formatter.format(testImage, for: .instagramStories)
// Instagram Stories expects 9:16 aspect ratio (1080x1920)
#expect(formatted.size.width == 1080)
#expect(formatted.size.height == 1920)
}
@Test
func fallsBackToShareSheetWhenAppNotInstalled() async throws {
let exporter = MockSocialExporter(installedAppA collection of Claude Code skills for iOS, macOS, watchOS, visionOS, and Apple platform development. These skills help you plan and build apps, maintain code quality, ensure HIG compliance, and guide you from idea to App Store.
Repo: rshankras/claude-code-apple-skills
Other skills on rshankras-apple-skills.
- /app-store
App Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive promotional strategy. Use when user needs help with App Store presence, ASO, marketing, or customer communication.
Open skill - /ad-attribution
Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution, conversion-value strategy under crowd anonymity, and end-to-end postback testing. Use when running paid acquisition beyond Apple Ads, measuring
Open skill - /app-description-writer
Generate compelling App Store descriptions that convert browsers into users. Use when writing initial descriptions, improving existing copy, or drafting promotional text and What's New for a major update.
Open skill - /apple-search-ads
Apple Search Ads campaign strategy for indie developers — paid acquisition, keyword bidding, budget planning, and ROAS optimization. Use when user asks about running ads, paid user acquisition, or Apple Search Ads campaigns.
Open skill - /iap-finalizer
Take a one-time in-app purchase from MISSING_METADATA to READY_TO_SUBMIT in App Store Connect — set its price schedule and localized display name/description (and optional review screenshot) via the ASC REST API. Use at Phase 6 (Pre-Release), after the IAP is built in-app (Phase
Open skill - /keyword-optimizer
Optimize app title, subtitle, and keywords for maximum App Store discoverability. Use when launching a new app, improving search rankings, entering new markets/languages, or safely optimizing ASO for an app with existing traffic.
Open skill

