shekhar23/claude-zero-to-hero-android-kmp/android-analytics-logging
Claude Code and agent skill by shekhar23/claude-zero-to-hero-android-kmp
- community
Checking that the SKILL.md file is still in the repository.
Analytics, logging, and observability patterns for Android/KMP - event design, screen tracking, structured logs, crash reporting boundaries, redaction, and environment-aware telemetry. Use this skill whenever adding analytics events, logging app behavior, instrumenting user flows, or deciding what should go to logs versus metrics versus crash reports. Trigger on phrases like "analytics", "logging", "telemetry", "screen tracking", "event tracking", "crash reporting", "observability", or "redaction".
Install
npx vskill@latest install shekhar23/claude-zero-to-hero-android-kmp/android-analytics-loggingSKILL.md
Android Analytics, Logging, and Observability
Core Principles
- Instrument intent, not noise.
- Logs are for debugging and operations; analytics are for product understanding.
- Never leak secrets, tokens, raw personal data, or sensitive payloads.
- Centralize telemetry contracts so naming stays consistent.
- Track user-relevant flows and operationally important failures.
Separate the Concerns
| Concern | Purpose | |
|---|---|---|
| Logging | developer/debug/operator visibility | |
| Analytics | product usage and funnel understanding | |
| Crash reporting | fatal and non-fatal failure monitoring | |
| Metrics | rates, latency, counts, health signals |
Do not use one tool to imitate all four concerns.
Event Design
Analytics events should be:
- stable
- human-readable
- intentionally named
- low-cardinality where possible
Good examples:
note_createdlogin_succeededpaywall_shownsync_failed
Bad examples:
button_clickedscreen_event_7- raw dynamic strings as event names
Prefer fixed event names with structured properties.
Event Properties
Good properties are small, explicit, and analysis-friendly:
Good property examples:
source = settingsresult = successpermission = cameranetwork_state = offline
Avoid:
- full user-entered text
- access tokens
- email addresses unless policy explicitly allows and requires it
- large blobs or stack traces in analytics payloads
Screen Tracking
Track meaningful screens and major state transitions only.
Guidelines:
- one canonical name per screen
- track once on meaningful entry
- avoid duplicate emissions on every recomposition
In Compose, screen tracking should happen in a controlled side-effect wrapper or Root composable, not scattered across child composables.
Logging
Use structured logging with clear tags/categories:
Good logging targets:
- startup milestones
- sync start/success/failure
- background worker outcomes
- recoverable errors that matter operationally
Do not log every recomposition, every Flow emission, or noisy internal loops.
Crash Reporting Boundaries
Crash reporting should capture:
- uncaught fatal exceptions
- important non-fatal exceptions that indicate broken flows
- release/build metadata helpful for debugging
Do not report expected domain failures like invalid credentials as crashes.
Expected failure -> analytics/logging if useful Unexpected failure -> crash reporting and structured logs
Redaction Rules
Always redact or omit:
- passwords
- auth tokens
- refresh tokens
- cookies
- authorization headers
- personally sensitive payloads
- full request/response bodies from sensitive endpoints
Redaction is a product rule, not an optional cleanup pass.
See the android-auth-security skill for adjacent secret-handling guidance.
Telemetry Abstraction
Wrap analytics/logging providers behind interfaces:
Benefits:
- easier testing
- vendor independence
- consistent naming and redaction policy
Where Instrumentation Lives
- presentation layer -> user interactions and screen views
- domain/data layer -> operational events like sync success/failure when product-relevant
- app/bootstrap layer -> startup and environment signals
Do not spread analytics calls arbitrarily through every composable. Prefer a small number of deliberate tracking points.
Environment Awareness
Telemetry behavior often differs by environment:
- debug -> verbose logs, limited analytics
- staging -> near-production analytics with safe isolation
- production -> redacted logs, full critical telemetry
Keep environment gating centralized.
Testing Guidance
Test:
- correct event names/properties for critical flows
- no duplicate emission for one user action
- redaction behavior for sensitive fields
- crash/log reporting boundaries for expected vs unexpected failures
Prefer fake trackers in tests:
Checklist: Adding Telemetry
- [ ] Define stable event names and low-cardinality properties
- [ ] Separate logs, analytics, crashes, and metrics by purpose
- [ ] Centralize tracking interfaces and naming
- [ ] Redact or omit all sensitive data
- [ ] Track only meaningful user and operational events
- [ ] Test critical event emission and non-duplication
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/android-analytics-logging/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shekhar23/claude-zero-to-hero-android-kmp/android-analytics-logging)