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

adattributionkitadattributionkit 命令行

Agent Skill

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

总安装

15,129

周安装

618

GitHub Stars

539

下载量

4,895
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

adattributionkit 为 iOS 17.4+ 应用提供隐私保护的广告归因功能,支持 SKAdNetwork 与替代市场集成。

  • 适用于需要测量安装与重参与度而不暴露用户数据的广告网络场景,支持多角色协同流程。
  • 通过 npx skills add 命令从 GitHub 仓库安装,调用时需遵循发布者端与广告主端的设置规范进行操作。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

AdAttributionKit

Privacy-preserving ad attribution for iOS 17.4+ / Swift 6.3. AdAttributionKit lets ad networks measure conversions (installs and re-engagements) without exposing user-level data. It supports the App Store and alternative marketplaces, and interoperates with SKAdNetwork.

Three roles exist in the attribution flow: the ad network (signs impressions, receives postbacks), the publisher app (displays ads), and the advertised app (the app being promoted).

Contents

Overview and Privacy Model

AdAttributionKit preserves user privacy through several mechanisms:

  • Crowd anonymity tiers -- the device limits postback data granularity based on the crowd size associated with the ad, ranging from Tier 0 (minimal data) to Tier 3 (most data including publisher ID and country code).
  • Time-delayed postbacks -- postbacks are sent 24-48 hours after conversion window close (first window) or 24-144 hours (second/third windows).
  • No user-level identifiers -- postbacks contain aggregate source identifiers and conversion values, not device or user IDs.
  • Hierarchical source identifiers -- 2, 3, or 4-digit source IDs where the number of digits returned depends on the crowd anonymity tier.

The system evaluates impressions from both AdAttributionKit and SKAdNetwork together when determining attribution winners. Only one impression wins per conversion. Click-through ads always take precedence over view-through ads, with recency as the tiebreaker within each group.

Publisher App Setup

A publisher app displays ads from registered ad networks. Add each ad network's ID to the app's Info.plist so its impressions qualify for install validation.

Add ad network identifiers

<key>AdNetworkIdentifiers</key>
<array>
    <string>example123.adattributionkit</string>
    <string>another456.adattributionkit</string>
</array>

Ad network IDs must be lowercase. SKAdNetwork IDs (ending in .skadnetwork) are also accepted -- the frameworks share IDs.

Display a UIEventAttributionView

For click-through custom-rendered ads, overlay a UIEventAttributionView on the ad content. The system requires a tap on this view before handleTap() succeeds.

import UIKit

let attributionView = UIEventAttributionView()
attributionView.frame = adContentView.bounds
attributionView.isUserInteractionEnabled = true
adContentView.addSubview(attributionView)

Advertiser App Setup

The advertised app is the app someone installs or re-engages with after seeing an ad. It must call a conversion value update at least once to begin the postback conversion window.

Opt in to receive winning postback copies

Add the AttributionCopyEndpoint key to Info.plist so the device sends a copy of the winning postback to your server:

<key>AdAttributionKit</key>
<dict>
    <key>AttributionCopyEndpoint</key>
    <string>https://example.com</string>
</dict>

The system generates a well-known path from the domain:

https://example.com/.well-known/appattribution/report-attribution/

Configure your server to accept HTTPS POST requests at that path. The domain must have a valid SSL certificate.

Opt in for re-engagement postback copies

Add a second key to also receive copies of winning re-engagement postbacks:

<key>AdAttributionKit</key>
<dict>
    <key>AttributionCopyEndpoint</key>
    <string>https://example.com</string>
    <key>OptInForReengagementPostbackCopies</key>
    <true/>
</dict>

Update conversion value on first launch

Call a conversion value update as early as possible after first launch to begin the conversion window:

import AdAttributionKit

func applicationDidFinishLaunching() async {
    do {
        try await Postback.updateConversionValue(0, lockPostback: false)
    } catch {
        print("Failed to set initial conversion value: \(error)")
    }
}

Impressions

