Agent skill

Ktormonitor

by CosminMihuMDC in CosminMihuMDC/KtorMonitor

KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

Apache-2.0Auto-check passedMobile

Install Ktormonitor

skills CLI
$ npx skills add CosminMihuMDC/KtorMonitor --skill ktormonitor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CosminMihuMDC/KtorMonitor ktormonitor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CosminMihuMDC/KtorMonitor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ktormonitor .claude/skills/ktormonitor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ktormonitor
GitHub stars
254
Token cost
~2.5k tokens
SKILL.md length
434 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

  • Works in 4 steps: Identify the HTTP client and platform → Add the dependency → Install the plugin / interceptor / filter → …
  • A developer needs to integrate
  • SKILL.md covers What this skill does, Step 1 — Identify the HTTP…, Step 2 — Add the dependency and Step 3 — Install the plugin /…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ktormonitor is an agent skill from CosminMihuMDC/KtorMonitor. KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring. It supports Ktor Client, OkHttp, and http4k on Android, iOS, Desktop JVM, Wasm, and JS. Use this skill when a developer needs to integrate, configure, display, or troubleshoot HTTP monitoring in a Kotlin or Android project.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps and Android development. It works with Android, iOS, WebAssembly and Kotlin. The repository describes itself as: Powerful tool to monitor Ktor Client, OkHttp and http4k requests and responses, making it easier to debug and analyze network communication. The licence is Apache-2.0.

When your agent uses it

  • A developer needs to integrate
  • Troubleshoot HTTP monitoring in a Kotlin
  • Android project

Example prompts

  • “/ktormonitor”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Identify the HTTP client and platform
  2. Add the dependency
  3. Install the plugin / interceptor / filter
  4. Add the UI for the target platform

What it can do on your machine

Read from SKILL.md and the folder at commit 1993898. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin, swift and javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • cosminmihumdc.github.io
    • search.maven.org
    • kotlinlang.slack.com
    • klibs.io
    • context7.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ktormonitor loads about 2.5k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 434 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from CosminMihuMDC/KtorMonitor at commit 1993898, republished under its Apache-2.0 licence (© CosminMihuMDC). 434 words, ~2,517 tokens.

Download SKILL.mdSave it as .claude/skills/ktormonitor/SKILL.md (or your agent's skills folder).
name
ktormonitor
description
KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring. It supports Ktor Client, OkHttp, and http4k on Android, iOS, Desktop JVM, Wasm, and JS. Use this skill when a developer needs to integrate, configure, display, or troubleshoot HTTP monitoring in a Kotlin or Android project.
version
1.16.0
tags
kotlin, android, ios, kotlin-multiplatform, ktor, okhttp, http4k, compose-multiplatform, networking, debugging

KtorMonitor Skill

What this skill does

When a developer asks to:

  • Add HTTP traffic monitoring to a Kotlin / Android / KMP project
  • Inspect Ktor Client, OkHttp, or http4k requests and responses
  • Configure log retention, body size limits, or header sanitization
  • Display the KtorMonitor UI on any platform
  • Exclude monitoring code from production (release) builds
  • Fix issues with KtorMonitor (notifications, body truncation, desugaring, etc.)

…follow the steps below in order, adapting to the developer's specific platform and HTTP client.


Step 1 — Identify the HTTP client and platform

HTTP clientSupported platforms
Ktor ClientAndroid, iOS, Desktop JVM, Wasm, JS
OkHttpAndroid, Desktop JVM
http4kAndroid, Desktop JVM

Step 2 — Add the dependency

Ktor Client — Kotlin Multiplatform
kotlin
// build.gradle.kts
kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("ro.cosminmihu.ktor:ktor-monitor-logging:1.16.0")
        }
    }
}

No-op for release builds (KMP):

