mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
Merge pull request #17 from Lum1104/fix/opencode-plugin-discovery
fix: OpenCode plugin not discovering skills
This commit is contained in:
@@ -32,6 +32,30 @@ Or just ask: "Analyze this codebase and build a knowledge graph"
|
||||
|
||||
Restart OpenCode — the plugin re-installs from git automatically.
|
||||
|
||||
To pin a specific version:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugin": ["understand-anything@git+https://github.com/Lum1104/Understand-Anything.git#v1.1.1"]
|
||||
}
|
||||
```
|
||||
|
||||
## Uninstalling
|
||||
|
||||
Remove the plugin line from `opencode.json` and restart.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Skills not found
|
||||
|
||||
1. Verify the plugin line in your `opencode.json`
|
||||
2. Check that `~/.cache/opencode/node_modules/understand-anything` exists after restart
|
||||
3. Use the `skill` tool to list discovered skills
|
||||
|
||||
### Tool mapping
|
||||
|
||||
When skills reference Claude Code tools:
|
||||
- `TodoWrite` → `todowrite`
|
||||
- `Task` with subagents → `@mention` syntax
|
||||
- `Skill` tool → OpenCode's native `skill` tool
|
||||
- File operations → your native tools
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Understand Anything plugin for OpenCode.ai
|
||||
*
|
||||
* Auto-registers the skills directory so OpenCode discovers all
|
||||
* understand-anything skills without manual symlinks or config edits.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export const UnderstandAnythingPlugin = async ({ client, directory }) => {
|
||||
const skillsDir = path.resolve(__dirname, '../../understand-anything-plugin/skills');
|
||||
|
||||
return {
|
||||
config: async (config) => {
|
||||
config.skills = config.skills || {};
|
||||
config.skills.paths = config.skills.paths || [];
|
||||
if (!config.skills.paths.includes(skillsDir)) {
|
||||
config.skills.paths.push(skillsDir);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "understand-anything",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": ".opencode/plugins/understand-anything.js",
|
||||
"packageManager": "pnpm@10.6.2+sha512.47870716bea1572b53df34ad8647b42962bc790ce2bf4562ba0f643237d7302a3d6a8ecef9e4bdfc01d23af1969aa90485d4cebb0b9638fa5ef1daef656f6c1b",
|
||||
"scripts": {
|
||||
"prepare": "pnpm --filter @understand-anything/core build",
|
||||
|
||||
Reference in New Issue
Block a user