Ad networks create signed impressions using JWS (JSON Web Signature). The publisher app uses AppImpression to register and handle those impressions.

Create an impression from a JWS

import AdAttributionKit

let impression = try await AppImpression(compactJWS: signedJWSString)

The JWS contains the ad network ID, advertised item ID, publisher item ID, source identifier, timestamp, and optional re-engagement eligibility flag. See references/adattributionkit-patterns.md for JWS generation details.

Check device support

guard AppImpression.isSupported else {
    // Fall back to alternative ad display
    return
}

View-through impressions

Record a view impression when the ad content has been displayed and dismissed:

func handleAdViewed(impression: AppImpression) async {
    do {
        try await impression.handleView()
    } catch {
        print("Failed to record view-through impression: \(error)")
    }
}

For long-lived ad views, use beginView() and endView() to track view duration:

try await impression.beginView()
// ... ad remains visible ...
try await impression.endView()

Click-through impressions

Respond to ad taps by calling handleTap(). If the advertised app is not installed, the system opens its App Store or marketplace page. If installed, the system launches it directly.

func handleAdTapped(impression: AppImpression) async {
    do {
        try await impression.handleTap()
    } catch {
        print("Failed to record click-through impression: \(error)")
    }
}

A UIEventAttributionView must overlay the ad for handleTap() to succeed.

StoreKit-rendered ads

Pass the impression to StoreKit overlay or product view controller APIs. StoreKit automatically records view-through impressions after 2 seconds of display and click-through impressions on tap.

import StoreKit

let config = SKOverlay.AppConfiguration(appIdentifier: "1234567890",
                                         position: .bottom)
config.appImpression = impression

Postbacks

Postbacks are attribution reports the device sends to ad networks (and optionally to the advertised app developer) after a conversion event.

Conversion windows

Three windows produce up to three postbacks for winning attributions:

WindowDurationPostback delay
1stDays 0-224-48 hours
2ndDays 3-724-144 hours
3rdDays 8-3524-144 hours

Tier 0 postbacks only produce the first postback. Nonwinning attributions produce only one postback.

Time windows for events

EventTime limit
View-through to install24 hours (configurable up to 7 days)
Click-through to install30 days (configurable down to 1 day)
Install to first update60 days
Re-engagement to first update2 days

Lock conversion values early

Lock the postback to finalize a conversion value before the window ends and receive the postback sooner:

try await Postback.updateConversionValue(
    42,
    coarseConversionValue: .high,
    lockPostback: true
)

After locking, the system ignores further updates in that conversion window.

Postback data by tier

FieldTier 0Tier 1Tier 2Tier 3
source-identifier digits222-42-4
conversion-value (fine)----1st only1st only
coarse-conversion-value--1st only2nd/3rd2nd/3rd
publisher-item-identifier------Yes
country-code------Conditional

Conversion Values

Fine-grained values

An integer from 0-63 (6 bits). Available only in the first postback and only at Tier 2 or higher:

try await Postback.updateConversionValue(
    35,
    coarseConversionValue: .medium,
    lockPostback: false
)

Coarse values

Three levels for lower tiers and second/third postbacks:

// CoarseConversionValue cases: .low, .medium, .high
try await Postback.updateConversionValue(
    10,
    coarseConversionValue: .high,
    lockPostback: false
)

Update by conversion type (iOS 18+)

Separate conversion values for install vs. re-engagement postbacks:

let installUpdate = PostbackUpdate(
    fineConversionValue: 20,
    lockPostback: false,
    conversionTypes: [.install]
)
try await Postback.updateConversionValue(installUpdate)

let reengagementUpdate = PostbackUpdate(
    fineConversionValue: 12,
    lockPostback: false,
    conversionTypes: [.reengagement]
)
try await Postback.updateConversionValue(reengagementUpdate)

Conversion tags (iOS 18.4+)

Use conversion tags to selectively update specific postbacks when overlapping conversion windows exist:

