autobangumi-plugin
O que ela faz
Esta skill orienta a construção de plugins complementares para o app AutoBangumi, usando o kit de ferramentas em Python dele. Ela serve para desenvolvedores que querem adicionar novos recursos de download, notificação, busca ou renomeação.
Quando usar
- ✓Quando você quer adicionar um novo downloader, notificador ou fonte de busca ao AutoBangumi.
- ✓Quando você quer um modelo de renomeação personalizado para o AutoBangumi.
- ✓Quando um plugin precisa ser testado, validado ou empacotado antes de ser instalado.
Link da skill
https://github.com/EstrellaXD/Auto_Bangumi/blob/main/skills/autobangumi-plugin/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Me ajude a escrever um plugin para o AutoBangumi que envie uma notificação quando um novo episódio for baixado.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente cria um pacote de plugin a partir de um modelo, escreve o código do plugin, executa os testes e depois valida e empacota o resultado. Cada plugin estende um ponto específico do app.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Preciso saber Python?
Sim. Os plugins são pacotes em Python, então algum conhecimento da linguagem ajuda.
Onde devo testar um plugin?
A skill roda os testes primeiro e depois liga o plugin ao app para recarga a quente durante o desenvolvimento.
Qual versão do SDK ela usa?
Ela fixa o SDK em uma faixa de 0.5 até antes de 1.0, sem incluir a 1.0.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 8,3 mil
- Posição no ranking
- #12465
- Licença
- MIT
- Atualizada em
- 26/10/2026
Comentários
- …
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.