kotlin
kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("ro.cosminmihu.ktor:ktor-monitor-logging-no-op:1.16.0")
        }
    }
}
Ktor Client — Android only
kotlin
// build.gradle.kts (app module)
dependencies {
    debugImplementation("ro.cosminmihu.ktor:ktor-monitor-logging:1.16.0")
    releaseImplementation("ro.cosminmihu.ktor:ktor-monitor-logging-no-op:1.16.0")
}
OkHttp — Android & JVM
kotlin
dependencies {
    debugImplementation("ro.cosminmihu.ktor:ktor-monitor-okhttp-interceptor:1.16.0")
    releaseImplementation("ro.cosminmihu.ktor:ktor-monitor-okhttp-interceptor-no-op:1.16.0")
}
http4k — Android & JVM
kotlin
dependencies {
    debugImplementation("ro.cosminmihu.ktor:ktor-monitor-http4k-filter:1.16.0")
    releaseImplementation("ro.cosminmihu.ktor:ktor-monitor-http4k-filter-no-op:1.16.0")
}

Android minSdk < 26: add Core Library Desugaring:

kotlin
android {
    compileOptions { isCoreLibraryDesugaringEnabled = true }
}
dependencies {
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}

Step 3 — Install the plugin / interceptor / filter

Ktor Client Plugin
kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitorLogging
import ro.cosminmihu.ktor.monitor.RetentionPeriod
import ro.cosminmihu.ktor.monitor.ContentLength

val client = HttpClient {
    install(KtorMonitorLogging) {
        // Replace matching header values with "***" in the logs
        sanitizeHeader { header -> header == "Authorization" }

        // Return true to SKIP logging for a request
        filter { request -> !request.url.host.contains("example.com") }

        // Show OS notification summarising active requests (Android & iOS only)
        showNotification = true

        // How long captured calls are kept. Default: OneHour
        retentionPeriod = RetentionPeriod.OneHour

        // Max body bytes captured. Default: 250 000. Use Full to disable the limit.
        maxContentLength = ContentLength.Default
    }
}
OkHttp Interceptor

Always use addNetworkInterceptor — it sees actual network traffic including redirects.

kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitorInterceptor
import ro.cosminmihu.ktor.monitor.RetentionPeriod
import ro.cosminmihu.ktor.monitor.ContentLength

val client = OkHttpClient.Builder()
    .addNetworkInterceptor(
        KtorMonitorInterceptor {
            sanitizeHeader { header -> header == "Authorization" }
            filter { request -> !request.url.host.contains("example.com") }
            showNotification = true
            retentionPeriod = RetentionPeriod.OneHour
            maxContentLength = ContentLength.Default
        }
    )
    .build()
http4k Filter
kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitorFilter
import ro.cosminmihu.ktor.monitor.RetentionPeriod
import ro.cosminmihu.ktor.monitor.ContentLength

val app = KtorMonitorFilter {
    sanitizeHeader { header -> header == "Authorization" }
    filter { request -> !request.uri.host.contains("example.com") }
    showNotification = true          // Android only for http4k
    retentionPeriod = RetentionPeriod.OneHour
    maxContentLength = ContentLength.Default
}.then(JavaHttpClient())

Step 4 — Add the UI for the target platform

Compose Multiplatform (all targets)
kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitor

@Composable
fun App() {
    KtorMonitor()
}
Android

Embed KtorMonitor() in any Composable. When showNotification = true and android.permission.POST_NOTIFICATIONS is granted, tapping the notification opens the monitor automatically — no extra Activity setup needed.

iOS
kotlin
// Kotlin shared module
import ro.cosminmihu.ktor.monitor.KtorMonitorViewController

fun MainViewController() = KtorMonitorViewController()
swift
// SwiftUI
struct KtorMonitorView: UIViewControllerRepresentable {
    func makeUIViewController(context: Context) -> UIViewController {
        MainViewControllerKt.MainViewController()
    }
    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}

struct ContentView: View {
    var body: some View {
        KtorMonitorView().ignoresSafeArea()
    }
}
Desktop — Compose (Window + optional system tray)
kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitorWindow
import ro.cosminmihu.ktor.monitor.KtorMonitorMenuItem

