docs: add README
This commit is contained in:
34
README.md
Normal file
34
README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# 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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user