← 返回 Skills 市场
ivangdavila

Kotlin

作者 Iván · GitHub ↗ · v1.0.1
linuxdarwinwin32 ✓ 安全检测通过
1615
总下载
2
收藏
13
当前安装
2
版本数
在 OpenClaw 中安装
/install kotlin
功能描述
Build robust Android and multiplatform apps with Kotlin idioms, coroutines, and null safety.
使用说明 (SKILL.md)

Quick Reference

Topic File
Null safety operators and patterns nullsafety.md
Coroutines, flows, structured concurrency coroutines.md
Collections, sequences, data classes collections.md
Scope functions, extensions, sealed classes idioms.md
Java interop and common Kotlin mistakes interop.md
Android lifecycle, Compose state android.md
Delegation, inline, reified, multiplatform advanced.md

Critical Rules

Null Safety

  • !! asserts non-null — crashes on null, use only when you've already checked
  • Platform types from Java are risky — add null checks or use @Nullable/@NonNull annotations
  • Elvis with return/throw for early exit — val name = user?.name ?: return

Coroutines

  • viewModelScope auto-cancels on ViewModel clear — don't use GlobalScope in Android
  • Structured concurrency: child coroutine failure cancels parent — use supervisorScope to isolate
  • StateFlow needs initial value and never completes — SharedFlow for one-shot events
  • Inject dispatchers for testability — don't hardcode Dispatchers.IO

Collections & Data Classes

  • first() throws on empty — use firstOrNull() for safe access
  • Only constructor properties in equals/hashCode — body properties ignored
  • mutableStateListOf for Compose — wrapping mutableListOf in state won't track changes

Scope Functions & Extensions

  • Don't nest scope functions — readability drops fast, extract to named functions
  • Extensions are resolved statically — not polymorphic, receiver type matters at compile time

Android/Compose

  • repeatOnLifecycle(STARTED) for flow collection — launchWhenStarted is deprecated
  • remember survives recomposition only — use rememberSaveable for config changes
  • collectAsStateWithLifecycle is the gold standard — lifecycle-aware + Compose state

Java Interop

  • == is structural equality in Kotlin — === for reference, opposite of Java
  • SAM conversion only for Java interfaces — Kotlin interfaces need explicit fun interface
  • @JvmStatic, @JvmOverloads, @JvmField for Java-friendly APIs
安全使用建议
This skill is a documentation-only Kotlin reference and appears internally consistent and low-risk. It does declare the 'kotlin' binary as a requirement — if you allow the agent to run tools, it could invoke that local binary to compile or run examples, so ensure you only enable the skill in environments where running user-provided code is acceptable. If you want extra caution: review the included .md files (they are plain text docs), and run the agent in a sandboxed environment or with restricted tool access before granting broader permissions.
功能分析
Type: OpenClaw Skill Name: kotlin Version: 1.0.1 The skill bundle consists entirely of markdown documentation files providing a quick reference and critical rules for Kotlin development. There are no executable scripts, no external network calls, no file system operations, and no instructions for the AI agent to perform any actions beyond displaying or referencing this information. No prompt injection attempts or malicious code patterns were found in any of the files.
能力评估
Purpose & Capability
Name/description (Kotlin learning/reference) match the manifest and files. The only declared runtime requirement is the 'kotlin' binary, which is reasonable for a Kotlin-focused skill that may compile or run examples.
Instruction Scope
SKILL.md and the included .md files are documentation and coding guidance; they do not instruct the agent to read unrelated files, access external endpoints, or exfiltrate data. No vague instructions granting broad discretion are present.
Install Mechanism
No install specification or downloaded code is present — the skill is instruction-only, so nothing will be written to disk by the install process.
Credentials
The skill requests no environment variables, secrets, or config paths. The absence of credentials is proportionate to an educational/reference skill.
Persistence & Privilege
Flags show no persistent/always-true behavior and model invocation is standard. The skill does not request to modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kotlin
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kotlin 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
Slug kotlin
版本 1.0.1
许可证
累计安装 13
当前安装数 13
历史版本数 2
常见问题

Kotlin 是什么?

Build robust Android and multiplatform apps with Kotlin idioms, coroutines, and null safety. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1615 次。

如何安装 Kotlin?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kotlin」即可一键安装,无需额外配置。

Kotlin 是免费的吗?

是的,Kotlin 完全免费(开源免费),可自由下载、安装和使用。

Kotlin 支持哪些平台?

Kotlin 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 Kotlin?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.1。

💬 留言讨论