let update = PostbackUpdate(
    fineConversionValue: 15,
    lockPostback: false,
    conversionTag: savedConversionTag,
    conversionTypes: [.reengagement]
)
try await Postback.updateConversionValue(update)

The system delivers the conversion tag through the re-engagement URL's AdAttributionKitReengagementOpen query parameter.

Re-engagement

Re-engagement tracks users who already have the advertised app installed and interact with an ad to return to it.

Mark impressions as re-engagement eligible

Set eligible-for-re-engagement to true in the JWS payload when generating the impression.

Handle re-engagement taps with a URL

Pass a universal link that the system opens in the advertised app:

let reengagementURL = URL(string: "https://example.com/promo/summer")!
try await impression.handleTap(reengagementURL: reengagementURL)

The system appends AdAttributionKitReengagementOpen as a query parameter. The advertised app checks for this parameter to detect AdAttributionKit-driven opens:

func handleUniversalLink(_ url: URL) {
    let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
    let isReengagement = components?.queryItems?.contains(where: {
        $0.name == Postback.reengagementOpenURLParameter
    }) ?? false

    if isReengagement {
        // AdAttributionKit opened this app via a re-engagement ad
    }
}

Re-engagement limits

  • Only click-through interactions create re-engagement postbacks (not view-through).
  • The device enforces monthly per-app and yearly per-device re-engagement limits.
  • The AdAttributionKitReengagementOpen parameter is always present on the URL, even when the system does not create a postback.

Common Mistakes

Forgetting to update conversion value on launch

// DON'T -- never updating the conversion value
func appDidLaunch() {
    // No conversion value update; postback window never starts
}

// DO -- update conversion value on first launch
func appDidLaunch() async {
    try? await Postback.updateConversionValue(0, lockPostback: false)
}

Using uppercase ad network IDs

<!-- DON'T -->
<string>Example123.AdAttributionKit</string>

<!-- DO -->
<string>example123.adattributionkit</string>

Calling handleTap without UIEventAttributionView

// DON'T -- tap without attribution view overlay
try await impression.handleTap()
// Throws AdAttributionKitError.missingAttributionView

// DO -- ensure UIEventAttributionView covers the ad
let attributionView = UIEventAttributionView()
attributionView.frame = adView.bounds
adView.addSubview(attributionView)
// Then handle the tap after the user taps the attribution view
try await impression.handleTap()

Ignoring handleTap errors

// DON'T
try? await impression.handleTap()

// DO -- handle specific errors
do {
    try await impression.handleTap()
} catch let error as AdAttributionKitError {
    switch error {
    case .impressionExpired:
        // Impression older than 30 days
        refreshAdImpression()
    case .missingAttributionView:
        // UIEventAttributionView not present
        break
    default:
        print("Attribution error: \(error)")
    }
}

Not responding to postback requests

// DON'T -- silently dropping the request
// The device retries up to 9 times over 9 days on HTTP 500

// DO -- respond with 200 OK immediately
// Server handler:
func handlePostback(request: Request) -> Response {
    // Process asynchronously, respond immediately
    Task { await processPostback(request.body) }
    return Response(status: .ok)
}

Review Checklist

  • Publisher app includes all ad network IDs in AdNetworkIdentifiers (lowercase)
  • Ad network IDs match between publisher app's Info.plist and JWS kid
  • UIEventAttributionView overlays ad content for click-through ads
  • Advertised app calls updateConversionValue on first launch
  • Server endpoint at well-known path accepts HTTPS POST with valid SSL
  • Postback verification uses correct Apple public key for environment
  • Duplicate postbacks filtered by postback-identifier
  • Server responds with HTTP 200 to postback requests
  • Re-engagement URL is a registered universal link for the advertised app
  • Conversion value strategy accounts for all three conversion windows
  • AppImpression.isSupported checked before attempting impression APIs

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.78%
按下载量换算1,702

Claude

30.79%
按下载量换算1,507

Cursor

18.89%
按下载量换算925

Gemini CLI

9.19%
按下载量换算450

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills