astrbot-plugin-dev

AstrBot 插件开发技能,为 OpenCode 提供 AstrBot 插件开发的常见模式、最佳实践和避坑指南。

功能

  • 项目结构规范metadata.yaml、_conf_schema.json、requirements.txt
  • 四个核心避坑:star 装饰器兼容性、async generator 委托、缺失 repo 字段、同步 HTTP 库
  • 消息处理速查(过滤器、指令、发送、事件钩子)
  • AI 调用模式LLM、Agent、Tool 定义)
  • 存储与调试

安装

添加至 opencode.json

{
  "plugin": [
    "astrbot-plugin-dev@git+https://git.rainycy.top/rainysy/astrbot-plugin-dev.git"
  ]
}

重启 OpenCode 后自动加载,可通过 skill 工具查看已注册技能。

结构

├── package.json
├── .opencode/plugins/astrbot-plugin-dev.js
└── skills/astrbot-plugin-development/
    └── SKILL.md
Description
AstrBot plugin development skill for OpenCode
Readme 27 KiB
Languages
JavaScript 100%