fun main() = application {
    var showKtorMonitor by rememberSaveable { mutableStateOf(false) }

    Tray(icon = painterResource(Res.drawable.ic_launcher), menu = {
        KtorMonitorMenuItem { showKtorMonitor = true }
    })

    KtorMonitorWindow(
        show = showKtorMonitor,
        onCloseRequest = { showKtorMonitor = false }
    )

    Window(onCloseRequest = ::exitApplication) { App() }
}
Desktop — Swing
kotlin
import ro.cosminmihu.ktor.monitor.KtorMonitorPanel

fun main() {
    SwingUtilities.invokeLater {
        val frame = JFrame("Ktor Monitor")
        frame.add(KtorMonitorPanel, BorderLayout.CENTER)
        frame.isVisible = true
    }
}
Wasm / JS (browser)
kotlin
// build.gradle.kts — add webpack helper
kotlin {
    sourceSets {
        webMain.dependencies {
            implementation(devNpm("copy-webpack-plugin", "9.1.0"))
        }
    }
}
javascript
// {project}/webpack.config.d/sqljs.js
config.resolve = { fallback: { fs: false, path: false, crypto: false } };
const CopyWebpackPlugin = require('copy-webpack-plugin');
config.plugins.push(new CopyWebpackPlugin({
    patterns: ['../../node_modules/sql.js/dist/sql-wasm.wasm']
}));
kotlin
// Main entry point
fun main() {
    ComposeViewport(document.body!!) { App() }
}

Configuration reference

OptionTypeDefaultDescription
sanitizeHeader(String) -> Boolean—Matching header values are replaced with ***
filter(request) -> Boolean—Matching requests are not logged
showNotificationBooleantrueOS notification (Android & iOS only; needs permission)
retentionPeriodRetentionPeriodOneHourHow long calls are stored locally
maxContentLengthContentLengthDefault (250 000 B)Truncation limit; Full disables it
Show full SKILL.md (164 more words)Show less
RetentionPeriod values
OneMinute · ThirtyMinutes · OneHour · TwoHours · OneDay · OneWeek
ContentLength values
ContentLength.Default   // 250 000 bytes
ContentLength.Full      // no limit

No-op artifact map (production safety)

DebugRelease / No-op
ktor-monitor-loggingktor-monitor-logging-no-op
ktor-monitor-okhttp-interceptorktor-monitor-okhttp-interceptor-no-op
ktor-monitor-http4k-filterktor-monitor-http4k-filter-no-op
ktor-monitor-corektor-monitor-core-no-op

All no-op variants are ABI-identical to their counterparts — zero code changes needed when switching.


Common questions & troubleshooting

Body appears truncated in the UI

Set maxContentLength = ContentLength.Full to capture the entire body.

No notification appears on Android

Grant android.permission.POST_NOTIFICATIONS at runtime and ensure showNotification = true.

OkHttp — some requests are missing

Use addNetworkInterceptor, not addInterceptor. The network interceptor sees all traffic.

http4k — streaming responses are not captured

Only materialized bodies are supported. Streaming bodies are skipped.

Build fails on Android with minSdk < 26

Enable Core Library Desugaring (see Step 2 note above).

WebSocket / SSE support?

Yes — KtorMonitorLogging captures WebSocket frames and Server-Sent Events automatically.

Which body formats get rich preview?

JSON, XML, HTML, CSS, YAML, Markdown, Form Data, Multipart, Images (JPG / PNG / SVG / GIF / WEBP), Hex.


Resources

© CosminMihuMDC, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/ktormonitor of CosminMihuMDC/KtorMonitor.

Open the folder on GitHubat commit 1993898

Compare with similar skills

