mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
c8d92444e2
Replace platform-specific install approaches with a consistent per-skill symlink pattern for OpenCode and Codex (both share ~/.agents/skills/), matching the OpenCode docs requirement of <name>/SKILL.md discovery. Changes: - OpenCode: migrate from opencode.json plugin config to direct skill symlinks in ~/.agents/skills/<name>/ - Codex: replace broken bundle symlink (understand-anything/ had no SKILL.md at root) with individual per-skill symlinks, matching OpenCode exactly - All platforms: add universal ~/.understand-anything-plugin symlink so understand-dashboard SKILL.md can reliably find packages/dashboard/ - All platforms: use idempotent [ -e ] || [ -L ] || ln -s guard to handle multi-platform installs on the same machine - All platforms: use ln -sf and rm -f for robust re-installs and partial uninstalls - understand-dashboard/SKILL.md: replace fragile dirname-based path resolution with a prioritized candidate loop with explicit error guard - Remove orphaned .opencode/plugins/understand-anything.js and its build scaffolding - Update all three README variants (en, zh-CN, ja-JP) to reflect new OpenCode AI-driven install method Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Installing Understand-Anything for OpenCode
Prerequisites
- Git
- OpenCode installed
Installation
-
Clone the repository:
git clone https://github.com/Lum1104/Understand-Anything.git ~/.opencode/understand-anything -
Create the skills symlinks:
mkdir -p ~/.agents/skills # Note: if Codex's Understand-Anything is already installed, these symlinks # already exist and the ln commands will safely fail — that is fine, the # existing symlinks work for OpenCode too. for skill in understand understand-chat understand-dashboard understand-diff understand-explain understand-onboard; do ln -sf ~/.opencode/understand-anything/understand-anything-plugin/skills/$skill ~/.agents/skills/$skill done # Universal plugin root symlink — lets the dashboard skill find packages/dashboard/ # Skip if already exists (e.g. another platform was installed first) [ -e ~/.understand-anything-plugin ] || [ -L ~/.understand-anything-plugin ] || ln -s ~/.opencode/understand-anything/understand-anything-plugin ~/.understand-anything-pluginWindows (PowerShell):
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills" $skills = @("understand","understand-chat","understand-dashboard","understand-diff","understand-explain","understand-onboard") foreach ($skill in $skills) { cmd /c mklink /J "$env:USERPROFILE\.agents\skills\$skill" "$env:USERPROFILE\.opencode\understand-anything\understand-anything-plugin\skills\$skill" } # Universal plugin root symlink cmd /c mklink /J "$env:USERPROFILE\.understand-anything-plugin" "$env:USERPROFILE\.opencode\understand-anything\understand-anything-plugin" -
Restart OpenCode to discover the skills.
Verify
ls -la ~/.agents/skills/ | grep understand
You should see symlinks for each skill pointing into the cloned repository.
Usage
Skills activate automatically when relevant. You can also invoke directly:
use skill tool to load understand
Or just ask: "Analyze this codebase and build a knowledge graph"
Updating
cd ~/.opencode/understand-anything && git pull
Skills update instantly through the symlinks.
Uninstalling
for skill in understand understand-chat understand-dashboard understand-diff understand-explain understand-onboard; do
rm -f ~/.agents/skills/$skill
done
rm ~/.understand-anything-plugin
rm -rf ~/.opencode/understand-anything
Troubleshooting
Skills not found
- Check that the symlinks exist:
ls -la ~/.agents/skills/ | grep understand - Verify the clone succeeded:
ls ~/.opencode/understand-anything/understand-anything-plugin/skills/ - Restart OpenCode
Tool mapping
When skills reference Claude Code tools:
TodoWrite→todowriteTaskwith subagents →@mentionsyntaxSkilltool → OpenCode's nativeskilltool- File operations → your native tools