kotlin-power-assert

Transform Kotlin assertion functions to expose intermediate sub-expression values on test failures.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill kotlin-power-assert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-power-assert
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/kotlin-power-assert
Command: npx skills add https://github.com/trancee/MeshLink-template --skill kotlin-power-assert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the difficulty of debugging failed assertions by providing detailed, visual breakdowns of intermediate expression values, eliminating the need for manual logging or complex debugging sessions.

Core Features & Use Cases

  • Enhanced Diagnostics: Automatically transforms assertion calls to display the value of every sub-expression upon failure.
  • Flexible Configuration: Supports standard library functions like assert, require, and check, as well as custom assertion functions.
  • Library Author Support: Provides the @PowerAssert annotation and CallExplanation API to build rich, custom diagnostic messages for reusable assertion libraries.

Quick Start

Use the kotlin-power-assert skill to configure the compiler plugin in your Gradle build file and enable detailed failure reporting for your test suite.

Frequently Asked Questions about kotlin-power-assert

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

FAQPage Schema
How do I see intermediate values in Kotlin assertion failures?

You can see intermediate values in Kotlin assertion failures by applying the power-assert compiler plugin, which automatically transforms assertion calls to display a visual breakdown of every sub-expression value upon failure.

What is the best way to debug complex Kotlin test assertions without manual logging?

The best way to debug complex Kotlin test assertions without manual logging is using power-assert diagnostics, which automatically exposes intermediate sub-expression values during test failures to eliminate complex debugging sessions.

Can I configure custom assertion functions with the Kotlin power-assert plugin?

Yes, you can configure custom assertion functions with the Kotlin power-assert plugin. It supports standard library functions like assert, require, and check, alongside your own custom functions and source set scoping.

Does the power-assert compiler plugin support building reusable Kotlin assertion libraries?

Yes, the power-assert compiler plugin supports building reusable Kotlin assertion libraries by providing the @PowerAssert annotation and CallExplanation API to construct rich, custom diagnostic messages for library-level integration.

Do I need the Kotlin compiler plugin to enable power-assert diagnostics in my tests?

Yes, you need the Kotlin compiler plugin and its runtime dependencies to enable power-assert diagnostics. You configure this in your Gradle build file to activate automatic diagnostic rendering in test environments.