मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)8.3k · #12465

autobangumi-plugin

यह क्या करती है

यह स्किल AutoBangumi ऐप के लिए add-on plugins बनाने का मार्गदर्शन देती है, उसके Python toolkit का उपयोग करके। यह उन डेवलपर्स के लिए है जो नई download, सूचना, खोज या नाम बदलने की सुविधाएं जोड़ना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप AutoBangumi में नया downloader, notifier या search source जोड़ना चाहते हैं।
  • ✓जब आपको AutoBangumi के लिए अपना खास rename template चाहिए।
  • ✓जब plugin इंस्टॉल होने से पहले उसका टेस्ट, validation या पैकिंग करनी हो।

Skill का लिंक

https://github.com/EstrellaXD/Auto_Bangumi/blob/main/skills/autobangumi-plugin/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/EstrellaXD/Auto_Bangumi/blob/main/skills/autobangumi-plugin/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“AutoBangumi का एक plugin लिखने में मदद कीजिए जो नया एपिसोड डाउनलोड होने पर सूचना भेजे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट टेम्पलेट से plugin पैकेज बनाता है, plugin कोड लिखता है, टेस्ट चलाता है, फिर validate और pack करता है। हर plugin ऐप के एक खास बिंदु को बढ़ाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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

  1. Pick the extension point (table below). If unsure, read references/extension-points.md.
  2. Scaffold: ab-plugin new <id> --kind rename|notifier|search (ids: lowercase, digits, hyphens; core and local are reserved). For other points, copy the closest example from examples/plugins/ in the AB repo.
  3. Write the plugin: one Plugin[Options] subclass, config_model = Options, decorated methods.
  4. Test first: uv run pytest. Provider points have contract suites in ab_sdk.testing (subclass, implement create()). Other behavior: create_plugin(Cls, options) plus asyncio.run.
  5. ab-plugin validate . then ab-plugin dev . (links into config/plugins/local/, enables hot reload; restart AB once) then ab-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, ...); return None for "no change". A wrong return type counts as a failure.
  • Five consecutive failures trip the circuit breaker and disable the plugin. RenameSkipped is not a failure. Never fall back to another naming method after a failure.
  • Filter hooks fail open (a crash accepts the torrent). Notifier send returns False on a backend refusal; it does not raise.
  • Events: plugin event kind must start with <plugin-id>.. Subclass SystemEvent to make a notifiable event. torrent.organized is delivered at least once: make handlers idempotent. Event paths are downloader-side paths; map them to local paths before touchi
अक्सर पूछे जाने वाले सवाल

क्या मुझे Python जानना होगा?

हाँ। plugins Python पैकेज हैं, इसलिए कुछ Python ज्ञान मदद करता है।

plugin कहां टेस्ट करूं?

स्किल पहले टेस्ट चलाती है, फिर विकास के दौरान hot reload के लिए plugin को ऐप से जोड़ती है।

यह किस SDK वर्शन का उपयोग करती है?

यह SDK को 0.5 से ऊपर और 1.0 से पहले के दायरे में रखती है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
8.3k
रैंकिंग में स्थान
#12465
लाइसेंस
MIT
अपडेट की गई
26/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

मिलती-जुलती skills