Логотип Module Component Generator

Module Component Generator

Сообщество
ArabelaTso
module-component-generator

Generates complete modules and components from interface contracts and specifications. Use when Claude needs to build larger software components, implement interfaces, create service layers, or generate complete modules with multiple related classes. Supports Python (with type hints and protocols) and Java (with interfaces and abstract classes). Trigger when users request "implement this interface", "generate a module for", "create a service layer", "build a component that implements", or provide interface definitions that need implementation.

Обзор

ИздательArabelaTso
РепозиторийSkills-4-SE
Название навыкаmodule-component-generator
Звёзды
258
Форки
25
Встроенные файлы
3
ЛицензияApache-2.0
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 3

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: ArabelaTso. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Module Component Generator в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/module-component-generator
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git /tmp/Skills-4-SE
mkdir -p .claude/skills
cp -r /tmp/Skills-4-SE/skills/module-component-generator .claude/skills/module-component-generator
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Module Component Generator в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Module Component Generator, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Module Component Generator не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Module/Component Generator

Generate complete, production-ready modules and components from interface contracts and specifications.

Quick Start

When a user provides an interface contract or requests a module:

  1. Understand the contract: Analyze the interface, abstract class, or specification
  2. Determine scope: Clarify if generating single implementation or full module
  3. Select patterns: Choose appropriate design patterns and structure
  4. Generate code: Create implementation with proper structure and documentation
  5. Add documentation: Include comprehensive docstrings and usage examples

What This Skill Generates

Interface Implementations

Generate concrete implementations from:

  • Python Protocols and Abstract Base Classes
  • Java interfaces and abstract classes
  • Complete with validation, error handling, and documentation

Complete Modules

Generate multi-file modules with:

  • Domain models
  • Repository/data access layer
  • Service/business logic layer
  • Custom exceptions
  • Comprehensive documentation

Documentation

Generate for all code:

  • Module-level documentation
  • Class and method docstrings
  • Usage examples
  • API reference documentation

Generation Scope

Single Interface Implementation

When to use:

  • User provides a single interface/protocol/abstract class
  • Need one concrete implementation
  • Simple, focused functionality

What to generate:

  • Implementation class with all required methods
  • Input validation
  • Error handling
  • Docstrings with examples
  • Basic usage example

Full Module Generation

When to use:

  • Building a complete feature or service
  • Need multiple related classes
  • Require layered architecture (model, repository, service)

What to generate:

  • Domain models with validation
  • Repository layer for data access
  • Service layer for business logic
  • Custom exception hierarchy
  • Module-level documentation
  • Complete usage examples

Language-Specific Guidance

Python

Patterns and conventions:

  • Use type hints for all parameters and returns
  • Use Protocol for structural typing
  • Use ABC for inheritance-based contracts
  • Follow PEP 8 style guidelines
  • Use dataclasses or Pydantic for models

See: python-patterns.md for detailed examples

Common structures:

  • Protocol implementation
  • ABC implementation
  • Service layer module (model + repository + service)
  • Adapter pattern module
  • Factory pattern module

Java

Patterns and conventions:

  • Implement interfaces explicitly
  • Use Objects.requireNonNull() for validation
  • Use Optional<T> for nullable returns
  • Follow Java naming conventions
  • Use proper exception hierarchy

See: java-patterns.md for detailed examples

Common structures:

  • Interface implementation
  • Abstract class extension
  • Service layer module (model + repository + service)
  • Strategy pattern module
  • Builder pattern module

Workflow

1. Analyze the Contract

For interfaces/protocols:

  • Identify all methods that need implementation
  • Note parameter types and return types
  • Check for any constraints or requirements
  • Understand the intended behavior

For module requests:

  • Identify core entities/models
  • Determine required operations (CRUD, business logic)
  • Understand relationships between components
  • Clarify persistence requirements

2. Determine Structure

Single implementation:

  • One class implementing the interface
  • Helper methods if needed
  • Validation and error handling

Full module:

  • Domain models (data structures)
  • Repository layer (data access)
  • Service layer (business logic)
  • Exception classes (error handling)
  • Module initialization

3. Generate Implementation

For each class:

  1. Write class declaration with proper inheritance
  2. Implement constructor with dependency injection
  3. Implement all required methods
  4. Add validation and error handling
  5. Add helper methods if needed
  6. Write comprehensive docstrings

