# AI use cases for Kotlin Footguns (maxrave-dev/kotlin-footguns)

Repo: [maxrave-dev/kotlin-footguns](https://github.com/maxrave-dev/kotlin-footguns) | Use cases: 4 | Page: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/

A set of agent skills and a scanner that flag 228 known failure modes in Kotlin, Compose Multiplatform and desktop JVM code, drawn from a production music app.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Scan a Kotlin change for known footguns before merge: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/scan-kotlin-diff-for-footguns/
- Review a Compose screen against UI and state traps: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/review-compose-screen-with-trap-skills/
- Audit desktop packaging, signing and CI config: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/audit-desktop-packaging-and-ci/
- Check a Room migration against data-layer traps: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/check-room-migration-before-release/

## How to scan a Kotlin change for known footguns before merge with Kotlin Footguns

Repo: [maxrave-dev/kotlin-footguns](https://github.com/maxrave-dev/kotlin-footguns) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run a 32-pattern scanner over the lines your branch adds and review each flagged trap.

**Who it is for:** A Kotlin developer about to open a pull request who wants a check against known Kotlin and Compose pitfalls.

**The problem:** Common Kotlin, Compose and desktop JVM mistakes pass compilation and code review because they look correct on the surface.

**The outcome:** A list of likely and look hits tied to specific trap files, each one confirmed or dismissed before the branch merges.

### Steps

1. Install the skills into your project with `npx skills@latest add maxrave-dev/kotlin-footguns`, selecting the footgun-scan skill. (inferred, check the README)
2. From the repository root, run `python3 .claude/skills/footgun-scan/scripts/scan.py --base origin/main --fail`.
3. Read each likely hit and open the trap file it names to confirm or dismiss it.
4. Read each look hit as a place to inspect, not a verdict.
5. Fix the confirmed hits and run the scan again until it reports nothing you need to act on.

### Prompt to paste into your agent

```text
In the kotlin-footguns skills installed in <repo path>, run the footgun-scan script against origin/main and open the trap file for every likely hit. Expected output: each hit marked confirmed or dismissed with a one-line reason. Verify that every confirmed hit names a trap file that exists in the skill directory.
```

### Caveat

The scanner only matches the 32 patterns it ships with, so a clean scan does not mean a change is free of the 228 traps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/scan-kotlin-diff-for-footguns/

## How to review a Compose screen against UI and state traps with Kotlin Footguns

Repo: [maxrave-dev/kotlin-footguns](https://github.com/maxrave-dev/kotlin-footguns) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Have an agent check a Compose screen against the visuals, screens and state trap indexes.

**Who it is for:** A Compose Multiplatform developer building or changing a screen with theming, gradients, navigation or ViewModel state.

**The problem:** Compose UI bugs such as wrong colour fades, half-height slides and lifecycle leaks often look fine in a preview and fail on device.

**The outcome:** An agent-written review that names the specific trap files relevant to the screen and explains each risk found in the code.

### Steps

1. In Claude Code, run `/plugin marketplace add maxrave-dev/kotlin-footguns`.
2. Run `/plugin install kotlin-footguns@maxrave`.
3. Ask the agent to read the compose-visuals-footguns and compose-screens-footguns indexes.
4. Point the agent at the screen file and ask it to open only the trap files whose symptoms match.
5. Apply the fixes the trap files describe and rerun the review on the changed file.

### Prompt to paste into your agent

```text
Using the installed kotlin-footguns skills, review <path to screen file> against the compose-visuals-footguns and compose-screens-footguns indexes. Expected output: a list of matched trap files with the line in the screen that triggers each one. Verify that each cited trap file exists and that its trigger description matches the code you point to.
```

### Caveat

The skills are mined from one music app, so trap coverage for a Compose screen that is far from that app's patterns may be thin.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/review-compose-screen-with-trap-skills/

## How to audit desktop packaging, signing and CI config with Kotlin Footguns

Repo: [maxrave-dev/kotlin-footguns](https://github.com/maxrave-dev/kotlin-footguns) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Check a desktop JVM build for packaging, code-signing and CI traps before a release.

**Who it is for:** A desktop JVM developer shipping a Compose or Kotlin app to Windows, macOS or Linux through CI.

**The problem:** Build flags, packaging steps and signing setup can behave differently per platform, and failures often appear only in release builds.

**The outcome:** A review of the build and CI files that names the desktop-and-build-footguns traps that apply and the fix each one describes.

### Steps

1. Install the plugin in Claude Code with `/plugin install kotlin-footguns@maxrave` after adding the marketplace.
2. Ask the agent to open the desktop-and-build-footguns index.
3. Give the agent your build script and CI workflow files.
4. Have the agent open each matching trap and check the build file against its verification steps.
5. Run the verification commands each trap lists against your own tree and record the results.

### Prompt to paste into your agent

```text
Using the desktop-and-build-footguns skill from kotlin-footguns, audit the build and CI files at <project path>. Expected output: a table of matched traps with file and line, and a verification result for each. Verify that every verification command you run is one the trap file lists, and that you did not invent any new command.
```

### Caveat

The traps cover desktop packaging and signing patterns seen in one project, so they do not replace platform-specific release checks for your own signing setup.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/audit-desktop-packaging-and-ci/

## How to check a Room migration against data-layer traps with Kotlin Footguns

Repo: [maxrave-dev/kotlin-footguns](https://github.com/maxrave-dev/kotlin-footguns) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Have an agent review schema changes and migration SQL against the data-layer trap index.

**Who it is for:** An Android or KMP developer changing a Room schema who needs to avoid data loss on app upgrade.

**The problem:** Migration SQL and repository code can pass tests on a fresh install and still corrupt or drop data for existing users.

**The outcome:** A migration review tied to specific data-layer-footguns trap files, with each risk and its verification step listed.

### Steps

1. Install the skills with `npx skills@latest add maxrave-dev/kotlin-footguns` and select the data-layer-footguns skill.
2. Ask the agent to read the data-layer-footguns index and open the trap files about migrations.
3. Give the agent the schema diff and the migration file.
4. Have the agent run the verification commands listed in each matched trap file against your tree.
5. Fix each confirmed risk and rerun the review on the final migration.

### Prompt to paste into your agent

```text
Using the data-layer-footguns skill from kotlin-footguns, review the Room migration in <migration file path> and its schema diff. Expected output: each matched migration trap with the SQL line that triggers it and the verification result. Verify that each verification command you run appears verbatim in the matched trap file.
```

### Caveat

The migration traps come from one production app's Room database, so you still need to test upgrades against real data from your own users.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/maxrave-dev-kotlin-footguns/check-room-migration-before-release/