Ktormonitor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ktormonitor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ktormonitor this skillCosminMihuMDC/KtorMonitor254—~2.5kAutomated safety check: PassApache-2.0
Ksafeioannisa/KSafe332—~17kAutomated safety check: PassApache-2.0
Composewebview Developmentparkwoocheol/compose-webview103—~1.3kAutomated safety check: PassMIT
Jetpack Compose and Multiplatform Expertrcosteira79/android-skills153—~2.6kAutomated safety check: PassMIT
Compose Multiplatformericrisco/rsc-harness174—~2.7kAutomated safety check: PassMIT
Jetpack Compose Expertaldefy/compose-skill596—~4.8kAutomated safety check: PassCustom licence

Similar skills

  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    332 GitHub stars~17k tokensUpdated 6 days ago
    MobileAuto-check passed
  • Composewebview Development

    parkwoocheol/compose-webview

    Builds, tests, and formats ComposeWebView multiplatform library.

    103 GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Guides writing correct, performant Compose and Compose Multiplatform UI across Android, desktop, iOS and web, from state and animation to design-to-code and crash fixes.

    153 GitHub stars~2.6k tokensUpdated 20 days ago
    MobileAuto-check passed
  • Compose Multiplatform

    ericrisco/rsc-harness

    A skill your agent uses when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform…

    174 GitHub stars~2.7k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Jetpack Compose Expert

    aldefy/compose-skill

    Guides Jetpack Compose and Compose Multiplatform work across Android, Desktop, iOS and web, plus Android TV, Material 3 motion, paging, navigation and design-to-code.

    596 GitHub stars~4.8k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed

More from CosminMihuMDC/KtorMonitor

  • Update Libs Versions

    CosminMihuMDC/KtorMonitor

    Update dependency versions in gradle/libs.versions.toml by querying Maven repositories.

    254 GitHub stars~800 tokensUpdated 26 days ago
    Auto-check passed

Categories

Questions about Ktormonitor

What does Ktormonitor do?

KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring. Ktormonitor is an agent skill from CosminMihuMDC/KtorMonitor. KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

When should I use Ktormonitor?

Ktormonitor fits situations like: A developer needs to integrate; troubleshoot HTTP monitoring in a Kotlin; android project.

How do I install Ktormonitor in Claude Code?

Run `npx skills add CosminMihuMDC/KtorMonitor --skill ktormonitor -a claude-code`. Or copy the skill folder (.agents/skills/ktormonitor in CosminMihuMDC/KtorMonitor) into .claude/skills/ktormonitor in your project. Claude Code loads it when a task matches its description.

How do I install Ktormonitor in Codex?

Run `npx skills add CosminMihuMDC/KtorMonitor --skill ktormonitor -a codex`. Or copy the skill folder (.agents/skills/ktormonitor in CosminMihuMDC/KtorMonitor) into .agents/skills/ktormonitor in your project. Codex loads it when a task matches its description.

Can I use Ktormonitor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CosminMihuMDC/KtorMonitor --skill ktormonitor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ktormonitor, .gemini/skills/ktormonitor, .github/skills/ktormonitor and .opencode/skills/ktormonitor in your project.

What does Ktormonitor need to run?

SKILL.md names no scripts, command-line tools or credentials: Ktormonitor is instructions for the agent only.

Does Ktormonitor access the network?

SKILL.md names 5 domains. As links in the text: cosminmihumdc.github.io, search.maven.org, kotlinlang.slack.com, klibs.io and context7.com. This is read from the text; nothing was executed.

Is Ktormonitor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ktormonitor use?

Ktormonitor is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ktormonitor use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ktormonitor?

Skills that share tags, products or a category with Ktormonitor: Ksafe (ioannisa/KSafe, 332 stars), Composewebview Development (parkwoocheol/compose-webview, 103 stars), Jetpack Compose and Multiplatform Expert (rcosteira79/android-skills, 153 stars) and Compose Multiplatform (ericrisco/rsc-harness, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ktormonitor?

CosminMihuMDC (a GitHub user) maintains it in CosminMihuMDC/KtorMonitor, which has 254 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 13, 2026.

Source: CosminMihuMDC/KtorMonitor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.