chore(config): 更新日志配置并添加OpenCode技能和命令
- 将MyBatis日志实现从STDOUT更改为SLF4J - 调整开发环境日志级别从debug降级为info - 添加OpenCode命令配置文件包括快速开始、文件操作、插件和技能相关命令 - 创建OpenCode技能框架包含代理创建器、命令创建器、插件创建器和技能创建器 - 初始化OpenWork工作区配置文件 - 添加工作区引导和Chrome DevTools演示技能
This commit is contained in:
1
.opencode/skills/plugin-creator/.env.example
Normal file
1
.opencode/skills/plugin-creator/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
# No environment variables are required for this skill.
|
||||
8
.opencode/skills/plugin-creator/.skill.config
Normal file
8
.opencode/skills/plugin-creator/.skill.config
Normal file
@@ -0,0 +1,8 @@
|
||||
# Required credentials (if any)
|
||||
# - List the credential name
|
||||
# - Where to obtain it
|
||||
# - How to store it locally
|
||||
|
||||
# Example:
|
||||
# - GITHUB_TOKEN: https://github.com/settings/tokens
|
||||
# - Store in .env (gitignored)
|
||||
41
.opencode/skills/plugin-creator/SKILL.md
Normal file
41
.opencode/skills/plugin-creator/SKILL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: plugin-creator
|
||||
description: Create OpenCode plugins and know where to load them.
|
||||
---
|
||||
|
||||
## Quick Usage (Already Configured)
|
||||
|
||||
### Where plugins live
|
||||
- Project plugins: `.opencode/plugins/*.js` or `.opencode/plugins/*.ts`
|
||||
- Global plugins: `~/.config/opencode/plugins/*.js` or `.ts`
|
||||
|
||||
### Load from npm
|
||||
Add npm plugin packages in `opencode.json`:
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"plugin": ["opencode-helicone-session", "opencode-wakatime"]
|
||||
}
|
||||
```
|
||||
|
||||
## Minimal plugin template
|
||||
|
||||
```ts
|
||||
export const MyPlugin = async ({ project, client, $, directory, worktree }) => {
|
||||
return {
|
||||
// Hook implementations go here
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Notes from OpenCode docs
|
||||
|
||||
- Plugins are JS/TS modules exporting one or more plugin functions.
|
||||
- Local plugins are loaded directly from the plugin directory.
|
||||
- NPM plugins are installed via Bun at startup and cached in `~/.cache/opencode/node_modules/`.
|
||||
- Load order: global config → project config → global plugins → project plugins.
|
||||
|
||||
## Reference
|
||||
|
||||
Follow the official OpenCode plugin docs: https://opencode.ai/docs/plugins/
|
||||
Use the docs as the escape hatch when unsure.
|
||||
Reference in New Issue
Block a user