analytics-setup
Skill915 starsChanged 22 days agoMITView on GitHub
Generates protocol-based analytics infrastructure with swappable providers (TelemetryDeck, Firebase, Mixpanel). Use when user wants to add analytics, track events, or set up telemetry.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Folken2/skillstheir own version, first seen Nov 29, 2026
- Abdox-menara/guard-skillstheir own version, first seen Aug 24, 2026
- Retired-Projects/ai-marketing-kit-publictheir own version, first seen Jul 30, 2026
- crealwork/ai-marketing-kittheir own version, first seen Jul 17, 2026
- osawa1177/ga4-claude-analytics-startertheir own version, first seen Jul 11, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- crealwork/ai-marketing-kit★ 18same name
- Abdox-menara/guard-skills★ 0same name
- Folken2/skills★ 0same name
- osawa1177/ga4-claude-analytics-starter★ 0same name
- Retired-Projects/ai-marketing-kit-public★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository184 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-intentsSkill
- foundation-modelsSkill
- apple-intelligenceSkill
- visual-intelligenceSkill
- ad-attributionSkill
- app-description-writerSkill
- apple-search-adsSkill
- iap-finalizerSkill
- keyword-optimizerSkill
- marketing-strategySkill
- originality-checkSkill
- ratings-mechanicsSkill
- rejection-handlerSkill
- review-response-writerSkill
- screenshot-plannerSkill
- app-storeSkill
- web-presenceSkill
- core-mlSkill
- animation-patternsSkill
- design-systemSkill
- game-feelSkill
- liquid-glassSkill
- sf-symbolsSkill
- designSkill
- typographySkill
- ui-prototypingSkill
- ux-writingSkill
- attributed-stringSkill
- foundationSkill
- accessibility-generatorSkill
- account-deletionSkill
- announcement-bannerSkill
- app-clipSkill
- app-extensionsSkill
- app-icon-generatorSkill
- app-store-assetsSkill
- auth-flowSkill
- background-processingSkill
- ci-cd-setupSkill
- cloudkit-syncSkill
- consent-flowSkill
- custom-product-pagesSkill
- data-exportSkill
- debug-menuSkill
- deep-linkingSkill
- error-monitoringSkill
- feature-flagsSkill
- featuring-nominationSkill
- feedback-formSkill
- force-updateSkill
- http-cacheSkill
- image-loadingSkill
- in-app-eventsSkill
- lapsed-userSkill
- live-activity-generatorSkill
- localization-setupSkill
- logging-setupSkill
- milestone-celebrationSkill
- networking-layerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this skill when the user:
- Distinctive: line 42
Search for existing analytics:
- Distinctive: line 48
If found, ask user:
- Distinctive: line 51
Add new provider to existing setup?
- Distinctive: line 55
Ask user via AskUserQuestion:
- Distinctive: line 79
Always generate these files:
- Very specific: line 99
If Sources/ exists → Sources/Analytics/
- Distinctive: line 175
Add new provider file (or generate with this skill)
- Very specific: line 186
Use NoOpAnalytics() in tests and previews
- Distinctive: line 187
All tracking calls become no-ops
- Distinctive: line 188
No external dependencies in tests
- Distinctive: line 193
templates/: - All template files
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analytics Setup Generator
Generate a protocol-based analytics infrastructure that makes it easy to swap providers without changing app code.
When This Skill Activates
Use this skill when the user:
- Asks to "add analytics" or "set up analytics"
- Mentions "TelemetryDeck", "Firebase Analytics", "Mixpanel"
- Wants to "track events" or "add telemetry"
- Asks about "privacy-friendly analytics"
- Wants to swap analytics providers
Key Feature: Swappable Providers
The generated code uses a protocol-based architecture:
// Your app uses the protocol
analytics.track(.buttonTapped("subscribe"))
// Swap providers by changing ONE line:
let analytics: AnalyticsService = TelemetryDeckAnalytics() // or FirebaseAnalytics()Pre-Generation Checks
1. Project Context Detection
- Check for existing analytics implementations
- Look for TelemetryDeck/Firebase/Mixpanel in Package.swift or Podfile
- Identify source file locations
2. Conflict Detection
Search for existing analytics:
Glob: **/*Analytics*.swift, **/*Telemetry*.swift
Grep: "protocol.*Analytics" or "TelemetryDeck" or "Firebase"If found, ask user:
- Extend existing analytics?
- Replace with new implementation?
- Add new provider to existing setup?
Configuration Questions
Ask user via AskUserQuestion:
- Which provider(s)?
- TelemetryDeck (privacy-friendly, recommended)
- Firebase Analytics
- Mixpanel
- None (NoOp for now, add later)
- What events to track?
- App lifecycle (launch, background, foreground)
- Screen views
- User actions (buttons, features used)
- Errors
- Custom events
- User properties?
- App version
- Subscription status
- Custom properties
Generation Process
Step 1: Create Core Files
Always generate these files:
AnalyticsService.swift- Protocol (never changes)AnalyticsEvent.swift- Event definitions (app-specific)NoOpAnalytics.swift- For testing/privacy mode
Step 2: Create Selected Provider(s)
Based on user selection:
TelemetryDeckAnalytics.swiftFirebaseAnalytics.swiftMixpanelAnalytics.swift
Step 3: Create Environment Integration
For SwiftUI apps:
AnalyticsServiceKey.swift- Environment key for dependency injection
Step 4: Determine File Location
Check project structure:
- If
Sources/exists →Sources/Analytics/ - If
App/exists →App/Analytics/ - Otherwise →
Analytics/
Output Format
After generation, provide:
Files Created
Sources/Analytics/
├── AnalyticsService.swift # Protocol (stable interface)
├── AnalyticsEvent.swift # Your app's events
├── Providers/
│ ├── NoOpAnalytics.swift # Testing/privacy
│ └── [Provider]Analytics.swift # Selected provider(s)
└── AnalyticsServiceKey.swift # SwiftUI Environment (optional)Integration Steps
App Entry Point:
@main
struct MyApp: App {
// Choose your provider. Always wrap it: Guideline 5.1.1(ii) requires consent
// even for anonymous usage data, in every region.
private let analytics: AnalyticsService = ConsentAwareAnalytics(
wrapped: TelemetryDeckAnalytics(appID: "YOUR-APP-ID"),
consentProvider: { UserDefaults.standard.bool(forKey: "analyticsConsent") }
)
init() {
analytics.configure()
}
var body: some Scene {
WindowGroup {
ContentView()
.environment(\.analytics, analytics)
}
}
}Tracking Events:
struct ContentView: View {
@Environment(\.analytics) private var analytics
var body: some View {
Button("Subscribe") {
analytics.track(.buttonTapped("subscribe"))
}
}
}Required Dependencies
TelemetryDeck:
// Package.swift
.package(url: "https://github.com/TelemetryDeck/SwiftClient", from: "1.0.0")Firebase:
// Package.swift
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "10.0.0")
// Also requires GoogleService-Info.plistSwapping Providers Later
To switch providers:
- Add new provider file (or generate with this skill)
- Change ONE line in App.swift:
// Before
private let analytics: AnalyticsService = TelemetryDeckAnalytics(...)
// After
private let analytics: AnalyticsService = FirebaseAnalytics()Testing
- Use
NoOpAnalytics()in tests and previews - All tracking calls become no-ops
- No external dependencies in tests
References
- analytics-patterns.md - Protocol architecture and best practices
- templates/ - All template files
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

