---
name: jetbrains-plugin-model-analyzer
description: "Query IntelliJ Product DSL modules, products, and plugin graphs."
license: "NOASSERTION"
metadata:
  decimalai-skill-id: "84f0780f-7781-4c60-83ed-f8d66c556141"
  decimalai-version-id: "76388e2b-e44b-4859-b970-ffe36bfc4cfc"
  decimalai-version: "6"
  decimalai-body-sha256: "4bb69caa0fb1dde1cc405165fa50c5cd11561cf23b5f05a245fc51ab7cd673af"
  decimalai-name: "jetbrains/plugin-model-analyzer"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "coding"
  decimalai-source: "https://app.decimal.ai/s/jetbrains-plugin-model-analyzer@6/SKILL.md"
---
<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/plugin-model-analyzer/SKILL.md -->

# Plugin Model Analyzer

Use the Product DSL analyzer directly through Bazel. Do not call the retired `PluginModelAnalyzer` MCP server.

When a prompt or an older instruction names an operation of the `PluginModelAnalyzer` MCP server, find the JSON request in [references/old-mcp-operations.md](references/old-mcp-operations.md).

## Command Shape

Run from the repository root:

```bash
./bazel.cmd run --ui_event_filters=-info --noshow_progress //platform/buildScripts:plugin-model-tool -- --json='<request-json>'
```

The output is JSON with a `timestamp` plus one result property named after the requested filter.

Prefer small, typed JSON requests. Avoid unfiltered `--json`: it emits the full model and is usually too large for agent context.
Use JSON fields, not extra CLI flags, to describe the query.

Transport options:

- Short request: `--json='{"filter":"summary","limit":5}'`
- Stdin request: `--json=-`
- File request: `--json=@/private/tmp/plugin-model-query.json`

## Common Requests

Module overview:

```json
{"filter":"moduleInfo","module":"intellij.platform.vcs.impl","limit":20}
```

Module dependencies:

```json
{"filter":"moduleDependencies","module":"intellij.platform.vcs.impl","includeTransitive":false,"includeTestDependencies":false}
```

Dependency path:

```json
{"filter":"dependencyPath","fromModule":"intellij.platform.vcs.impl","toModule":"intellij.platform.projectModel.impl","includeTestDependencies":true,"includeScopes":true}
```

Module owners:

```json
{"filter":"moduleOwners","module":"intellij.platform.vcs.impl","includeTestSources":true}
```

Module reachability in a module set:

```json
{"filter":"moduleReachability","module":"<module>","moduleSet":"<set>"}
```

Module-set details or search:

```json
{"filter":"moduleSetQuery","moduleSet":"ide.common","details":false,"limit":50}
{"filter":"moduleSetQuery","name":"vcs","location":"COMMUNITY","minModuleCount":3,"limit":20}
```

Product details or search:

```json
{"filter":"productQuery","product":"idea","details":false,"limit":50}
{"filter":"productQuery","usesModuleSet":"ide.common","limit":30}
{"filter":"productQuery","name":"<name>","limit":20}
```

Product comparison and trace path:

```json
{"filter":"productCompare","product":"idea","product2":"Idea","limit":50}
{"filter":"productTracePath","product":"idea","moduleSet":"ide.common","limit":20}
```

Composition of all products. The result property is `productCompositionAnalysis`:

```json
{"filter":"composition"}
```

For one product, use `productQuery`.

Embedded dependency closure:

```json
{"filter":"embeddedDependencyClosure","value":"idea","moduleSet":"ide.common","pluginSourceOnly":true}
```

Merge or inline impact:

```json
{"filter":"mergeImpact","source":"some.module.set","target":"target.module.set","operation":"merge"}
{"filter":"mergeImpact","source":"some.module.set","operation":"inline"}
```

Validation and loading-rule checks:

```json
{"filter":"validation","check":"community_products"}
{"filter":"validation","check":"module_set_locations"}
{"filter":"validation","check":"loading_inconsistencies"}
{"filter":"validation","check":"embedded_dependency_closure","product":"idea","pluginSourceOnly":true}
{"filter":"moduleLoading","loading":"EMBEDDED","limit":100}
```

Refactoring candidates:

```json
{"filter":"moduleSetOverlap","minOverlapPercent":70,"limit":20}
{"filter":"productSimilarity","threshold":0.8,"limit":20}
{"filter":"unificationSuggestions","strategy":"merge","limit":10}
{"filter":"redundantModuleSetRefs","product":"idea","limit":50}
{"filter":"suggestModuleSetsForModules","modules":["intellij.platform.vcs.impl","intellij.platform.vcs.log.impl"],"limit":20}
```

Deprecated `xi:include` usage:

```json
{"filter":"deprecatedIncludes","product":"idea","limit":100}
```

## Fast Recipes

Where is a module included?

```json
{"filter":"moduleInfo","module":"<module>","limit":50}
{"filter":"modulePaths","module":"<module>"}
```

Which products or module sets use something?

```json
{"filter":"moduleInfo","module":"<module>","limit":50}
{"filter":"productQuery","usesModuleSet":"<module-set>","limit":50}
{"filter":"productUsage","moduleSet":"<module-set>"}
```

Can a module stop being embedded?

```json
{"filter":"moduleInfo","module":"<module>","limit":50}
{"filter":"moduleLoading","loading":"EMBEDDED","details":true,"limit":200}
{"filter":"validation","check":"embedded_dependency_closure","module":"<module>","pluginSourceOnly":true}
```

For the loading query, inspect `moduleLoading.result.entries.items` for the target module; `moduleLoading` filters by loading rule, not by module name. The embedded closure check answers whether an embedded source module has dependencies that are not also supplied by embedded sources in affected products.

Did a Product DSL edit introduce placement or loading problems?

```json
{"filter":"validation","check":"community_products"}
{"filter":"validation","check":"module_set_locations"}
{"filter":"validation","check":"loading_inconsistencies"}
{"filter":"validation","check":"embedded_dependency_closure","pluginSourceOnly":true}
```

## Reading Output

- Compact list fields use `count`, `items`, and `truncated`; increase `limit` or set `details:true` only when needed.
- Some focused filters return an `error` field in JSON for missing selectors or unknown names; a successful process exit does not always mean the query matched.
- For direct `embeddedDependencyClosure`, use `value` for the product selector. The validation wrapper accepts `product` or `value`.
- `location` values are `COMMUNITY` or `ULTIMATE`. `loading` values are `EMBEDDED`, `REQUIRED`, `OPTIONAL`, or `ON_DEMAND`.

## Request Fields

Use only fields relevant to the filter. Omit false, null, and default values unless they are semantically important.

Core selectors: `filter`, `value`, `module`, `moduleSet`, `product`, `product2`, `name`, `location`, `usesModuleSet`, `modules`, `fromModule`, `toModule`, `source`, `target`.

Options: `operation`, `graph`, `check`, `loading`, `strategy`, `limit`, `minModuleCount`, `details`, `threshold`, `minOverlapPercent`, `includeTransitive`, `includeTestDependencies`, `includeTestSources`, `includeScopes`, `pluginSourceOnly`.

## Practical Rules

- Start with `summary`, `moduleInfo`, `moduleSetQuery`, or `productQuery` when exploring.
- Use the legacy precise filters (`moduleDependencies`, `dependencyPath`, `moduleOwners`, `moduleReachability`, `productUsage`, `embeddedDependencyClosure`, `mergeImpact`) when you need the full typed analysis for one target.
- If the command fails before producing JSON, treat stderr as the source of truth; invalid JSON requests exit nonzero.
