src/main/skills/introspecting_gradle_projects/SKILL.md
Uncovers Gradle project structure, task hierarchies, and resolved property values using core Gradle diagnostic tools; use for mapping modules, listing runnable tasks, and auditing build configuration. Do NOT use for running builds/tests or source code exploration.
npx skillsauth add rnett/gradle-mcp introspecting_gradle_projectsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Uncovers project modules, discovers runnable tasks, and gain total visibility into your build configuration using core Gradle diagnostic tools and authoritative dependency auditing.
gradle tool for running introspection tasks instead of raw shell commands.projectRoot.captureTaskOutput when running introspection tasks (e.g., :projects, :tasks) to filter out startup noise.inspect_dependencies for auditing dependency graphs; use gradle for task-specific dependency insights.help --task <name> command for authoritative documentation.:properties --property <name> for surgical property extraction.projects task to visualize the multi-project hierarchy and identify authoritative project paths.tasks task with --all for a comprehensive list, or scope to a specific project.help --task <name> to retrieve descriptions, types, and available command-line options for any task.properties task with the --property flag to isolate a single value and avoid massive console output.inspect_dependencies for a searchable tree and update check. For low-level variant or transformation analysis, use the built-in diagnostic tasks.Precision in path syntax is essential for mapping multi-module builds correctly.
Providing tasks without a leading colon lists tasks for every project in the build. This is usually very noisy.
To inspect a single specific project, always use a leading colon.
gradle(commandLine=[":tasks"], captureTaskOutput=":tasks")gradle(commandLine=[":app:tasks"], captureTaskOutput=":app:tasks"){
"commandLine": [":projects"],
"captureTaskOutput": ":projects"
}
// Reasoning: Using captureTaskOutput to retrieve only the project hierarchy list.
{
"commandLine": [":app:help", "--task", "assemble"],
"captureTaskOutput": ":app:help"
}
// Reasoning: Using the built-in help task to discover available options for 'assemble'.
{
"commandLine": [":properties", "--property", "version"],
"captureTaskOutput": ":properties"
}
// Reasoning: Using --property to avoid retrieving thousands of unrelated project properties.
{
"commandLine": [
":app:dependencyInsight",
"--dependency",
"com.google.guava:guava",
"--configuration",
"runtimeClasspath"
],
"captureTaskOutput": ":app:dependencyInsight"
}
// Reasoning: Using dependencyInsight to isolate the resolution path for a specific artifact.
invocationArguments: { envSource: "SHELL" } if Gradle cannot find expected env vars (e.g., JAVA_HOME).tools
Provides authoritative guidance for ALL Gradle operations: executing builds, running tests with surgical filtering, introspecting project structure, creating modules, and diagnosing failures; ALWAYS use instead of raw shell `./gradlew` for build execution, test runs, task introspection, module creation, performance audits, and documentation research. Do NOT use for dependency graph auditing/updates (use `managing_gradle_dependencies`) or dependency/plugin/Gradle source exploration (use `exploring_dependency_sources`).
tools
Reads and searches source code across ALL scopes: external library dependencies, plugins (buildscript), and Gradle Build Tool internal source code; use whenever you need to UNDERSTAND an API — its shape, signature, parameters, overloads, or implementation — before writing any code that calls it; covers project dependencies (via project/configuration/source set scope), plugins (via `sourceSetPath=":buildscript"`), and Gradle internals (via `gradleSource: true`). Prefer this over the REPL for all API research; reading source is instantaneous and complete. Do NOT use for project source code (use grep/tilth), Gradle documentation (use `gradle_docs` via the `gradle` skill), or Maven Central discovery (use `managing_gradle_dependencies`).
development
Audits and manages Gradle dependency graphs with high-resolution update checks, transitive tree analysis, and Maven Central discovery; use for dependency auditing, finding stable updates, and resolving GAV coordinates. Do NOT use for exploring dependency source code (use `exploring_dependency_sources`) or running builds/tests (use `gradle`).
development
Executes Kotlin code interactively within the project's full JVM classpath. Use when you need to RUN code: verify runtime behavior, experiment with logic, or render Compose UI previews. Do NOT use to understand an API's shape or signature — read its source with `exploring_dependency_sources` instead.