Files
Understand-Anything/.opencode/INSTALL.md
T
Lum1104 c8d92444e2 refactor: unify skills install method across all platforms
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>
2026-03-23 16:41:29 +08:00

93 lines
2.9 KiB
Markdown

# Installing Understand-Anything for OpenCode
## Prerequisites
- Git
- [OpenCode](https://opencode.ai) installed
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/Lum1104/Understand-Anything.git ~/.opencode/understand-anything
```
2. **Create the skills symlinks:**
```bash
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-plugin
```
**Windows (PowerShell):**
```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"
```
3. **Restart OpenCode** to discover the skills.
## Verify
```bash
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
```bash
cd ~/.opencode/understand-anything && git pull
```
Skills update instantly through the symlinks.
## Uninstalling
```bash
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
1. Check that the symlinks exist: `ls -la ~/.agents/skills/ | grep understand`
2. Verify the clone succeeded: `ls ~/.opencode/understand-anything/understand-anything-plugin/skills/`
3. Restart OpenCode
### 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