Code quality standards:

  • Validate all inputs
  • Handle edge cases
  • Use meaningful variable names
  • Follow language conventions
  • Keep methods focused and small

4. Add Documentation

Module level:

Class level:

  • Purpose and responsibility
  • Constructor parameters
  • Key methods overview
  • Usage examples

Method level:

  • What the method does
  • Parameters and types
  • Return value and type
  • Exceptions that can be raised
  • Usage example for complex methods

5. Provide Usage Examples

Include:

  • Basic usage example
  • Common use cases
  • Error handling examples
  • Integration examples for modules

Design Patterns

Repository Pattern

Separate data access from business logic.

Structure:

  • Model: Domain entity
  • Repository: Data access interface and implementation
  • Service: Business logic using repository

Use when: Need to abstract data persistence

Service Layer Pattern

Encapsulate business logic in service classes.

Structure:

  • Models: Domain entities
  • Services: Business operations
  • Exceptions: Domain-specific errors

Use when: Building business logic layer

Adapter Pattern

Provide unified interface to different implementations.

Structure:

  • Interface: Common contract
  • Adapters: Implementation for each variant
  • Factory: Create appropriate adapter

Use when: Need to support multiple backends/providers

Strategy Pattern

Encapsulate algorithms/behaviors as interchangeable strategies.

Structure:

  • Strategy interface: Common contract
  • Concrete strategies: Different implementations
  • Context: Uses strategy

Use when: Need runtime algorithm selection

Best Practices

Code Quality

Validation:

  • Validate all inputs at public API boundaries
  • Use type hints/annotations
  • Fail fast with clear error messages
  • Check for null/None values

Error Handling:

  • Create custom exception hierarchy
  • Use specific exception types
  • Provide meaningful error messages
  • Document exceptions in docstrings

Dependency Injection:

  • Accept dependencies through constructor
  • Use interfaces/protocols for dependencies
  • Make dependencies explicit
  • Facilitate testing with mocks

Documentation

Completeness:

  • Document all public classes and methods
  • Include parameter descriptions
  • Document return values
  • List possible exceptions

Examples:

  • Provide usage examples in docstrings
  • Show common use cases
  • Include error handling examples
  • Demonstrate integration patterns

Clarity:

  • Use clear, concise language
  • Explain the "why" not just the "what"
  • Include type information
  • Cross-reference related components

Structure

Organization:

  • Group related classes in modules/packages
  • Separate concerns (model, repository, service)
  • Use clear naming conventions
  • Keep files focused and cohesive

Modularity:

  • Keep classes focused on single responsibility
  • Use composition over inheritance
  • Minimize coupling between components
  • Design for testability

Example Usage Patterns

User: "Implement this DataRepository interface" → Generate single implementation class with all methods

User: "Create a user service module with CRUD operations" → Generate full module: User model, UserRepository, UserService, exceptions

User: "Build a notification system that supports email and SMS" → Generate adapter pattern: NotificationAdapter interface, EmailAdapter, SMSAdapter, factory

User: "Implement this PaymentProcessor abstract class for Stripe" → Generate StripePaymentProcessor extending abstract class

User: "Generate a complete order management module" → Generate full module: Order model, OrderRepository, OrderService, custom exceptions, documentation

User: "Create implementations for these three interfaces" → Generate three implementation classes, each with proper structure

Quality Checklist

Before delivering generated code, verify:

  • All interface methods implemented
  • Input validation present
  • Error handling included
  • Type hints/annotations added
  • Docstrings complete
  • Usage examples provided
  • Follows language conventions
  • Dependencies properly injected
  • Custom exceptions defined
  • Module documentation included

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Module Component Generator?

Generates complete modules and components from interface contracts and specifications. Use when Claude needs to build larger software components, implement interfaces, create service layers, or generate complete modules with multiple related classes. Supports Python (with type hints and protocols) and Java (with interfaces and abstract classes). Trigger when users request "implement this interface", "generate a module for", "create a service layer", "build a component that implements", or provide interface definitions that need implementation.

Зачем использовать Module Component Generator в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Module Component Generator — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Module Component Generator в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/module-component-generator. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Module Component Generator?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Module Component Generator?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Module Component Generator: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Module Component Generator?

Да. Навык опубликован на GitHub автором ArabelaTso по лицензии Apache-2.0. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