Automated summary
Generates a system of shareable card images from app content (achievements, stats, quotes) using SwiftUI ImageRenderer and ShareLink.
Strengths
- Natively integrates ImageRenderer and ShareLink for smooth sharing
- Offers multiple styles (minimal, branded, statistics) and image formats (square, story, wide)
- Supports optional QR code overlays for deep linking
- Automatically creates required Swift files with a modular structure
Limitations
- Requires iOS 16+ or macOS 13+ for ImageRenderer
- Advanced customization may require manual post-generation edits
- Does not handle direct posting to third-party social APIs (Twitter, Instagram) – only the system share sheet
Use this skill when you need to quickly generate customizable shareable images from app data, such as for achievements, statistics, or quotes.
Avoid this skill if you need programmatic social sharing without a UI or if your target deployment is below iOS 16 / macOS 13.
Security analysis
SafeThe skill generates Swift code for shareable cards; it does not instruct the AI to perform destructive or data-exfiltrating actions. The use of Bash is allowed but only for benign file operations, not for risky commands like curl|sh or rm -rf. No obfuscated payloads or safety bypasses are present.
No concerns found
How this analysis is madeExamples
Generate share cards for my fitness app's achievements with a branded style, square size, and QR code linking to the app store.Create a shareable statistics card for a habit tracker app. Show weekly progress numbers in a clean minimal layout with ShareLink integration.I need a share card system that takes quotes from my app and renders them as wide images (1200x630) optimized for Twitter/X. Include a QR code overlay.name: share-card description: Generates shareable card images from app content (achievements, stats, quotes) for social media sharing. Use when user wants to create share images, social cards, shareable content cards, or export app content as images with ShareLink integration. allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion]
Share Card Generator
Generate a production share card system that renders app content (achievements, statistics, quotes, milestones) as shareable images with SwiftUI ImageRenderer, customizable styles, optional QR code overlays, and native ShareLink integration.
When This Skill Activates
Use this skill when the user:
- Asks to "generate share cards" or "create shareable images"
- Wants to "share achievements as images" or "share stats to social media"
- Mentions "social media cards" or "shareable content cards"
- Asks about "exporting content as images" or "screenshot sharing"
- Wants "branded share images" or "share card templates"
- Asks to "add ShareLink with image" or "share rendered SwiftUI view"
- Wants "QR code on share image" or "deep link in share card"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 16+ / macOS 13+ minimum for
ImageRenderer) - [ ] Check for @Observable support (iOS 17+ / macOS 14+)
- [ ] Identify source file locations
2. Conflict Detection
Search for existing share/export code:
Glob: **/*ShareCard*.swift, **/*ShareImage*.swift, **/*SocialCard*.swift
Grep: "ImageRenderer" or "ShareLink" or "UIGraphicsImageRenderer" or "share.*image"
If existing share infrastructure found:
- Ask if user wants to replace or extend it
- If extending, integrate with existing models and styles
3. Platform Detection
Determine if generating for iOS (UIImage) or macOS (NSImage) or both (cross-platform PlatformImage typealias).
Configuration Questions
Ask user via AskUserQuestion:
-
Card style?
- Minimal (clean, text-focused, light/dark adaptive)
- Branded (app logo, brand colors, custom typography)
- Statistics (data-heavy with charts/numbers emphasis)
-
Share destinations?
- Social media (Instagram, Twitter/X — optimized aspect ratios)
- Messages / General sharing (flexible sizing)
- Both — recommended
-
Card size preset?
- Square (1080x1080 — Instagram, general purpose)
- Story (1080x1920 — Instagram Stories, TikTok)
- Wide (1200x630 — Twitter/X, Open Graph)
- Custom (user-specified dimensions)
-
Include QR code?
- Yes (deep link or App Store URL embedded in card corner)
- No (cleaner card, no link)
-
Content types? (multi-select)
- Achievements / Milestones
- Statistics / Progress
- Quotes / Text content
- Custom (user defines their own content model)
Generation Process
Step 1: Read Templates
Read templates.md for production Swift code.
Step 2: Create Core Files
Generate these files:
ShareCardContent.swift— Protocol and concrete content types (achievement, statistics, quote)ShareCardStyle.swift— Enum with predefined styles, colors, fonts, layout configurationShareCardRenderer.swift—@MainActorrenderer usingImageRendererto convert SwiftUI views to imagesShareCardView.swift— The SwiftUI view that composes the card layout (background, content, branding)
Step 3: Create UI Files
ShareCardSheet.swift— Complete sharing sheet with style picker, live preview, andShareLink
Step 4: Create Optional Files
Based on configuration:
QRCodeOverlay.swift— If QR code selected (CoreImage-based QR generator)ShareCardPreview.swift— SwiftUI Preview helpers for design iteration
Step 5: Determine File Location
Check project structure:
- If
Sources/exists ->Sources/ShareCard/ - If
App/exists ->App/ShareCard/ - Otherwise ->
ShareCard/
Output Format
After generation, provide:
Files Created
ShareCard/
├── ShareCardContent.swift # Protocol + concrete content types
├── ShareCardStyle.swift # Style enum with colors, fonts, layout
├── ShareCardRenderer.swift # ImageRenderer-based rendering
├── ShareCardView.swift # Card layout SwiftUI view
├── ShareCardSheet.swift # Share sheet with preview + ShareLink
├── QRCodeOverlay.swift # CoreImage QR code (optional)
└── ShareCardPreview.swift # Preview helpers (optional)
Integration Steps
Share an achievement:
struct AchievementDetailView: View {
let achievement: Achievement
@State private var showShareCard = false
var body: some View {
VStack {
// ... achievement detail content ...
Button("Share Achievement") {
showShareCard = true
}
}
.sheet(isPresented: $showShareCard) {
ShareCardSheet(
content: AchievementCardContent(
title: achievement.title,
subtitle: achievement.description,
metric: "\(achievement.points) pts",
iconName: achievement.iconName,
brandName: "MyApp"
)
)
}
}
}
Share statistics:
ShareCardSheet(
content: StatisticsCardContent(
title: "Weekly Progress",
stats: [
StatItem(label: "Steps", value: "52,340"),
StatItem(label: "Calories", value: "3,200"),
StatItem(label: "Distance", value: "28.5 km"),
],
brandName: "FitTracker"
)
)
Share a quote:
ShareCardSheet(
content: QuoteCardContent(
quote: "The only way to do great work is to love what you do.",
attribution: "Steve Jobs",
brandName: "DailyQuotes"
)
)
Inline ShareLink (without sheet):
struct QuickShareButton: View {
let content: any ShareCardContent
@State private var renderedImage: PlatformImage?
var body: some View {
Group {
if let image = renderedImage {
ShareLink(
item: Image(platformImage: image),
preview: SharePreview(content.title, image: Image(platformImage: image))
)
} else {
ProgressView()
}
}
.task {
let renderer = ShareCardRenderer()
renderedImage = await renderer.render(content: content, style: .branded)
}
}
}
Testing
@Test
func rendersAchievementCard() async throws {
let content = AchievementCardContent(
title: "First Run",
subtitle: "Completed your first 5K run",
metric: "500 pts",
iconName: "figure.run",
brandName: "FitApp"
)
let renderer = ShareCardRenderer()
let image = await renderer.render(content: content, style: .branded)
#expect(image != nil)
#expect(image!.size.width > 0)
#expect(image!.size.height > 0)
}
@Test
func allStylesRenderSuccessfully() async throws {
let content = QuoteCardContent(
quote: "Test quote",
attribution: "Author",
brandName: "App"
)
let renderer = ShareCardRenderer()
for style in ShareCardStyle.allCases {
let image = await renderer.render(content: content, style: style)
#expect(image != nil, "Style \(style) failed to render")
}
}
@Test
func qrCodeGeneratesValidImage() throws {
let image = QRCodeGenerator.generate(
from: "https://example.com/share/123",
size: CGSize(width: 100, height: 100)
)
#expect(image != nil)
}
Common Patterns
Achievement Card
Best for: gamification, milestones, unlockables.
- Large icon or badge at top
- Achievement title prominently displayed
- Metric or point value highlighted
- App branding at bottom
Statistics Card
Best for: fitness, finance, productivity apps.
- Grid or list of stat items with labels and values
- Optional trend indicators (up/down arrows)
- Date range context
- App branding at bottom
Quote Card
Best for: reading, journaling, social apps.
- Large quotation marks or decorative element
- Quote text centered with elegant typography
- Attribution below quote
- Minimal branding
Gotchas
Image Quality for Different Platforms
- Instagram: JPEG works, but use high quality (0.9+) to avoid artifacts on text
- Twitter/X: PNG preserves text sharpness but larger file size
- Use
@2xscale factor inImageRendererfor Retina-quality output - Always render at the display scale:
renderer.scale = UIScreen.main.scale(iOS) orNSScreen.main?.backingScaleFactor(macOS)
Memory for Large Renders
- A 1080x1920 card at
@3xscale = 3240x5760 pixels = ~75 MB in memory - Render at
@2xmaximum for share cards — social platforms compress anyway - Release the rendered image after sharing completes
- Use
autoreleasepoolif generating multiple cards in sequence
ImageRenderer Limitations
ImageRendereris@MainActor— must be called from the main thread- Minimum iOS 16 / macOS 13
- Does not render
Map,Camera, orWebViewcontent - Animations are not captured — renders a single frame
ScrollViewcontent beyond visible bounds is not rendered
Cross-Platform Rendering
- On macOS,
ImageRendererproducesNSImageviansImageproperty - On iOS, use
uiImageproperty - Use the
PlatformImagetypealias pattern for shared code UIGraphicsImageRendereris UIKit-only — preferImageRendererfor SwiftUI cross-platform code
ShareLink Gotchas
ShareLinkrequires the shared item to conform toTransferableImageconforms toTransferableon iOS 16+ / macOS 13+- For custom share items, implement
TransferablewithDataRepresentation ShareLinkrenders as a button — style it to match your UI
References
- templates.md — All production Swift templates
- Related:
generators/image-loading— Cache rendered share card images - Related:
ios/deep-linking— Generate deep links for QR codes
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/share-card-generator-mm5t8ban/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/share-card-generator-mm5t8ban' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/share-card-generator-mm5t8ban/download' --output '.skill-downloads/share-card-generator-mm5t8ban/SKILL.md.part' && mv '.skill-downloads/share-card-generator-mm5t8ban/SKILL.md.part' '.skill-downloads/share-card-generator-mm5t8ban/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/share-card-generator-mm5t8ban/SKILL.md' && test -s '.skill-downloads/share-card-generator-mm5t8ban/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/share-card' && cp -R '.skill-downloads/share-card-generator-mm5t8ban' '.claude/skills/share-card'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/share-card-generator-mm5t8ban'openskills read 'share-card-generator-mm5t8ban'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/share-card-generator-mm5t8ban/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.