Skip to content
Back to skills

Plugin System

ASecurity

Generic plugin system for Python applications. Auto-discovery, validation, fault tolerance. Zero dependencies (Python stdlib only).

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 4, 2026
ai-agentspythongogit

Works with

  • cli

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add ellmos-ai/skills --skill plugin-system --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Plugin System?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Plugin System
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ellmos-ai-plugin-system/badge)](https://www.skillsdirectory.com/skills/ellmos-ai-plugin-system)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: plugin-system
version: 1.0.0
type: tool
author: BACH Team
created: 2026-02-21
updated: 2026-03-12
description: Generic plugin system for Python applications. Auto-discovery, validation, fault tolerance. Zero dependencies (Python stdlib only).

standalone: true
anthropic_compatible: true
bach_compatible: true
bach_origin: true
category: dev
tags: [plugin, framework, extensibility, cli, architecture]
language: de
status: active
visibility: public
dependencies: {'tools': [], 'services': [], 'protocols': [], 'python': []}
provenance: {'origin': 'bach', 'origin_path': 'MODULAR_AGENTS/plugins', 'origin_version': '1.0.0', 'origin_repo': 'github.com/ellmos-ai/bach', 'last_sync_from_origin': '2026-03-12', 'last_sync_to_origin': None, 'local_changes_since_sync': False}
---

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

# Plugin System

Fehlertolerantes Plugin-System fuer Python-CLI-Anwendungen.
Ein fehlerhaftes Plugin stoppt niemals den Rest der Anwendung.

## Kernfeatures

- **Auto-Discovery:** Findet Plugins automatisch in einem Verzeichnis
- **Validierung:** Prueft `name`, `version`, `execute()` auf jeder Plugin-Klasse
- **Fehlertoleranz:** Defekte Plugins werden geloggt aber nicht geladen
- **Zero Dependencies:** Nur Python-Standardbibliothek

## Dateien

```
scripts/
  plugin_system.py       Kern: PluginBase (ABC) + PluginManager
  cli_demo.py            Demo-CLI mit argparse
  test_plugin_system.py  16+ Unit-Tests
examples/
  hello.py               Hello-World Plugin
  calculator.py          Rechner-Plugin
  systeminfo.py          System-Info Plugin
```

## Schnellstart

### 1. Plugin erstellen

```python
from plugin_system import PluginBase

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

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

### 2. PluginManager nutzen

```python
from plugin_system import PluginManager

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

# Alle Plugins auflisten
manager.list_plugins()

# Plugin ausfuehren
success, result = manager.execute_plugin("MeinPlugin", param="wert")
if success:
    print(result)
```

### 3. In eigene App integrieren

```python
class MeineApp:
    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
```

## Plugin-Interface

Jedes Plugin muss:

| Anforderung | Details |
|-------------|---------|
| `PluginBase` erben | `from plugin_system import PluginBase` |
| `name` setzen | Klassenattribut, nicht leer |
| `version` setzen | Klassenattribut, Semantic Versioning |
| `execute()` implementieren | Beliebige `*args, **kwargs` |

## Fehlertoleranz

| Fehlertyp | Verhalten |
|-----------|-----------|
| SyntaxError im Plugin | Plugin wird uebersprungen, Rest laedt |
| Fehlende Attribute | Plugin wird als `is_valid=False` markiert |
| Exception in `execute()` | Gibt `(False, error_message)` zurueck |
| Kein Plugin im Verzeichnis | Leere Liste, kein Crash |

## Changelog

### 1.0.0 (2026-03-12)
- Migration aus MODULAR_AGENTS/plugins in Skillbibliothek
- PluginBase ABC + PluginManager
- 3 Beispiel-Plugins (Hello, Calculator, SystemInfo)
- 16+ Unit-Tests
- CLI-Demo mit argparse

Files in this skill

  • EN/SKILL.md3.4 KB
  • ES/SKILL.md3.6 KB
  • JA/SKILL.md4 KB
  • RU/SKILL.md4.5 KB
  • SKILL.en.md3.4 KB
  • SKILL.es.md3.7 KB
  • SKILL.fr.md3.5 KB
  • SKILL.ja.md4.1 KB
  • SKILL.md3.4 KB
  • SKILL.ru.md4.8 KB
  • SKILL.zh.md3.5 KB
  • ZH/SKILL.md3.3 KB
  • examples/calculator.py1.2 KB
  • examples/hello.py455 B
  • examples/systeminfo.py899 B
  • scripts/cli_demo.py3.9 KB
  • scripts/plugin_system.py8.8 KB
  • scripts/test_plugin_system.py8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…