Skip to main content

Scan a Kotlin or Compose Multiplatform diff for known footgun shapes and open the matching trap to confirm each hit. Use before committing, when reviewing a Kotlin change, or to audit a codebase.

  • New
  • v1.0.1
  • Reviewed Oct 19
  • No reviews yet

Capabilities

  • Run it

    From inside the user's git repository, with this skill's base…

  • Triage every hit

    A likely hit is wrong unless the exception the trap names holds

  • When the scanner cannot run

    It needs python3 and git

Getting started

Full instructions

Example command

Run it

python3 <skill>/scripts/scan.py                     # lines added in the working tree and index since HEAD

Explore more skills

Browse all

Instructions: SKILL.mdv1.0.1

Footgun scan

scripts/scan.py matches 32 patterns against the lines a change adds. Each pattern is tied to one
trap file in the kotlin-footguns area skills. It finds shapes, not bugs: every hit needs the trap's
judgment before it becomes a finding.

Run it

From inside the user's git repository, with this skill's base directory as <skill>:

bash
python3 <skill>/scripts/scan.py                     # lines added in the working tree and index since HEAD
python3 <skill>/scripts/scan.py --base origin/main  # lines added on this branch since it left main
python3 <skill>/scripts/scan.py --all src/          # every line under a path: an audit, and noisier

Pick the scope from the request. Uncommitted work takes the default. A branch or pull request takes
--base with its target branch. "Audit the codebase" takes --all, narrowed to the paths that matter.
For a pre-commit hook or CI step, add --fail to exit 1 on any likely hit.

Triage every hit

  1. Read the trap file the hit points to (the -> path).
  2. Read the code around the hit and decide, by the trap's own conditions, whether it applies.
    A likely hit is wrong unless the exception the trap names holds. A look hit is a place the
    trap says to inspect before trusting it.
  3. Report each confirmed problem with the trap's fix and its Verifying step. List dismissed hits one
    line each with the reason, for example "column is NOT NULL" or "the fade goes to black".

Hits of one detector in one file are grouped: triage the group once, then check the listed lines
for exceptions.

When the scanner cannot run

It needs python3 and git. Without them, read scripts/scan.py: the DETECTORS list gives
each pattern, its message and its trap. Run those patterns with the Grep tool over the changed
files and triage the same way.

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

Verified copySLSA L1
Signed by
skills-hub.ai verified copy of https://github.com/maxrave-dev/kotlin-footguns
Method
Verified copy of the source repoPublished by a community repo, not by skills-hub.ai. We signed this exact version to vouch that its content matches what the repo published. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from kotlin-footguns

View source →
kmp-architecture-footgunsKotlin Multiplatform structure and language traps: module splits, expect/actual, Koin and ViewModel scoping, layers, version catalogs, erased overloads, Char and string-resource formatting limits. Use when shaping modules or DI, when a…0 installsmedia-playback-footgunsMedia player traps on Media3/ExoPlayer and desktop engines: crossfade, audio focus, fades, loudness, DSP, queues and shuffle, position restore, service lifecycle, group listening. Use when playback state, queue or audio levels go wrong.0 installscompose-screens-footgunsCompose screen and interaction traps: navigation, adaptive layout, window insets, pagers, toolbars, sheets, list drag and selection, sliders, text fields, settings UI, one-shot effects. Use when layout, gestures or navigation misbehave.0 installscompose-visuals-footgunsCompose look-and-feel traps: theme and colour tokens, artwork palettes, gradients and scrims, shimmer, glass and particle effects, animation, image loading, charts and stats displays (percent changes, shares, buckets). Use when a visual…0 installsdesktop-and-build-footgunsDesktop JVM and build traps: JNA natives, bundling, memory, packaging, code signing, R8, deep links, Gradle and CI releases. Use when a desktop build fails packaged, signed, on another OS or arch, or in CI.0 installswebview-footgunsWebView traps across device classes: startup that freezes low-RAM phones, a killed renderer that takes the app with it, devices with no usable provider, AndroidView lifecycle and cookies. Use when a web screen freezes, vanishes or crashes…0 installs

Frequently asked questions about footgun-scan

What does the footgun-scan skill do?

Scan a Kotlin or Compose Multiplatform diff for known footgun shapes and open the matching trap to confirm each hit. Use before committing, when reviewing a Kotlin change, or to audit a codebase. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the footgun-scan skill?

Run `npx @skills-hub-ai/cli install kotlin-footguns-footgun-scan` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/kotlin-footguns-footgun-scan/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does footgun-scan work with?

footgun-scan runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the footgun-scan skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use footgun-scan after installing it?

In Claude Code, type `/kotlin-footguns-footgun-scan` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the footgun-scan skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/kotlin-footguns-footgun-scan)](https://skills-hub.ai/skills/kotlin-footguns-footgun-scan)
HTML
<a href="https://skills-hub.ai/skills/kotlin-footguns-footgun-scan"><img src="https://skills-hub.ai/api/badges/skill/kotlin-footguns-footgun-scan" alt="Install on Skills Hub"></a>

More options in the badge docs.