konsist-architecture-tests

konsist-architecture-tests is a skill for Claude Code from ShipWithAI/shipwithai-plugins. It costs 93 tokens per session (1,774 once invoked), scanned A, original, MIT.

A set of source-code tests for enforcing architecture rules in Kotlin and Kotlin Multiplatform projects.

In plain words
What is it for?
It is for checking rules such as keeping core code independent from features or preventing public code from exposing implementation modules, using Konsist to inspect source files.
Why use it?
It makes forbidden imports and module-boundary violations fail tests as soon as they are introduced.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the shipwithai-mobile-ui-harness plugin — 2 skills, 3 commands, 1 agent shipped together

Good fit It is for checking rules such as keeping core code independent from features or preventing public code from exposing implementation modules, using Konsist to inspect source files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shipwithai/shipwithai-plugins/konsist-architecture-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShipWithAI/shipwithai-plugins --skill konsist-architecture-tests
Clone the repo
git clone --depth 1 https://github.com/ShipWithAI/shipwithai-plugins

Made for: Claude Code.

Or install shipwithai-mobile-ui-harness, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for konsist-architecture-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests/github.svg)](https://agentmods.dev/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests)
Your own site
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for konsist-architecture-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/konsist-architecture-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,774 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.01774
Opus 5 $0.00046 $0.00887
Sonnet 5 $0.00019 $0.00355
Haiku 4.5 $0.00009 $0.00177

Measured 11d ago against content hash d05bb2712152, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

konsist-architecture-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/mobile-ui-harness/skills/konsist-architecture-tests/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Konsist architecture tests

Overview

Enforce module-boundary invariants as plain JVM unit tests with Konsist, which parses Kotlin source straight from disk. Each violation turns the suite red the moment a forbidding import is written — before review, before the dependency graph is even wired. The check is on imports (source-level), the right altitude: a stray dependencies {} edge can sit unnoticed, but the first illegal import that relies on it fails.

Why Konsist — not ArchUnit or Detekt

This is the non-obvious decision; get it right first.

  • ArchUnit reads compiled bytecode off a classpath. A pure commonMain / iosMain KMP module never hands a JVM test task its bytecode, so ArchUnit can't see that code at all. Konsist reads source, so it sees every source set.
  • Detekt wants a Gradle plugin per module; on com.android.kotlin.multiplatform.library (AGP 9) plugin-compat lags and KMP source-set wiring is awkward.
  • Konsist needs no plugin and no classpath: Konsist.scopeFromProject() walks the whole repo from a single host test — the same "rule as a host test" shape as other structural checks. One prevention mechanism, not two.

Where it lives + wiring

Put it in one JVM test source set that runs testDebugUnitTest — conventionally the app module (it already depends on everything, but Konsist scans the whole project from disk regardless of which module hosts the test):

app/src/test/kotlin/<base.package>/architecture/ArchitectureTest.kt

Add the dependency to that module: testImplementation(libs.konsist) (catalog: konsist = { module = "com.lemonappdev:konsist", version.ref = "konsist" }). Run just these rules:

./gradlew :app:testDebugUnitTest --tests "<base.package>.architecture.ArchitectureTest"

Survey the graph, then write one rule per edge

Read settings.gradle(.kts) and the module folders. For each intended dependency direction (core ← feature, api is a seam over impl, domain ↛ data, …), write one @Test. Don't invent rules the project doesn't hold.

Read the full file on GitHub · 135 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 135 lines · 93 tokens per session scan A d05bb2712152

Subscribe to this mod's changes

konsist-architecture-tests is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (10 stars, last pushed 28d ago), licensed MIT. It adds 93 tokens to every session and 1,774 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.