Add OpenCode compatibility installer for plugin workflows#112
Add OpenCode compatibility installer for plugin workflows#112marthendalnunes wants to merge 4 commits intotrailofbits:mainfrom
Conversation
|
|
|
Thanks for this PR! I reviewed it with a focus on OpenCode compatibility accuracy, security, and code quality. I've pushed a fixup branch to OpenCode Compatibility FixesResearched the actual OpenCode behavior (from opencode.ai/docs/skills and anomalyco/opencode source):
Security Fixes
Code Quality Fixes
Python Validator Improvements
Fixup branchAll changes are on |
Install matching commands and skills with a no-clone shell script so OpenCode keeps the same command-to-skill UX as Claude plugins, and add docs plus CI checks to enforce compatibility.
Shell script (install_opencode_skills.sh):
- Add safe_remove_path guards (non-empty, non-root, min depth)
- Add --repo/--ref input validation against URL injection
- Fix SIGPIPE from find|head pipeline (use mapfile)
- Fix process substitution hiding find failures
- Wrap cp/ln with error context instead of silent set -e exit
- Consolidate duplicate extract_*_name functions into one
- Decompose 255-line main body into functions
- Fix skill "unchanged" check for remote source (replace stale)
- Add skill name == directory name validation (OpenCode requires)
- Add readability guard in is_command_compatible_with_opencode
- Fix all shellcheck warnings
Python validator (validate_opencode_compat.py):
- Add try/except around read_text() for unreadable files
- Add skill directory name vs frontmatter name check
- Add command file validation (CLAUDE_PLUGIN_ROOT, Claude fields)
- Add plugins dir existence check
Documentation (docs/opencode.md, README.md):
- Fix {baseDir} docs: OpenCode does not substitute this variable
- Document skill auto-registration as slash commands
- Expand "What Does Not Translate 1:1" with frontmatter details
- Add caveat to OpenPackage section (no openpackage.yml manifest)
- Lead with two-step install (download-then-inspect) over curl|bash
CI (.github/workflows/validate.yml):
- Add shellcheck and shfmt linting steps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d2a2902 to
28e5f55
Compare
The burpsuite-project-parser plugin has a pre-existing structural issue (SKILL.md directly in skills/ instead of a named subdirectory). This should not block the PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Docs
Validation