Skip to content
cccskills
FreePublished on GitHub

plugin-system

Универсальная система плагинов для приложений на Python. Автоматическое обнаружение, валидация, отказоустойчивость. Нулевые зависимости (только стандартная библиотека Python).

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md4.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

<img src="../banner.png" width="100%" alt="plugin-system banner">

Русский — Официальная русская версия plugin-system.

Система плагинов (Русский)

Отказоустойчивая система плагинов для CLI-приложений на Python. Неисправный плагин никогда не останавливает работу остальной части приложения.

Основные возможности

  • Автоматическое обнаружение: Автоматически находит плагины в директории
  • Валидация: Проверяет name, version, execute() у каждого класса плагина
  • Отказоустойчивость: Сбойные плагины логируются, но не загружаются
  • Нулевые зависимости: Только стандартная библиотека Python

Файлы

scripts/
  plugin_system.py       Core: PluginBase (ABC) + PluginManager
  cli_demo.py            Demo CLI with argparse
  test_plugin_system.py  16+ unit tests
examples/
  hello.py               Hello World plugin
  calculator.py          Calculator plugin
  systeminfo.py          System Info plugin

Быстрый старт

1. Создание плагина

from plugin_system import PluginBase

class MyPlugin(PluginBase):
    name = "MyPlugin"
    version = "1.0.0"

    def execute(self, *args, **kwargs):
        return {"status": "ok", "message": "Hello!"}

2. Использование PluginManager

from plugin_system import PluginManager

manager = PluginManager(plugins_dir="./my_plugins")
plugins = manager.discover_plugins()

# List all plugins (Deutsch)
manager.list_plugins()

# Execute a plugin (Deutsch)
success, result = manager.execute_plugin("MyPlugin", param="value")
if success:
    print(result)

3. Интеграция в ваше приложение

class MyApp:
    def __init__(self):
        self.plugins = PluginManager("./plugins")
        self.plugins.discover_plugins()

    def run_command(self, command, **params):
        success, result = self.plugins.execute_plugin(command, **params)
        return result if success else None

Интерфейс плагина

Каждый плагин должен:

ТребованиеДетали
Наследовать PluginBasefrom plugin_system import PluginBase
Задавать nameАтрибут класса, непустой
Задавать versionАтрибут класса, семантическое версионирование
Реализовывать execute()Произвольные *args, **kwargs

Отказоустойчивость

Тип ошибкиПоведение
SyntaxError в плагинеПлагин пропускается, остальные загружаются
Отсутствие атрибутовПлагин помечается как is_valid=False
Исключение в execute()Возвращает (False, error_message)
Нет плагинов в директорииПустой список, без сбоев

История изменений

1.0.0 (2026-03-12)

  • Миграция из MODULAR_AGENTS/plugins в библиотеку скиллов
  • PluginBase ABC + PluginManager
  • 3 примера плагинов (Hello, Calculator, SystemInfo)
  • 16+ юнит-тестов
  • CLI-демо с argparse

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Akademisches Studien- und Fristenmanagement mit Quellenprüfung, Datenschutz und realistischer Handlungsplanung.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

Aktives Lernen, Erarbeitung von Fachinhalten und strukturierte Erstellung von Synthesen.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

Prüfungsvorbereitung, Selbsttests, Probeklausuren und systematische Fehleranalyse.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

Терапия принятия и ответственности (ACT) Стивенса Хейса: модель Гексафлекс с шестью ключевыми процессами психологической гибкости.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

Acceptance & Commitment Therapy (ACT) nach Steven Hayes: Hexaflex-Modell mit den sechs Kernprozessen psychischer Flexibilität.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

Acceptance & Commitment Therapy (ACT) according to Steven Hayes: Hexaflex model with the six core processes of psychological flexibility.

The English summary is being prepared. Showing the original description.

ellmos-ai/skills8Updated Oct 23, 2026

See all skills by ellmos-ai

Report a problem with this skill