app-extensions
БесплатноБез исполняемых скриптовНе проверенGenerates app extension infrastructure for Share Extensions, Action Extensions, Keyboard Extensions, and Safari Web Extensions with data sharing via App…
от rshankras★ 922 звезды на GitHubОб этом скилле
App Extensions Generator
Generate production app extension infrastructure -- Share Extensions for receiving content from other apps, Action Extensions for manipulating content in-place, Keyboard Extensions for custom input, and Safari Web Extensions for browser integration. Includes App Group data sharing between the host app and extensions.
When This Skill Activates
Use this skill when the user:
- Asks to "add a share extension" or "share sheet extension"
- Wants to "receive content from other apps" or "accept shared content"
- Mentions "action extension" or "content manipulation extension"
- Wants to "add a custom keyboard" or "keyboard extension"
- Asks about "Safari extension" or "Safari web extension"
- Mentions "app extension" or "extension target" generically
- Wants to "share data between app and extension" or "App Groups"
Pre-Generation Checks
1. Project Context Detection
- Check deployment target (iOS 16+ / macOS 13+)
- Check Swift version (requires Swift 5.9+)
- Identify project structure (find .xcodeproj or Package.swift)
- Identify source file locations
2. Existing Extension Detection
Search for existing extension targets:
Glob: **/*Extension*/*.swift, **/*Extension*/Info.plist
Grep: "NSExtensionPointIdentifier" or "NSExtensionPrincipalClass"
If existing extensions found:
- Ask if user wants to add another or modify existing
- Identify existing App Groups configuration
3. App Groups Detection
Check for existing App Groups setup:
Glob: **/*.entitlements
Grep: "com.apple.security.application-groups"
If App Groups exist, reuse the existing group identifier.
Configuration Questions
Ask user via AskUserQuestion:
What type of extension?
- Share Extension (accept content from other apps, display share UI)
- Action Extension (manipulate content in-place -- transform text, edit images)
- Keyboard Extension (custom input keyboard with KeyboardViewController)
- Safari Web Extension (inject JavaScript/CSS into web pages)
What content types does it handle?
- Text (plain text, rich text)
- URLs (web links, deep links)
- Images (photos, screenshots)
- Files (documents, PDFs, archives)
- All (any content type)
Does the extension need to share data with the main app?
- Yes -- needs App Groups (shared UserDefaults, shared file container, shared Keychain)
- No -- extension is self-contained
Generation Process
Step 1: Read Templates
Read templates.md for production Swift code.
Step 2: Create Extension Files
Based on extension type selected:
Share Extension:
ShareViewController.swift-- Main share extension view controller with content handlingInfo.plist-- Extension configuration with activation rules
Action Extension:
3. ActionViewController.swift -- Action extension with content manipulation
4. Info.plist -- Extension configuration
Keyboard Extension:
5. KeyboardViewController.swift -- Custom keyboard with UIInputViewController
6. Info.plist -- Keyboard extension configuration
Safari Web Extension:
7. SafariWebExtensionHandler.swift -- Native message handler
8. manifest.json -- Web extension manifest
9. content.js -- Content script template
Step 3: Create Shared Infrastructure
If data sharing selected:
10. SharedDataManager.swift -- App Group data sharing helper
Step 4: Determine File Location
Extensions are separate targets:
- Share Extension ->
ShareExtension/ - Action Extension ->
ActionExtension/ - Keyboard Extension ->
KeyboardExtension/ - Safari Web Extension ->
SafariWebExtension/ - Shared code ->
Shared/or within main app target
Output Format
After generation, provide:
Files Created
Share Extension:
ShareExtension/
├── ShareViewController.swift # Main share extension view controller
└── Info.plist # Extension activation rules & config
Action Extension:
ActionExtension/
├── ActionViewController.swift # Content manipulation controller
└── Info.plist # Extension activation rules & config
Keyboard Extension:
KeyboardExtension/
├── KeyboardViewController.swift # UIInputViewController subclass
└── Info.plist # Keyboard extension config
Safari Web Extension:
SafariWebExtension/
├── SafariWebExtensionHandler.swift # Native message handler
└── Resources/
├── manifest.json # Web extension manifest
├── content.js # Content script
└── popup.html # Popup UI (optional)
Shared (if data sharing enabled):
Shared/
└── SharedDataManager.swift # App Group data sharing
Integration Steps
1. Add Extension Target in Xcode:
- File > New > Target
- Select the extension type (Share, Action, Keyboard, Safari Web)
- Configure bundle identifier:
com.yourapp.ShareExtension - Xcode creates the target with boilerplate -- replace with ge
Установить app-extensions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл app-extensions?
Generates app extension infrastructure for Share Extensions, Action Extensions, Keyboard Extensions, and Safari Web Extensions with data sharing via App Groups. Use when user wants to add a share extension, action extension, keyboard extension, Safari web extension, or any app extension type.
Как установить скилл app-extensions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл app-extensions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic