extract-library

Extract an app module into a standalone published KMP library on Maven Central.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/Zeyad-37/tech-agency --skill extract-library-zeyad-37
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: extract-library
Source: https://github.com/Zeyad-37/tech-agency/tree/main/.claude/skills/extract-library
Command: npx skills add https://github.com/Zeyad-37/tech-agency --skill extract-library-zeyad-37

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Moving reusable code out of an app into its own published Kotlin Multiplatform library involves repo scaffolding, package renames, Maven Central publishing setup, consumer migration, and a workable dev loop — each with non-obvious gotchas that cost hours when discovered the hard way. ## Core Features & Use Cases - End-to-end extraction workflow: Four phases covering seam scoping, standalone repo scaffolding, Maven Central publishing (releases and snapshots), and consumer app migration. - Publishing pipeline setup: vanniktech maven-publish configuration, GitHub Actions release and snapshot workflows, signing key handling, and Central Portal account guidance. - Composite-build dev flow: Gated includeBuild with explicit dependency substitution so the app can develop against a local library checkout, plus Renovate-driven version bumps. - Use Case: You vendored a pager/gesture module inside your production KMP app and want to open-source it as io.github.you:my-lib on Maven Central while keeping a fast inner dev loop against your app. ## Quick Start Ask the assistant to extract the vendored module from my app into a standalone KMP library published to Maven Central and swap the app to consume the artifact.

Frequently Asked Questions about extract-library

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a Kotlin Multiplatform library to Maven Central?▼

Use the vanniktech maven-publish plugin with SONATYPE_HOST=CENTRAL_PORTAL, configure GROUP, POM_ARTIFACT_ID, and VERSION_NAME in gradle.properties, then run publishAndReleaseToMavenCentral from a macOS CI runner on version tags. Signing keys and a Central Portal user token are required.

How do I extract a module from my app into a standalone library?▼

First scope the seam: identify the reusable engine versus app integration code, count expect/actual declarations, and rename the package to your own namespace. Then scaffold a fresh KMP repo with a sample app, port JVM-isms out of common code, and set up publishing before swapping the consumer app to the artifact.

Can JitPack build Kotlin Multiplatform libraries?▼

No, JitPack cannot build KMP libraries because it lacks macOS builders needed to compile iOS klibs. Use Maven Central via the Central Portal with a macOS CI runner instead.

Why does my Gradle composite build fail with AgpVersionCompatibilityRule errors?▼

Composite builds fail variant matching when the app and library run different AGP versions. Both builds must use the identical AGP version, and KMP's multi-publication layout requires explicit dependencySubstitution in includeBuild.

Why does snapshot publishing to Maven Central return 403?▼

Snapshot publishing returns 403 until SNAPSHOTs are explicitly enabled for your namespace in the Central Portal. Open your namespace row, click the menu, and select Enable SNAPSHOTs before pushing snapshot builds.

When should I not extract a module into its own library?▼

Do not extract before the module's seam is proven under real usage. Vendor it first as an in-repo module with its own package, harden it in production, then extract once stable — extracting prematurely costs more than it saves.