From 09f5d6678fb11c3670c3dcee5ea6447532d24221 Mon Sep 17 00:00:00 2001 From: RainySY Date: Thu, 14 May 2026 15:20:34 +0800 Subject: [PATCH] docs: add README --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab31eb1 --- /dev/null +++ b/README.md @@ -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 +```