agentleFS
prasad-vennamprasad-vennam/Awesome-Android-AI-Agent-Skills/skills/android-build-verification/SKILL.md

android-build-verification

Skill11 starsChanged 8 months agoMITView on GitHub

MANDATORY verification skill to run after EVERY file change. Automatically triggers an Android build (assembledDebug) to check for compilation or schema errors.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After EVERY edit: After you modify more than 2 files or 20 lines of code.

    line 23
  2. Very specific:

    Dependency Changes: After updating libs.versions.toml or build.gradle.kts.

    line 24
  3. Very specific:

    DI/Schema Changes: After adding a new @HiltAndroidApp, @Entity, or @Dao.

    line 25
  4. Very specific:

    Resource Changes: If you add new icons or strings to res/.

    line 26
  5. Distinctive:

    Purpose: Verify that the entire project compiles.

    line 33
  6. Distinctive:

    Purpose: Ensure that logic didn't regress after the build script was changed.

    line 38
  7. Very specific:

    Hilt Entry Point: Verify that the Application class (annotated with @HiltAndroidApp) is registered in AndroidManifest.xml under …

    line 41
  8. Very specific:

    Theme Bridge: If using Material 3 XML themes, ensure com.google.android.material:material is present in dependencies.

    line 42
  9. Very specific:

    Icon Resources: Check that res/mipmap-anydpi-v26 and res/drawable contain valid XML vectors for adaptive icons to avoid AAPT linking errors.

    line 43
  10. Distinctive:

    When explicitly tasked to create a project or scaffold a new feature from scratch, agents MUST verify these items before claiming …

    line 47
  11. Very specific:

    "Unresolved Reference": Check imports or if the target module is missing from settings.gradle.kts.

    line 61
  12. Very specific:

    "Duplicate Class": Check for version conflicts in libs.versions.toml.

    line 62
  13. Very specific:

    "Hilt Error": Ensure the @AndroidEntryPoint or @Module classes have the correct annotations and that kapt is active.

    line 63
  14. Very specific:

    "Room Schema Export": Verify if you moved database versioning without updating the exportSchema config.

    line 64
  15. Distinctive:

    Step 3: If it fails, fix the code immediately.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Android Build Verification 🛠️🔍

A foundational quality guard for Android AI Agents that ensures no code is committed or merged without a successful compilation.

⚡ When to Use

  • After EVERY edit: After you modify more than 2 files or 20 lines of code.
  • Dependency Changes: After updating libs.versions.toml or build.gradle.kts.
  • DI/Schema Changes: After adding a new @HiltAndroidApp, @Entity, or @Dao.
  • Resource Changes: If you add new icons or strings to res/.

🏗️ The Build Workflow

1. Fast Compilation Check

  • Command: ./gradlew assembleDebug --parallel --build-cache
  • Purpose: Verify that the entire project compiles.

2. Unit Verification

  • Command: ./gradlew testDebugUnitTest
  • Purpose: Ensure that logic didn't regress after the build script was changed.

3. Manifest & Resource Consistency (Critical)

  • Hilt Entry Point: Verify that the Application class (annotated with @HiltAndroidApp) is registered in AndroidManifest.xml under android:name.
  • Theme Bridge: If using Material 3 XML themes, ensure com.google.android.material:material is present in dependencies.
  • Icon Resources: Check that res/mipmap-anydpi-v26 and res/drawable contain valid XML vectors for adaptive icons to avoid AAPT linking errors.

🛑 Scaffolding / Empty Project Guardrails

When explicitly tasked to create a project or scaffold a new feature from scratch, agents MUST verify these items before claiming completion:

  1. Complete Theme Implementation: Did you actually create Theme.kt, Color.kt, and Type.kt? (Prevents Theme not found errors).
  2. Compose Compiler Symmetry: Did you double-check that the composeCompiler version explicitly matches the kotlin plugin version in libs.versions.toml?
  3. Auxiliary Dependencies: Did you add the required libraries you referenced? (e.g. coil-compose, hilt-navigation-compose, windowsizeclass).
  4. End-to-End Hookup: Are all UI buttons calling actual ViewModel methods that hit a Repository, or did you accidentally leave an empty { /* TODO */ } block? Do not leave disconnected UIs.

🚀 Performance Strategies

  • Daemon Speed: Keep the Gradle daemon warm by running consecutive tasks.
  • Offline Mode: If building frequently without dependency changes, use --offline to skip network checks.
  • Task Selection: If only one module changed (e.g., :feature:auth), only build that module: ./gradlew :feature:auth:assembleDebug.

🧪 Error & Symptom Checker

  • "Unresolved Reference": Check imports or if the target module is missing from settings.gradle.kts.
  • "Duplicate Class": Check for version conflicts in libs.versions.toml.
  • "Hilt Error": Ensure the @AndroidEntryPoint or @Module classes have the correct annotations and that kapt is active.
  • "Room Schema Export": Verify if you moved database versioning without updating the exportSchema config.

📐 Continuous Verification Workflow (For Agents)

  • Step 1: Make the intended change.
  • Step 2: Run ./gradlew assembleDebug.
  • Step 3: If it fails, fix the code immediately.
  • Step 4: Report "Build Successful" alongside the code changes to the user.

📜 Checklist for Reliability

  • Local Build: Did it pass locally before saying "I'm done"?
  • Syncing: Did you run git add . and commit the new files for the user?
  • Lint: Are there no critical lint errors that would prevent a release?

🔗 Related Resources

  • Detekt Expert Skill
  • Unit Testing Skill
  • Gradle Expert Skill

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.