autobangumi-plugin
Was er macht
Dieser Skill führt durch das Bauen von Erweiterungs-Plugins für die App AutoBangumi mit ihrem Python-Werkzeugkasten. Er richtet sich an Entwickler, die neue Funktionen für Download, Benachrichtigung, Suche oder Umbenennung hinzufügen wollen.
Wann du ihn nutzt
- ✓Wenn du einen neuen Downloader, Benachrichtiger oder eine Suchquelle zu AutoBangumi hinzufügen willst.
- ✓Wenn du eine eigene Umbenennungsvorlage für AutoBangumi willst.
- ✓Wenn ein Plugin vor der Installation getestet, geprüft oder gepackt werden muss.
Link zum Skill
https://github.com/EstrellaXD/Auto_Bangumi/blob/main/skills/autobangumi-plugin/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hilf mir, ein AutoBangumi-Plugin zu schreiben, das eine Benachrichtigung sendet, wenn eine neue Folge heruntergeladen wurde.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent erstellt ein Plugin-Paket aus einer Vorlage, schreibt den Plugin-Code, führt Tests aus und prüft und packt es dann. Jedes Plugin erweitert genau eine bestimmte Stelle der App.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
AutoBangumi plugin authoring
AB plugins are Python packages (optional Web Component UI) that run inside the AB process. They import only ab_sdk, never module.*. SDK is 0.x during 4.0: pin sdk = ">=0.5,<1" in the manifest.
Workflow
- Pick the extension point (table below). If unsure, read
references/extension-points.md. - Scaffold:
ab-plugin new <id> --kind rename|notifier|search(ids: lowercase, digits, hyphens;coreandlocalare reserved). For other points, copy the closest example fromexamples/plugins/in the AB repo. - Write the plugin: one
Plugin[Options]subclass,config_model = Options, decorated methods. - Test first:
uv run pytest. Provider points have contract suites inab_sdk.testing(subclass, implementcreate()). Other behavior:create_plugin(Cls, options)plusasyncio.run. ab-plugin validate .thenab-plugin dev .(links intoconfig/plugins/local/, enables hot reload; restart AB once) thenab-plugin pack ..
Install the tooling from the GitHub release wheel (autobangumi_sdk-<ver>-py3-none-any.whl), not PyPI.
Skeleton
from pydantic import BaseModel, Field
from ab_sdk import Plugin, points, provider, hook, subscribe, secret_field
class Options(BaseModel):
url: str = Field("", title="URL") # title/description become the WebUI form labels
token: str = secret_field(title="Token") # password box; masked on read
class MyPlugin(Plugin[Options]):
config_model = Options # self.config is a validated Options
@provider(points.NOTIFIER, id="my-push") # Provider: the thing the user selects by id
def channel(self): ...
@hook(points.TORRENT_FILTER, priority=50) # Hook: runs in the AB pipeline
def check(self, torrent, release, bangumi): ...
@subscribe("torrent.organized", timeout=600) # Event subscriber ("*" = all events)
async def on_organized(self, event): ...
self.ctx: plugin_id, config, log, kv (async get/set/delete, JSON values), data_dir, bus (publish, subscribe).
Extension points
| Point constant | Kind | Returns / signature |
|---|---|---|
DOWNLOADER |
provider | DownloaderFactory: (DownloaderConnection) -> client with capabilities, auth, logout, add_torrents |
NOTIFIER |
provider | NotifierFactory: (NotifierSettings) -> Notifier (send -> bool, test -> (bool, str)) |
LLM_PROVIDER |
provider | LLMProviderAdapter subclass; id must equal info.id |
SEARCH_SITE |
provider | SearchSite(url_with_%s, parser="tmdb"|"mikan") |
SCHEDULED_TASK |
provider | ScheduledTask(run, interval, initial_delay, enabled) |
METADATA_PROVIDER |
provider | object with async enrich(MetadataRequest) -> Metadata | None |
RENAME_STRATEGY |
provider | object with target_name(RenameInput) -> str; raise RenameSkipped for bad input |
MEDIA_FILES |
provider | classify(path) -> "media"|"subtitle"|"ignore" |
CONFLICT_POLICY |
provider | decide(ConflictRequest) -> ConflictDecision("hold"|"replace", reason) |
API_ROUTER |
provider | fastapi.APIRouter, mounted at /api/v1/plugins/<id>/, login required |
MCP_TOOL / MCP_RESOURCE |
provider | McpTool / McpResource |
TORRENT_FILTER |
filter hook | (torrent, release, bangumi) -> Verdict |
TITLE_PARSED |
transform hook | (release) -> release | None |
TORRENT_ADDING |
transform hook | (AddRequest) -> AddRequest | None |
HTTP_REQUEST |
transform hook | (HttpRequest) -> HttpRequest | None (headers only) |
MESSAGE_TEMPLATE |
transform hook | (RenderedMessage, event, channel) -> RenderedMessage | None |
Details, imports and field lists: references/extension-points.md.
Rules that prevent most bugs
- Hooks get frozen snapshots. Return
dataclasses.replace(obj, ...); returnNonefor "no change". A wrong return type counts as a failure. - Five consecutive failures trip the circuit breaker and disable the plugin.
RenameSkippedis not a failure. Never fall back to another naming method after a failure. - Filter hooks fail open (a crash accepts the torrent). Notifier
sendreturnsFalseon a backend refusal; it does not raise. - Events: plugin event
kindmust start with<plugin-id>.. SubclassSystemEventto make a notifiable event.torrent.organizedis delivered at least once: make handlers idempotent. Event paths are downloader-side paths; map them to local paths before touchi
Häufige Fragen
Muss ich Python können?
Ja. Plugins sind Python-Pakete, daher hilft etwas Python-Wissen.
Wo sollte ich ein Plugin testen?
Der Skill führt zuerst Tests aus und bindet das Plugin dann für das Hot Reload während der Entwicklung in die App ein.
Welche SDK-Version nutzt er?
Er legt das SDK auf einen Bereich von 0.5 bis unter 1.0 fest.
Details
Originalbeschreibung des Autors
Write, test, pack and debug AutoBangumi (AB) 4.0 plugins with the ab_sdk Python SDK and the ab-plugin CLI. Use when the user asks to "write an AutoBangumi plugin", "add a downloader / notifier / search site / rename strategy / RSS site to AutoBangumi", "hook into AutoBangumi", mentions ab_sdk, ab-plugin, plugin.toml, @provider, @hook, @subscribe, secret_field, or wants a custom rename template, webhook on torrent.organized, nfo writer, private tracker Cookie, or a plugin web component for the AutoBangumi WebUI.
repo: EstrellaXD/Auto_Bangumi
Beliebtheit
- GitHub-Sterne
- 8.3k
- Platz im Ranking
- #12465
- Lizenz
- MIT
- Aktualisiert
- 26.10.2026
Kommentare
- …
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.