src/main/skills/searching_dependency_sources/SKILL.md
Reads and searches source code of external library dependencies, plugins, and Gradle Build Tool source code. Use this whenever you need to UNDERSTAND an API: its shape, signature, parameters, overloads, or implementation — before writing any code that calls it. 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 `researching_gradle_internals`), or Maven Central discovery (use `managing_gradle_dependencies`).
npx skillsauth add rnett/gradle-mcp searching_dependency_sourcesInstall 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.
Explores, navigates, and analyzes the internal logic, APIs, and symbol implementations of external libraries and plugins with absolute precision using high-performance, indexed searching.
search_dependency_sources as the primary discovery tool for external library and plugin code.projectRoot.{group}/{artifact} prefix for reading specific files (e.g., path="org.mongodb/mongodb-driver-sync/org/mongodb/client/MongoClient.kt"). The dependency parameter should only be used to filter the search scope for
performance when searching across libraries, not as the primary way to specify a path.gradleOwnSource: true in this skill; use researching_gradle_internals for Gradle Build Tool source code.grep or find to locate dependency sources; they reside in remote caches whose paths are not predictable in advance.rg or ast-grep to operate on a sources root path explicitly returned by read_dependency_sources or search_dependency_sources in the Sources root: <path> header line. Dependency directories inside
the sources root are symlinks; always pass --follow to rg (e.g., rg --follow <pattern> <sources-root>).:, =, +, -, *, /) in FULL_TEXT searches using a backslash (e.g., \:) or double quotes.read_dependency_sources once a specific file path has been identified via search.fresh: true if a search returns a SearchResponse with an error indicating a missing index; the tool will return an error message rather than throwing an exception if the index is not found.ZipException) are still propagated and will cause the tool to fail with a descriptive error.dependency filter targets ONLY the specific library version matched, NOT its transitive dependencies.search_dependency_sources and read_dependency_sources by default to reduce noise.sourceSetPath=":buildscript" (root project) or sourceSetPath=":app:buildscript" (subproject) to search or read plugin source code. This targets the virtual buildscript source set which aggregates all classpath
plugins.class, interface, or fun. Supports exact names, exact FQNs, glob wildcards (e.g., *, **), and regular expressions. Partial package paths require wildcards (e.g., use *.MyClass to find com.example.MyClass). You can target
specific fields using name: (discovery) or fqn: (precision) prefixes.searchType explicitly if the intent is not a general full-text search. This improves result accuracy and reduces noise.projectPath, configurationPath, or sourceSetPath to narrow the search and improve performance if the target library's context is known. To search a plugin, use sourceSetPath=":buildscript".gradleOwnSource: true) — unscoped search is no longer supported.dependency parameter to filter searches to a single library. It supports group:name:version:variant, group:name:version, group:name, or just group. This bypasses project-level index
merging and provides instantaneous results from the global extracted source cache.dependency parameter fails or returns no matches, use inspect_dependencies first to verify the exact coordinates (group, name, version, variant) of the dependency as
resolved by Gradle.fresh: true if project dependencies have recently changed to ensure the index is up-to-date.read_dependency_sources and search_dependency_sources includes a Sources root: <absolute-path> header. Use this path with rg, ast-grep, or other shell tools for operations not
covered by the MCP tools (e.g., regex-heavy searches). Because dependency directories are symlinks, always pass --follow to rg: rg --follow <pattern> <sources-root>.read_dependency_sources with a dot-separated package path (e.g., org.gradle.api) to list its direct symbols and sub-packages. This is backed by the symbol index and is more reliable than
directory-based exploration for Kotlin projects.read_dependency_sources to retrieve the implementation logic. If the file is large, use pagination to read specific sections. You can target plugins by passing sourceSetPath=":buildscript".DECLARATION search to jump directly to its definition in the library. This is the only reliable way to understand exact behavior and available methods.Decision rule: If the question is "what does this API look like or how does it work?" — use this skill. If you need to run code to see what it does at runtime — use
interacting_with_project_runtime(REPL). Read before you run.
build.gradle), or metadata (AndroidManifest.xml) packaged within library jars.JsonConfiguration) or fully qualified name from an import.search_dependency_sources(query="<SymbolName>", searchType="DECLARATION", projectPath=":").read_dependency_sources(path="<path>", projectPath=":") to analyze the implementation.DECLARATION or FULL_TEXT.read_dependency_sources to read its source.search_dependency_sources(query="\"<text>\"", projectPath=":") (defaults to FULL_TEXT).inspect_dependencies or project files).search_dependency_sources(query="<query>", dependency="<group:artifact>", projectPath=":").Path Syntax and Targeted Searching
When reading specific dependency source files, it is STRONGLY RECOMMENDED to use the full path syntax including the {group}/{artifact} prefix (e.g., path = "org.mongodb/mongodb-driver-sync/org/mongodb/client/MongoClient.kt"). The
dependency parameter should be reserved for filtering the scope of search_dependency_sources for performance, rather than as a way to shorten paths. This explicitly avoids Windows file system issues with colons.
{
"query": "MongoClient",
"searchType": "DECLARATION",
"dependency": "org.mongodb:mongodb-driver-sync",
"projectPath": ":"
}
// Reasoning: Using the 'dependency' parameter to target only the 'mongodb-driver-sync' library for a fast, focused search.
{
"path": "org.jetbrains.kotlinx/kotlinx-coroutines-core/kotlinx/coroutines/Job.kt",
"projectPath": ":"
}
// Reasoning: Reading 'Job.kt' using the recommended {group}/{artifact} syntax.
{
"query": "JsonConfiguration",
"searchType": "DECLARATION",
"projectPath": ":"
}
// Reasoning: Using DECLARATION search to find a class named 'JsonConfiguration' across both name and FQN fields, scoped to the root project.
{
"query": "fqn:kotlinx.serialization.json.*",
"searchType": "DECLARATION",
"projectPath": ":"
}
// Reasoning: Using the 'fqn:' prefix with a wildcard to find all declarations within a specific package literal.
{
"query": "name:Configuration",
"searchType": "DECLARATION",
"projectPath": ":"
}
// Reasoning: Using the 'name:' prefix to find classes like 'JsonConfiguration' via CamelCase tokenization.
{
"query": "encodeTo*",
"searchType": "DECLARATION",
"projectPath": ":"
}
// Reasoning: Finding all definitions starting with 'encodeTo' across both name and FQN fields.
{
"query": "fqn:/.*\.internal\..*/",
"searchType": "DECLARATION",
"projectPath": ":"
}
// Reasoning: Using a regular expression on the 'fqn' field to find all internal declarations.
{
"query": "DEFAULT_TIMEOUT_MS \\: 5000",
"projectPath": ":"
}
// Reasoning: Using FULL_TEXT (default) with escaped colon to find a specific constant assignment.
{
"query": "**/AndroidManifest.xml",
"searchType": "GLOB",
"projectPath": ":"
}
// Reasoning: Using GLOB search to find a specific file by name across the dependency graph.
{
"path": "kotlinx/serialization/json/Json.kt",
"projectPath": ":"
}
// Reasoning: Reading the implementation of a known class path identified from previous search results, scoped to the root project.
{
"path": "org.gradle.api",
"projectPath": ":"
}
// Reasoning: Listing the direct symbols and sub-packages of 'org.gradle.api' using index-backed exploration, scoped to the root project.
search_dependency_sources for details on complex queries and escaping.dependency filter fails, run inspect_dependencies to confirm the exact coordinates.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.