tangchunwu/skill-hub/source-command-gradle-build

Claude Code and agent skill by tangchunwu/skill-hub

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Fix Gradle build errors for Android and KMP projects

Install

npx vskill@latest install tangchunwu/skill-hub/source-command-gradle-build

SKILL.md

The same SKILL.md was published earlier as tangchunwu/skill-hub/source-command-gradle-build.

source-command-gradle-build

Use this skill when the user asks to run the migrated source command gradle-build.

Command Template

Gradle Build Fix

Incrementally fix Gradle build and compilation errors for Android and Kotlin Multiplatform projects.

Step 1: Detect Build Configuration

Identify the project type and run the appropriate build:

IndicatorBuild Command
build.gradle.kts + composeApp/ (KMP)./gradlew composeApp:compileKotlinMetadata 2>&1
build.gradle.kts + app/ (Android)./gradlew app:compileDebugKotlin 2>&1
settings.gradle.kts with modules./gradlew assemble 2>&1
Detekt configured./gradlew detekt 2>&1

Also check gradle.properties and local.properties for configuration.

Step 2: Parse and Group Errors

  1. Run the build command and capture output
  2. Separate Kotlin compilation errors from Gradle configuration errors
  3. Group by module and file path
  4. Sort: configuration errors first, then compilation errors by dependency order

Step 3: Fix Loop

For each error:

  1. Read the file — Full context around the error line
  2. Diagnose — Common categories:
  • Missing import or unresolved reference
  • Type mismatch or incompatible types
  • Missing dependency in build.gradle.kts
  • Expect/actual mismatch (KMP)
  • Compose compiler error
  1. Fix minimally — Smallest change that resolves the error
  2. Re-run build — Verify fix and check for new errors
  3. Continue — Move to next error

Step 4: Guardrails

Stop and ask the user if:

  • Fix introduces more errors than it resolves
  • Same error persists after 3 attempts
  • Error requires adding new dependencies or changing module structure
  • Gradle sync itself fails (configuration-phase error)
  • Error is in generated code (Room, SQLDelight, KSP)

Step 5: Summary

Report:

  • Errors fixed (module, file, description)
  • Errors remaining
  • New errors introduced (should be zero)
  • Suggested next steps

Common Gradle/KMP Fixes

ErrorFix
Unresolved reference in commonMainCheck if the dependency is in commonMain.dependencies {}
Expect declaration without actualAdd actual implementation in each platform source set
Compose compiler version mismatchAlign Kotlin and Compose compiler versions in libs.versions.toml
Duplicate classCheck for conflicting dependencies with ./gradlew dependencies
KSP errorRun ./gradlew kspCommonMainKotlinMetadata to regenerate
Configuration cache issueCheck for non-serializable task inputs

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Oct 2026, a month ago.

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tangchunwu/skill-hub/source-command-gradle-build/badge)](https://verified-skill.com/skills/tangchunwu/skill-hub/source-command-gradle-build)

Something wrong with this skill or its page? Tell us.