Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

app-clips应用剪辑

Agent Skill

app-clips 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

27,192

周安装

1,064

GitHub Stars

531

下载量

8,536
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:app-clips(应用剪辑)
来源仓库:https://github.com/dpearson2699/swift-ios-skills
仓库路径:skills/app-clips
安装命令:
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill app-clips
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill app-clips

简介

app-clips 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前功能聚焦于 App Clip 相关开发支持,适用于 iOS 26+ / Swift 6.3 项目。

SKILL.md

App Clips

Lightweight, instantly-available versions of your iOS app for in-the-moment experiences or demos. Targets iOS 26+ / Swift 6.3 unless noted.

Contents

App Clip Target Setup

An App Clip is a separate target in the same Xcode project as your full app:

  1. File → New → Target → App Clip — Xcode creates the target with the com.apple.developer.on-demand-install-capable entitlement and a Parent Application Identifiers entitlement linking back to the full app.
  2. The App Clip bundle ID must be a suffix of the full app's: com.example.MyApp.Clip.
  3. Xcode adds an Embed App Clip build phase to the full app target automatically.

Share code between targets

Use Swift packages or shared source files. Add files to both targets, or use the APPCLIP active compilation condition:

// In App Clip target Build Settings → Active Compilation Conditions: APPCLIP

#if !APPCLIP
// Full-app-only code (e.g., background tasks, App Intents)
#else
// App Clip specific code
#endif

Prefer local Swift packages for shared modules — add the package as a dependency of both targets.

Shared asset catalogs

Create a shared asset catalog included in both targets to avoid duplicating images and colors.

Invocation URL Handling

App Clips receive an NSUserActivity of type NSUserActivityTypeBrowsingWeb on launch. Handle it with onContinueUserActivity:

@main
struct DonutShopClip: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .onContinueUserActivity(
                    NSUserActivityTypeBrowsingWeb
                ) { activity in
                    handleInvocation(activity)
                }
        }
    }

    private func handleInvocation(_ activity: NSUserActivity) {
        guard let url = activity.webpageURL,
              let components = URLComponents(url: url, resolvingAgainstBaseURL: true)
        else { return }

        // Extract path/query to determine context
        let locationID = components.queryItems?
            .first(where: { $0.name == "location" })?.value

        // Update UI for this location
    }
}

For UIKit scene-based apps, implement scene(_:willConnectTo:options:) for cold launch and scene(_:continue:) for warm launch.

Key rule: The full app must handle all invocation URLs identically — when a user installs the full app, it replaces the App Clip and receives all future invocations.

App Clip Experience Configuration

Configure experiences in App Store Connect after uploading a build containing the App Clip.

Default App Clip experience (required)

  • Provide: header image, subtitle (≤56 chars), call-to-action verb
  • App Store Connect generates a default App Clip link: https://appclip.apple.com/id?=<bundle_id>&key=value
  • Supports: QR codes, NFC tags, Messages, Spotlight, other apps

Demo App Clip link

  • Auto-generated by App Store Connect for demo versions of your app
  • Supports all invocations including physical (App Clip Codes, NFC, QR)
  • Allows larger binary size (up to 100 MB uncompressed)
  • Cannot contain URL parameters

Advanced App Clip experiences (optional)

  • Required for: Maps integration, location association, App Clip Codes, per-location card imagery
  • Each experience has its own invocation URL, header image, and metadata
  • URL prefix matching lets one registered URL cover many sub-paths
  • Use the App Store Connect API to manage large numbers of experiences programmatically

Associated domains

For custom URLs (not the default Apple-generated link), add entries to the Associated Domains entitlement and host an AASA file:

appclips:example.com

Size Limits

App Clip binaries must stay within strict uncompressed size limits (measured via App Thinning Size Report):

iOS VersionMaximum Uncompressed Size
iOS 15 and earlier10 MB
iOS 1615 MB
iOS 17+ (digital invocations only)100 MB
iOS 17+ (via demo link, all invocations)100 MB

The 100 MB limit on iOS 17+ for non-demo links requires: digital-only invocations, no physical invocation support (no App Clip Codes / NFC / QR), and the App Clip must not support iOS 16 or earlier.

Measure size: Archive the app → Distribute → Export as Ad Hoc/Development with App Thinning → check App Thinning Size Report.txt.

Use Background Assets to download additional content post-launch (e.g., game levels) if needed. App Clip downloads cannot use isEssential.

Invocation Methods

MethodRequirements
App Clip CodesAdvanced experience or demo link; NFC-integrated or scan-only
NFC tagsEncode invocation URL in NDEF payload
QR codesEncode invocation URL; works with default or advanced experience
Safari Smart BannersAssociate App Clip with website; add <meta> tag
MapsAdvanced experience with place association
MessagesShare invocation URL as text; limited preview with demo links
Siri SuggestionsLocation-based; requires advanced experience for location suggestions
Other appsiOS 17+; use Link Presentation or UIApplication.open(_:)

