dt-setup-android
БесплатноБез исполняемых скриптовНе проверенInstruments an existing Android project (Kotlin or Java) with the Dynatrace Mobile Agent for basic monitoring. Covers zero-to-first-event setup only: Gradle…
от Dynatrace★ 190 звёзд на GitHubОб этом скилле
Android Dynatrace Instrumentation
Scope: Basic setup only — from zero to first event. For anything beyond initial instrumentation (custom actions, crash grouping, data privacy policies, etc.) refer to the Dynatrace documentation directly.
Phase 1: Preflight
Before doing anything else, check that the current directory is an Android project root by looking for settings.gradle.kts or settings.gradle. If neither exists, stop and tell the user this is not an Android project root, and ask them to navigate to the correct directory.
Then verify the following minimum requirements. If any are not met, stop and inform the user of what needs to be upgraded before proceeding:
| Requirement | Minimum |
|---|---|
| Gradle | 7.0.2 |
| Android Gradle Plugin (AGP) | 7.0 |
| JVM | Java 11 |
Run ./gradlew --version (or gradlew.bat --version on Windows). The output covers both Gradle and the actual JVM Gradle is using (the Daemon JVM line), which may differ from the system Java when the project is opened in Android Studio or IntelliJ. Do not use java -version — it may report a different JDK than what the build actually runs on. The AGP version is declared in the root build file.
Phase 2: Detect existing setup
If a dynatrace { } block or a configure<com.dynatrace.tools.android.dsl.DynatraceExtension> { } block (also written as configure<DynatraceExtension> { } when the class is imported) is found anywhere in the build files, read it and extract if present:
applicationId(the value passed toapplicationId(...)orapplicationId '...')beaconUrl(the value passed tobeaconUrl(...)orbeaconUrl '...')
Save these as pre-filled values to carry into Phase 3. If either value is absent or uses a placeholder (e.g. YOUR_APPLICATION_ID), treat it as not found. Proceed to Phase 3.
Phase 3: Collect inputs
First, ask only for:
applicationId— Dynatrace application ID. Tell the user this can be found in their Dynatrace tenant, inside the mobile application they have already created. If a value was extracted in Phase 2, show it as the current value and ask the user to confirm or replace it.beaconUrl— Dynatrace beacon URL. Tell the user this can also be found in their Dynatrace tenant, inside the same mobile application configuration. Same: show the extracted value if available and ask to confirm or replace.
Once the user confirms or provides both, then ask — unless the user already stated their session replay preference in their initial request, in which case skip this question and use what they said:
- Session replay — should session replay be enabled? (yes/no)
Phase 4: Locate files
Finding the app module
The application module is not always named app. Read settings.gradle.kts or settings.gradle to find all included modules, then check each module's build file for the com.android.application plugin. Use the directory of the first module that applies it as APP_MODULE for all paths below.
macOS / Linux:
grep -r -l --include="*.gradle" --include="*.gradle.kts" --exclude-dir=buildSrc "com.android.application" .
Windows (cmd):
findstr /s /m "com.android.application" *.gradle *.gradle.kts
Windows (PowerShell):
Get-ChildItem -Recurse -Include "*.gradle","*.gradle.kts" | Select-String "com.android.application" | Select-Object -ExpandProperty Path
Discard any result where the matching line contains apply false — those are version-catalog declarations in the root build file, not actual plugin applications. Also discard any result under buildSrc/.
If no module applying com.android.application is found after filtering, stop and report the failure — no files have been modified at this point.
Files to read before editing
- Root
build.gradle.kts/build.gradle(sibling of the settings file) - App
APP_MODULE/build.gradle.kts/APP_MODULE/build.gradle - Entry-point source file — see below
Finding the entry-point file
Preferred: Application class. Search the source tree for a class that extends Application using the appropriate command for the OS:
macOS / Linux:
grep -r -l --include="*.java" "extends Application" APP_MODULE/src
grep -r -l --include="*.kt" ": Application()" APP_MODULE/src
Windows (cmd):
findstr /s /m "extends Application" APP_MODULE\src\*.java
findstr /s /m ": Application()" APP_MODULE\src\*.kt
Windows (PowerShell):
Get-ChildItem -Recurse -Path APP_MODULE/src -Include "*.java" | Select-String "extends Application" | Select-Object -ExpandProperty Path
Get-ChildItem -Recurse -Path APP_MODULE/src -Include "*.kt" | Select-String ": Application()" | Select-Object -ExpandProperty Path
If found, use that file. Add the privacy opt-in call inside its onCreate(), after super.onCreate().
**Fallback: Launcher
Установить dt-setup-android в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dt-setup-android?
Instruments an existing Android project (Kotlin or Java) with the Dynatrace Mobile Agent for basic monitoring. Covers zero-to-first-event setup only: Gradle plugin, agent config, and user privacy opt-in. Do not use for advanced Dynatrace configuration beyond initial instrumentation.
Как установить скилл dt-setup-android?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dt-setup-android запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic