kotlin-development — скилл для Claude Code
Задаёт правила разработки на Kotlin: стандарты чистых функций, именования, неизменяемых моделей данных и модульных тестов.
npx skills add Mindrally/skills --skill kotlin-development -a claude-codeЧто делает kotlin-development
Скилл внедряет в ассистента набор соглашений по стилю и архитектуре на Kotlin. Он требует объявлять типы переменных и возвращаемых значений явно, избегать типа any и убирать пустые строки внутри тел методов. Имена классов пишутся в PascalCase, функций — в camelCase, а для файлов задан underscores_case.
Правила задают строгие рамки по размеру кода. Функции ограничены 20 инструкциями, а списки аргументов — 3–4 параметрами; сложные наборы аргументов скилл предписывает собирать в отдельные объекты. Классы не должны превышать 200 инструкций, 10 публичных методов и 10 свойств.
Такие жёсткие ограничения заставят делить крупные классы на компоненты и переходить на композицию вместо наследования. Для проверки логики скилл ориентирует агента на паттерн Arrange-Act-Assert в модульных тестах и Given-When-Then в приёмочных сценариях.
Какие задачи решает
- привести сигнатуры и тела функций Kotlin к лимиту в 20 инструкций
- настроить валидацию данных внутри data classes вместо разрозненных проверок
- оформить юнит-тесты по схеме Arrange-Act-Assert
- заменить вложенные ветвления ранними возвратами и функциями высшего порядка
Примеры запросов агенту
- Проверь этот Kotlin-класс на соответствие лимитам по числу методов и свойств
- Отрефактори функцию расчёта скидки, чтобы избавиться от глубокой вложенности
- Напиши юнит-тест для сервиса платежей по шаблону Arrange-Act-Assert
Как установить kotlin-development
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill kotlin-development -a claude-code2Вручную: положить файлы
~/.claude/skills/kotlin-development/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/kotlin-development/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill kotlin-development -a codex2Вручную: положить файлы
.agents/skills/kotlin-development/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill kotlin-development -a cursor2Вручную: положить файлы
.cursor/skills/kotlin-development/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills kotlin-development2Вручную: положить файлы
.github/skills/kotlin-development/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill kotlin-development -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path kotlin-developmentВручную: положить файлы
.devin/skills/kotlin-development/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill kotlin-development -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о kotlin-development
Как установить kotlin-development в Claude Code?
Выполните команду npx skills add Mindrally/skills --skill kotlin-development -a claude-code. Файл с инструкциями сохранится по пути ~/.claude/skills/kotlin-development/SKILL.md.
Что делает скилл kotlin-development?
Он инструктирует ИИ-ассистента писать код на Kotlin по стандартам чистой архитектуры: с неизменяемыми коллекциями, ограничениями на размер функций и строгими правилами именования.
Какие ограничения на размер кода задаёт этот скилл?
Функции ограничены 20 инструкциями и 4 параметрами, а классы не должны превышать 200 инструкций, 10 публичных методов и 10 свойств.
Исходный текст
SKILL.md · Apache-2.0
--- name: kotlin-development description: Kotlin development guidelines with best practices for clean code, naming conventions, function design, and data handling metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Kotlin Development Best Practices ## General Principles - Use English for all code and documentation - Always declare the type of each variable and function - Avoid the `any` type; create necessary types instead - No blank lines within function bodies ## Naming Conventions ### Case Standards - **PascalCase**: Classes, interfaces, enums - **camelCase**: Variables, functions, methods, parameters - **UPPERCASE**: Environment variables, constants - **underscores_case**: Files and directories ### Naming Guidelines - Start each function with a verb (get, set, create, update, delete, etc.) - Use complete words over abbreviations - Allowed abbreviations: API, URL, i/j for loops, err, ctx, req/res/next - Avoid magic numbers; define constants instead - Boolean variables use prefixes: `isLoading`, `hasError`, `canDelete` ## Function Design ### Size and Responsibility - Keep functions under 20 instructions - Each function should have a single responsibility - Extract logic into utility functions when complexity increases ### Naming Functions - Use verb-based naming that describes the action - Prefix boolean-returning functions with `is`, `has`, or `can` - Prefix void functions with action verbs like `execute`, `save`, `send` ### Reducing Nesting - Use early returns to handle edge cases first - Extract nested logic into separate functions - Employ higher-order functions (map, filter, reduce) to minimize loops - Prefer arrow functions for simple operations; use named functions otherwise ### Parameters - Use default parameters instead of null checks - When functions have multiple parameters, consolidate them into objects (RO-RO pattern) - Keep parameter lists short (max 3-4 parameters) ## Data Handling ### Data Classes - Use data classes for data structures - Encapsulate primitive types in composite types when they represent domain concepts - Validate data internally within data classes ### Immutability - Prefer immutability for data - Use `val` for variables that don't change - Use immutable collections when possible - Create new instances instead of mutating existing ones ## Classes and Objects ### Size Guidelines - Keep classes under 200 instructions - Limit to fewer than 10 public methods - Limit to fewer than 10 properties ### Design Principles - Follow SOLID principles - Favor composition over inheritance - Use interfaces for abstraction - Keep classes focused on a single responsibility ## Exception Handling ### When to Use Exceptions - Reserve exceptions for truly unexpected errors - Don't use exceptions for control flow - Catch exceptions only to: - Fix an anticipated issue - Add context before re-throwing ### Best Practices - Create custom exception types for domain-specific errors - Include meaningful error messages - Log exceptions at appropriate levels ## Testing ### Unit Tests - Follow Arrange-Act-Assert convention - Write unit tests for all public functions - Use test doubles (mocks, stubs, fakes) for dependencies - Name tests descriptively to document behavior ### Acceptance Tests - Follow Given-When-Then convention - Test user-facing behavior and scenarios - Keep tests independent and repeatable ## Code Organization - Group related functionality together - Keep files focused and cohesive - Use packages/modules to organize code by feature or layer - Maintain consistent file structure across the project
© Mindrally · Apache-2.0 · Mindrally/skills