Files
astrbot-plugin-dev/README.md
2026-05-14 15:20:34 +08:00

35 lines
887 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# astrbot-plugin-dev
AstrBot 插件开发技能,为 OpenCode 提供 AstrBot 插件开发的常见模式、最佳实践和避坑指南。
## 功能
- 项目结构规范metadata.yaml、_conf_schema.json、requirements.txt
- 四个核心避坑:`star` 装饰器兼容性、async generator 委托、缺失 `repo` 字段、同步 HTTP 库
- 消息处理速查(过滤器、指令、发送、事件钩子)
- AI 调用模式LLM、Agent、Tool 定义)
- 存储与调试
## 安装
添加至 `opencode.json`
```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
```