跳到正文
cccskills
免费在 GitHub 公开

kta-unit-test

Smart Kotlin unit testing with auto-detection, coverage analysis, and AI edge cases. Use when generating tests for biz/ layer classes, analyzing test coverage gaps, or discovering edge cases.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(5)

  • SKILL.md1.6 KB
  • references/edge-case-discovery.md2.0 KB
  • references/test-patterns.md2.2 KB
  • scripts/__pycache__/analyze_kotlin.cpython-314.pyc13.1 KB
  • scripts/analyze_kotlin.py9.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Kotlin Unit Test

Project-specific skill for intelligent Kotlin unit testing.

When to Use

  • Generating tests for business logic classes (biz/ layer)
  • Analyzing test coverage gaps
  • Discovering edge cases for existing code
  • Before writing new tests to understand what's missing

Workflow

  1. Analyze class: python scripts/analyze_kotlin.py units <file.kt>
  2. Check coverage: python scripts/analyze_kotlin.py coverage <source_dir> <test_dir>
  3. Discover edge cases: Load references/edge-case-discovery.md
  4. Write tests: Follow patterns in references/test-patterns.md

Script Commands

# Analyze single file - extract testable units
python scripts/analyze_kotlin.py units app/src/main/.../SomeClass.kt

# Analyze coverage gaps between source and test directories
python scripts/analyze_kotlin.py coverage app/src/main/java/.../biz app/src/test/java/.../biz

Output Format

JSON structured output for parsing:

{
  "class_name": "SomeClass",
  "methods": [...],
  "dependencies": [...],
  "coverage": {"tested": [], "missing": []}
}

References

FilePurpose
references/test-patterns.mdJUnit4 + MockK + Turbine patterns
references/edge-case-discovery.mdAI prompts for finding edge cases

Integration

Works with .claude/agents/unit-test-agent.md for test generation workflow.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Senior Kotlin specialist code review — framework-agnostic. Use whenever the user asks to review, audit, critique, or get feedback on Kotlin code, a file, a class, a function, a module, a diff, a branch, a commit, or a pull request. Judges Kotlin language idioms, logic correctness, architecture and layering, concurrency (coroutines, Flow, structured concurrency, cancellation, race conditions), null safety, exception safety, testability, performance, and security. Detects force-unwraps, unchecked casts, GlobalScope, leaked mutability, broken structured concurrency, hidden side effects, weak abstractions, untestable seams, allocation hot spots, weak crypto, input-validation gaps, and PII logging. Outputs prioritized findings with file:line anchors and minimal-diff fixes. No assumptions about DI framework, UI framework, or build system.

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

Create Kotlin Compose design tokens from one of three supported sources — Google Stitch (MCP), Figma (MCP or JSON), or Claude Design (kta-design-spec output, Claude HTML/markdown artifacts). Three-layer architecture (Primitive/Semantic/Component) with code generation. Use when user asks to "generate design tokens", "create theme from Figma/Stitch/Claude design", "build Compose tokens from design spec", or "convert design source to tokens". Refuses any other input source and asks user for correct seed data.

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

Create Kotlin Compose design tokens from one of three supported sources — Google Stitch (MCP), Figma (MCP or JSON), or Codex Design (kta-design-spec output, Codex HTML/markdown artifacts). Three-layer architecture (Primitive/Semantic/Component) with code generation. Use when user asks to "generate design tokens", "create theme from Figma/Stitch/Codex design", "build Compose tokens from design spec", or "convert design source to tokens". Refuses any other input source and asks user for correct seed data.

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

Optimize a single Jetpack Compose @Composable function. Use when the user wants to improve, polish, animate, or refactor ONE Composable — keywords like "optimize this composable", "make this smoother", "add animation to this", "split this composable", "fix recomposition", "this composable is laggy", "polish this UI", or when user pastes/points to a single @Composable function. Analyzes the target for recomposition issues, missing animations, size/concern splits, and stability problems, then iterates with the user via AskUserQuestion to pick which optimizations to apply, then delegates implementation to the kta-compose-developer agent and summarizes changes. Input MUST be exactly one Composable (file path + function name, or function name alone).

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

Per-screen design spec generator for AI design tools (Stitch / Figma AI / Claude artifacts). Consumes per-feature PRDs from kta-prd-pipeline. Emits tool-agnostic markdown specs. Triggers — design spec, AI design prompt, screen mockup brief, Figma AI input, Stitch prompt, design system tokens, post-PRD design phase, generate design specs, design brief, mockup spec. DOES NOT generate Compose code, Kotlin code, or @Preview stubs.

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

Per-screen design spec generator for AI design tools (Stitch / Figma AI / Codex artifacts). Consumes per-feature PRDs from kta-prd-pipeline. Emits tool-agnostic markdown specs. Triggers — design spec, AI design prompt, screen mockup brief, Figma AI input, Stitch prompt, design system tokens, post-PRD design phase, generate design specs, design brief, mockup spec. DOES NOT generate Compose code, Kotlin code, or @Preview stubs.

中文简介正在准备中。当前显示原文说明。

dantech0xff/dreams62026年9月21日 更新

查看 dantech0xff 的全部技能

报告此技能的问题