mcpbeat Sign in

Introspecting Gradle Projects Agent Skill

> 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.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1063
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Kotlin/kotlinx-rpc --skill introspecting_gradle_projects

What comes with it

1 608 bytes besides the instruction
references/diagnostic_tasks.md

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

14 sections, as written by the author

Deep Project Structure & Environment Introspection

Uncovers project modules, discovers runnable tasks, and gain total visibility into your build configuration using core Gradle diagnostic tools and authoritative dependency auditing.

Constitution

  • ALWAYS use the gradle tool for running introspection tasks instead of raw shell commands.
  • ALWAYS provide absolute paths for projectRoot.
  • ALWAYS use captureTaskOutput when running introspection tasks (e.g., :projects, :tasks) to filter out startup noise.
  • ALWAYS use inspect_dependencies for auditing dependency graphs; use gradle for task-specific dependency insights.
  • NEVER guess task names or options; use the help --task <name> command for authoritative documentation.
  • ALWAYS use :properties --property <name> for surgical property extraction.

Directives

  • Map structure first: ALWAYS use the projects task to visualize the multi-project hierarchy and identify authoritative project paths.
  • Discover tasks surgically: ALWAYS use the tasks task with --all for a comprehensive list, or scope to a specific project.
  • Query task metadata: ALWAYS use help --task <name> to retrieve descriptions, types, and available command-line options for any task.
  • Extract properties precisely: ALWAYS use the properties task with the --property flag to isolate a single value and avoid massive console output.
  • Audit dependencies: Use inspect_dependencies for a searchable tree and update check. For low-level variant or transformation analysis, use the built-in diagnostic tasks.
  • Refer to diagnostic guides: For a complete list of introspection commands, see the Diagnostic Tasks reference.

Authoritative Task Path Syntax

Precision in path syntax is essential for mapping multi-module builds correctly.

1. Task Selectors (Recursive)

Providing tasks without a leading colon lists tasks for every project in the build. This is usually very noisy.

2. Absolute Task Paths (Targeted)

To inspect a single specific project, always use a leading colon.

  • Root Project: gradle(commandLine=[":tasks"], captureTaskOutput=":tasks")
  • Subproject: gradle(commandLine=[":app:tasks"], captureTaskOutput=":app:tasks")

When to Use

  • Multi-Module Mapping: When you need to visualize the full project hierarchy and identify correct project paths.
  • Task & Option Discovery: When you need to find runnable tasks or get authoritative help on a task's configuration.
  • Environment & Runtime Auditing: When you need to verify Gradle versions, JVM toolchains, or system properties.
  • Surgical Property Inspection: When you need to extract a specific property value (like an artifact version or build directory) for use in a subsequent task.

Examples

List all sub-projects in the build

{
  "commandLine": [":projects"],
  "captureTaskOutput": ":projects"
}
// Reasoning: Using captureTaskOutput to retrieve only the project hierarchy list.

Get authoritative help for a specific task

{
  "commandLine": [":app:help", "--task", "assemble"],
  "captureTaskOutput": ":app:help"
}
// Reasoning: Using the built-in help task to discover available options for 'assemble'.

Surgically inspect the 'version' property

{
  "commandLine": [":properties", "--property", "version"],
  "captureTaskOutput": ":properties"
}
// Reasoning: Using --property to avoid retrieving thousands of unrelated project properties.

Analyze a specific dependency conflict

{
  "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.

Troubleshooting

  • Missing environment variables: Set invocationArguments: { envSource: "SHELL" } if Gradle cannot find expected env vars (e.g., JAVA_HOME).

Resources

  • Diagnostic Tasks

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take kotlin/introspecting_gradle_projects from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.