Safari Smart App Banner

Add this meta tag to your website to show the App Clip banner:

<meta name="apple-itunes-app"
      content="app-id=YOUR_APP_ID, app-clip-bundle-id=com.example.MyApp.Clip,
               app-clip-display=card">

Data Migration to Full App

When a user installs the full app, it replaces the App Clip. Use a shared App Group container to migrate data:

// In both targets: add App Groups capability with the same group ID

// App Clip — write data
func saveOrderHistory(_ orders: [Order]) throws {
    guard let containerURL = FileManager.default.containerURL(
        forSecurityApplicationGroupIdentifier: "group.com.example.myapp.shared"
    ) else { return }

    let data = try JSONEncoder().encode(orders)
    let fileURL = containerURL.appendingPathComponent("orders.json")
    try data.write(to: fileURL)
}

// Full app — read migrated data
func loadMigratedOrders() throws -> [Order] {
    guard let containerURL = FileManager.default.containerURL(
        forSecurityApplicationGroupIdentifier: "group.com.example.myapp.shared"
    ) else { return [] }

    let fileURL = containerURL.appendingPathComponent("orders.json")
    guard FileManager.default.fileExists(atPath: fileURL.path) else { return [] }
    let data = try Data(contentsOf: fileURL)
    return try JSONDecoder().decode([Order].self, from: data)
}

Shared UserDefaults

// Write (App Clip)
let shared = UserDefaults(suiteName: "group.com.example.myapp.shared")
shared?.set(userToken, forKey: "authToken")

// Read (Full app)
let shared = UserDefaults(suiteName: "group.com.example.myapp.shared")
let token = shared?.string(forKey: "authToken")

Keychain sharing

Starting iOS 15.4, App Clip keychain items are accessible to the corresponding full app via the parent-application-identifiers and associated-appclip-app-identifiers entitlements. Use distinct kSecAttrLabel values to distinguish App Clip vs. full app entries.

Sign in with Apple

Store the ASAuthorizationAppleIDCredential.user in the shared container so the full app can silently verify without re-prompting login.

SKOverlay for Full App Promotion

Display an overlay recommending the full app from within the App Clip:

SwiftUI

struct OrderCompleteView: View {
    @State private var showOverlay = false

    var body: some View {
        VStack {
            Text("Order placed!")
            Button("Get the full app") { showOverlay = true }
        }
        .appStoreOverlay(isPresented: $showOverlay) {
            SKOverlay.AppClipConfiguration(position: .bottom)
        }
    }
}

UIKit

func displayOverlay() {
    guard let scene = view.window?.windowScene else { return }

    let config = SKOverlay.AppClipConfiguration(position: .bottom)
    let overlay = SKOverlay(configuration: config)
    overlay.delegate = self
    overlay.present(in: scene)
}

SKOverlay.AppClipConfiguration automatically resolves to the parent app. Available iOS 14.0+.

Never block the user's task to force installation — show the overlay after task completion.

Location Confirmation

Use APActivationPayload to verify a user's physical location without requesting full location access:

import AppClip
import CoreLocation

func verifyLocation(from activity: NSUserActivity) {
    guard let payload = activity.appClipActivationPayload,
          let url = activity.webpageURL
    else { return }

    // Build the expected region (up to 500m radius)
    let center = CLLocationCoordinate2D(latitude: 37.334722, longitude: -122.008889)
    let region = CLCircularRegion(center: center, radius: 100, identifier: "store-42")

    payload.confirmAcquired(in: region) { inRegion, error in
        if let error = error as? APActivationPayloadError {
            switch error.code {
            case .doesNotMatch:
                // URL doesn't match registered App Clip URL
                break
            case .disallowed:
                // User denied location, or invocation wasn't NFC/visual code
                break
            @unknown default:
                break
            }
            return
        }

        if inRegion {
            // Confirmed — user is at the expected location
        } else {
            // User is not at expected location (e.g., NFC tag was moved)
        }
    }
}

Enable location confirmation in Info.plist:

<key>NSAppClip</key>
<dict>
    <key>NSAppClipRequestLocationConfirmation</key>
    <true/>
</dict>

This is lightweight — the system verifies location without granting your App Clip continuous access. The App Clip card shows a note that the clip can verify location. Available iOS 14.0+.

