KMP Code Quality
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run whichever static-analysis tools a Kotlin Multiplatform (Android + iOS) project actually has wired — detekt, ktlint, Android Lint and SwiftLint — over the shared module’s every source set, the Android app module and optionally the Swift host app, and report every issue they find. This is a report-only skill: it never runs formatters or baseline generators, never fixes issues and never changes or installs tool configuration.
Purpose
iru-kmp-code-quality first verifies which tools are really wired, because KMP breaks the usual assumptions: a plain
detekt 1.x detekt task analyzes nothing on a KMP module unless source is configured (reported as "wired but not
covering KMP source sets", never as clean), detekt 2.x uses per-source-set tasks, ktlint checks one task per source
set, the AGP KMP library plugin registers no Lint task unless com.android.lint is applied, and SwiftLint needs both
iosApp/.swiftlint.yml and an installed binary. It then runs every wired task in one Gradle invocation with
--continue, locates and parses the Checkstyle XML, ktlint plain reports, Android Lint XML and SwiftLint JSON into
one per-tool, per-rule-id summary, and, when the prompt supplies a baseline, reports only what is new (matched on
tool + rule id + file). It is the KMP equivalent of Android Code Quality,
Kotlin Code Quality and Swift Code Quality.
Plugin
Shipped by the iru-kmp plugin of the ai-catalog marketplace (install with /plugin install iru-kmp@ai-catalog; see Plugins).
Invocation
/iru-kmp-code-quality
/iru-kmp-code-quality <scope>
/iru-kmp-code-quality <scope>
module: <gradle path>
tools: detekt,ktlint,lint,swiftlint
baseline: <prior per-tool / per-rule-id counts or itemized list>
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
A file path, class/file simple name, module ( |
None — the whole project. |
|
No |
Restrict the run to one Gradle module. |
All modules |
|
No |
Comma-separated subset of |
Every wired tool |
|
No |
A prior per-tool, per-rule-id count or itemized list from an earlier run; everything after |
None — report plain counts. |
Tool wiring checks (Step 1):
| Tool | How it is detected and run |
|---|---|
detekt |
Generation from the plugin id ( |
ktlint |
|
Android Lint |
|
SwiftLint |
Only when |
Outputs
-
A plain-text report in the conversation — never a written file.
-
An overall issue total, then per tool: ran / not wired / wired but not covering KMP source sets / not installed, the governing config, baseline or
.editorconfig, the issue count, severity breakdown and one line per rule bucket (detekt rule, ktlintruleset:rule-id, Lint issue id, SwiftLintrule_id), grouped by source set. -
The
file:linelist when the scope is smaller than the whole project. -
With a baseline: only the new-vs-baseline regressions, with a note when a tool was newly wired or the detekt generation changed.
-
A "No Kotlin/Swift static analysis configured" message when nothing is wired.
-
Nothing is fixed, formatted or reconfigured.
Execution flow
Dependencies
Invokes
None — iru-kmp-code-quality is a leaf skill; it only runs Gradle tasks, swiftlint and inline python3 parsing,
and it does not call any other skill in this catalog. Its prerequisite checks and module detection follow
KMP Test by reference only.
Invoked by
-
KMP Code One Task Group — Step 1 (captures the bucket’s pre-change quality baseline) and Step 3.6 (diffs the post-change result against that baseline), through the
iru-gate-runneragent. -
Code — Step 3 (project-wide quality baseline per language key) and Step 7 (final comparison against that baseline), resolving the
kmpkey to this skill and running it through theiru-gate-runneragent.
Related agents
-
iru-gate-runner— both callers always run this skill from inside aniru-gate-runnersub-agent, so only the compact per-rule summary reaches their context.
Source
SKILL.md on GitHub — the file this page was generated from.