Agent skill · Audited from source
gradle-build-performance
skill · new-silvermoon/awesome-android-agent-skillsApache-2.0 licenceAudited 31 Oct 2026 · source 4bc96bf96aac
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4bc96bf96aac and found no filesystem, network or shell access and no hard-coded secrets. What it does: Debug and optimize Android/Gradle build performance. Use when builds are slow, investigating CI/CD performance, analyzing build scans, or identifying compilation bottlenecks.
Cite
Cite this page
ModelsAtlas. “gradle-build-performance (new-silvermoon/awesome-android-agent-skills)”. Retrieved 31 Oct 2026. https://modelsatlas.com/skills/new-silvermoon/gradle-build-performance
Trust audit
Audit 0.4.1 · source read 31 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 4bc96bf96aac · 31 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishernew-silvermoon GitHub userOwner of the repository this skill is read from
- Source foldernew-silvermoon/awesome-android-agent-skills/.github/skills/performance/gradle-build-performanceThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict4bc96bf96aacA new audit runs when the source changes
- Repository statusNot archivedLast push 95 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Debug and optimize Android/Gradle build performance. Use when builds are slow, investigating CI/CD performance, analyzing build scans, or identifying compilation bottlenecks.
---
name: gradle-build-performance
description: Debug and optimize Android/Gradle build performance. Use when builds are slow, investigating CI/CD performance, analyzing build scans, or identifying compilation bottlenecks.
---
# Gradle Build Performance
## When to Use
- Build times are slow (clean or incremental)
- Investigating build performance regressions
- Analyzing Gradle Build Scans
- Identifying configuration vs execution bottlenecks
- Optimizing CI/CD build times
- Enabling Gradle Configuration Cache
- Reducing unnecessary recompilation
- Debugging kapt/KSP annotation processing
## Example Prompts
- "My builds are slow, how can I speed them up?"
- "How do I analyze a Gradle build scan?"
- "Why is configuration taking so long?"
- "Why does my project always recompile everything?"
- "How do I enable configuration cache?"
- "Why is kapt so slow?"
---
## Workflow
1. **Measure Baseline** — Clean build + incremental build times
2. **Generate Build Scan** — `./gradlew assembleDebug --scan`
3. **Identify Phase** — Configuration? Execution? Dependency resolution?
4. **Apply ONE optimization** — Don't batch changes
5. **Measure Improvement** — Compare against baseline
6. **Verify in Build Scan** — Visual confirmation
---
## Quick Diagnostics
### Generate Build Scan
```bash
./gradlew assembleDebug --scan
```
### Profile Build Locally
```bash
./gradlew assembleDebug --profile
# Opens report in build/reports/profile/
```
### Build Timing Summary
```bash
./gradlew assembleDebug --info | grep -E "^\:.*"
# Or view in Android Studio: Build > Analyze APK Build
```
---
## Build Phases
| Phase | What Happens | Common Issues |
|-------|--------------|---------------|
| **Initialization** | `settings.gradle.kts` evaluated | Too many `include()` statements |
| **Configuration** | All `build.gradle.kts` files evaluated | Expensive plugins, eager task creation |
| **Execution** | Tasks run based on inputs/outputs | Cache misses, non-incremental tasks |
### Identify the Bottleneck
```
Build scan → Performance → Build timeline
```
- **Long configuration phase**: Focus on plugin and buildscript optimization
- **Long execution phase**: Focus on task caching and parallelization
- **Dependency resolution slow**: Focus on repository configuration
---
## 12 Optimization Patterns
### 1. Enable Configuration Cache
Caches configuration phase across builds (AGP 8.0+):
```properties
# gradle.properties
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
```
### 2. Enable Build Cache
Reuses task outputs across builds and machines:
```properties
# gradle.properties
org.gradle.caching=true
```
### 3. Enable Parallel Execution
Build independent modules simultaneously:
```properties
# gradle.properties
org.gradle.parallel=true
```
### 4. Increase JVM Heap
Allocate more memory for large projects:
```properties
# gradle.properties
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC
```
### 5. Use Non-Transitive R Classes
Reduces R class size and compilation (AGP 8.0+ default):
```properties
# gradle.properties
android.nonTransitiveRClass=true
```
### 6. Migrate kapt to KSP
KSP is 2x faster than kapt for Kotlin:
```kotlin
// Before (slow)
kapt("com.google.dagger:hilt-compiler:2.51.1")
// After (fast)
ksp("com.google.dagger:hilt-compiler:2.51.1")
```
### 7. Avoid Dynamic Dependencies
Pin dependency versions:
```kotlin
// BAD: Forces resolution every build
implementation("com.example:lib:+")
implementation("com.example:lib:1.0.+")
// GOOD: Fixed version
implementation("com.example:lib:1.2.3")
```
### 8. Optimize Repository Order
Put most-used repositories first:
```kotlin
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
google() // First: Android dependencies
mavenCentral() // Second: Most libraries
// Third-party repos last
}
}
```
### 9. Use includeBuild for Local Modules
Composite builds are faster than `project()` for large monorepos:
```kotlin
// settings.gradle.kts
includeBuild("shared-library") {
dependencySubstitution {
substitute(module("com.example:shared")).using(project(":"))
}
}
```
### 10. Enable Incremental Annotation Processing
```properties
# gradle.properties
kapt.incremental.apt=true
kapt.use.worker.api=true
```
### 11. Avoid Configuration-Time I/O
Don't read files or make network calls during configuration:
```kotlin
// BAD: Runs during configuration
val version = file("version.txt").readText()
// GOOD: Defer to execution
val version = providers.fileContents(file("version.txt")).asText
```
### 12. Use Lazy Task Configuration
Avoid `create()`, use `register()`:
```kotlin
// BAD: Eagerly configured
tasks.create("myTask") { ... }
// GOOD: Lazily configured
tasks.register("myTask") { ... }
```
---
## Common Bottleneck Analysis
### Slow Configuration Phase
**Symptoms**: Build scan shows long "Configuring build" time
**Causes & Fixes**:
| Cause | Fix |
|-------|-----|
| Eager task creation | Use `tasks.register()` instead of `tasks.create()` |
| buildSrc with many dependencies | Migrate to Convention Plugins with `includeBuild` |
| File I/O in build scripts | Use `providers.fileContents()` |
| Network calls in plugins | Cache results or use offline mode |
### Slow Compilation
**Symptoms**: `:app:compileDebugKotlin` takes too long
**Causes & Fixes**:
| Cause | Fix |
|-------|-----|
| Non-incremental changes | Avoid `build.gradle.kts` changes that invalidate cache |
| Large modules | Break into smaller feature modules |
| Excessive kapt usage | Migrate to KSP |
| Kotlin compiler memory | Increase `kotlin.daemon.jvmargs` |
### Cache Misses
**Symptoms**: Tasks always rerun despite no changes
**Causes & Fixes**:
| Cause | Fix |
|-------|-----|
| Unstable task inputs | Use `@PathSensitive`, `@NormalizeLineEndings` |
| Absolute paths in outputs | Use relative paths |
| Missing `@CacheableTask` | Add annotation to custom tasks |
| Different JDK versionsExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4bc96bf
git clone https://github.com/new-silvermoon/awesome-android-agent-skills git -C awesome-android-agent-skills checkout 4bc96bf96aac
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4bc96bf96aac only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
4bc96bf96aac
Similar skills
obra/superpowers
Use when creating new skills, editing existing skills, or verifying skills work before deployment
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Questions about gradle-build-performance
What does the gradle-build-performance skill do?
Is gradle-build-performance safe to install?
What can gradle-build-performance access on my machine?
How current is this page?
Sources
- github.com/new-silvermoon/awesome-android-agent-skills/tree/main — the audited source at commit 4bc96bf96aac and every finding aboveObserved · 31 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the gradle-build-performance skill do?
- Is gradle-build-performance safe to install?
- What can gradle-build-performance access on my machine?