Lifecycle and Ephemeral Nature

  • No Home Screen icon — App Clips appear in the App Library and recent apps
  • Automatic removal — the system deletes the App Clip and its data after a period of inactivity (typically ~30 days, system-determined)
  • No persistent state guarantee — treat App Clip storage as ephemeral; migrate important data to the shared container or a server
  • Relaunching — returning to a previously launched App Clip from the App Library uses the last invocation URL; returning from the App Switcher launches without an invocation URL (restore saved state)
  • Notifications — App Clips can request ephemeral notification permission (up to 8 hours) via Info.plist; set NSAppClipRequestEphemeralUserNotification to true
  • Location accessrequestWhenInUseAuthorization() only; resets daily at 4:00 AM

Capabilities and Limitations

Available to App Clips

SwiftUI, UIKit, Core Location (when-in-use), Sign in with Apple, Apple Pay, CloudKit (public database read-only, iOS 16+), Background Assets, StoreKit (SKOverlay), Keychain, App Groups, Push Notifications (ephemeral), Live Activities (iOS 16.1+)

Not available / no-op at runtime

App Intents, Background Tasks, CallKit, Contacts, CoreMotion, EventKit, HealthKit, HomeKit, MediaPlayer, Messages, NearbyInteraction, PhotoKit, SensorKit, Speech, SKAdNetwork, App Tracking Transparency

Additional restrictions

  • No background URL sessions
  • No background Bluetooth
  • No multiple scenes on iPad
  • No on-demand resources
  • No custom URL schemes
  • No in-app purchases (reserve for full app)
  • UIDevice.name and identifierForVendor return empty strings

Common Mistakes

Exceeding App Clip size limit

// ❌ DON'T: Include large frameworks or bundled assets
// Importing heavyweight frameworks like RealityKit or large ML models
// pushes the App Clip well over 10–15 MB.

// ✅ DO: Use Asset Catalog thinning, exclude unused architectures,
// strip debug symbols, and split shared code into lean Swift packages.
// Measure with App Thinning Size Report after every change.

Not testing invocation URLs locally

// ❌ DON'T: Only test App Clip with a direct Xcode launch
// This skips invocation URL handling and misses bugs.

// ✅ DO: Use the _XCAppClipURL environment variable in the scheme,
// or register a Local Experience in Settings → Developer → Local Experiences
// to test with realistic invocation URLs and App Clip cards.

Not handling the full app replacing the App Clip

// ❌ DON'T: Assume only the App Clip receives invocations
// When the user installs the full app, ALL invocations go to it.

// ✅ DO: Share invocation-handling code between both targets.
// The full app must handle every invocation URL the App Clip supports.
#if !APPCLIP
// Full app can additionally show richer features for the same URL
#endif

Storing critical data only in App Clip storage

// ❌ DON'T: Store important data in the App Clip's sandboxed container
let fileURL = documentsDirectory.appendingPathComponent("userData.json")
// This data is DELETED when the system removes the App Clip.

// ✅ DO: Write to the shared App Group container or sync to a server
guard let shared = FileManager.default.containerURL(
    forSecurityApplicationGroupIdentifier: "group.com.example.shared"
) else { return }
let fileURL = shared.appendingPathComponent("userData.json")

Missing associated domains configuration

// ❌ DON'T: Configure App Clip experiences in App Store Connect
// without setting up associated domains and the AASA file.
// Invocations from your website and advanced experiences will fail.

// ✅ DO: Add the Associated Domains entitlement with:
//   appclips:example.com
// AND host /.well-known/apple-app-site-association on your server:
// {
//   "appclips": {
//     "apps": ["TEAMID.com.example.MyApp.Clip"]
//   }
// }

Review Checklist

  • App Clip target bundle ID is a suffix of the full app's bundle ID
  • Parent Application Identifiers entitlement is set correctly
  • Shared code uses Swift packages or compilation conditions (APPCLIP)
  • onContinueUserActivity(NSUserActivityTypeBrowsingWeb) handles invocation URLs
  • Full app handles all invocation URLs the App Clip supports
  • App Thinning Size Report confirms binary is within size limits for target iOS
  • Associated Domains entitlement includes appclips:yourdomain.com (if using custom URLs)
  • AASA file hosted at /.well-known/apple-app-site-association (if using custom URLs)
  • Default App Clip experience configured in App Store Connect
  • Shared App Group container used for data the full app needs
  • SKOverlay / appStoreOverlay shown after task completion, never blocking
  • NSAppClipRequestLocationConfirmation set in Info.plist if using location verification
  • No reliance on background processing, restricted frameworks, or persistent local storage
  • Tested with Local Experiences (Settings → Developer) and _XCAppClipURL env var
  • Handles launch without invocation URL (App Switcher / notification re-entry)

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.28%
按下载量换算3,182

Claude

28.95%
按下载量换算2,471

Cursor

18.26%
按下载量换算1,559

Gemini CLI

10.45%
按下载量换算892

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills