feat(opencode): add first-class OpenCode integration#81
Open
JasonOA888 wants to merge 1 commit intohuggingface:mainfrom
Open
feat(opencode): add first-class OpenCode integration#81JasonOA888 wants to merge 1 commit intohuggingface:mainfrom
JasonOA888 wants to merge 1 commit intohuggingface:mainfrom
Conversation
Implements huggingface#74 ## Changes ### New Files - `scripts/generate_opencode_config.py`: Auto-generate opencode.json - `docs/opencode.md`: Complete OpenCode integration documentation - `opencode.json`: Generated OpenCode configuration ### Modified Files - `scripts/publish.sh`: Add opencode.json to generation pipeline - `README.md`: Add OpenCode setup section ## Architecture The OpenCode integration follows the same pattern as Claude/Cursor/Gemini: - Auto-discovers skills from skills/*/SKILL.md - Reuses MCP config from gemini-extension.json - Reuses metadata from .claude-plugin/plugin.json - Supports --check mode for CI validation ## opencode.json Structure ```json { "name": "huggingface-skills", "context": { "agents": "agents/AGENTS.md", "skills": "skills/" }, "mcpServers": {...}, "skills": ["gradio", "hf-cli", ...], "skillDetails": [...], "metadata": {...} } ``` ## Benefits - ✅ First-class OpenCode support (consistent with other agents) - ✅ Auto-generated, no manual drift - ✅ CI validation via --check mode - ✅ Complete documentation ## Testing ```bash # Generate config python3 scripts/generate_opencode_config.py # Validate in CI ./scripts/publish.sh --check ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #74
Summary
This PR adds comprehensive OpenCode integration following the same architecture as Claude/Cursor/Gemini integrations. All changes are production-ready with complete documentation and CI support.
🏗️ Architecture
Design Philosophy
--checkmode for CI pipelinesData Flow
📦 Changes
New Files (336 lines)
scripts/generate_opencode_config.pyopencode.jsondocs/opencode.mdModified Files
scripts/publish.shREADME.md📋 opencode.json Structure
{ "name": "huggingface-skills", "description": "Agent Skills for AI/ML tasks...", "version": "1.0.0", "context": { "agents": "agents/AGENTS.md", "skills": "skills/" }, "mcpServers": { "huggingface-skills": { "url": "https://huggingface.co/mcp?login" } }, "skills": ["gradio", "hf-cli", ...], "skillDetails": [ {"name": "gradio", "path": "skills/huggingface-gradio", "description": "..."}, ... ], "metadata": { "author": {"name": "Hugging Face"}, "homepage": "https://github.com/huggingface/skills", "repository": "https://github.com/huggingface/skills", "license": "Apache-2.0", "keywords": ["huggingface", "machine-learning", ...] } }✅ Key Features
1. Auto-Discovery
skills/*/SKILL.md2. MCP Integration
gemini-extension.json3. Metadata Reuse
.claude-plugin/plugin.json4. CI Support
# Validate generated artifacts ./scripts/publish.sh --check5. Complete Documentation
🧪 Testing
Manual Testing
CI Integration
📊 Impact
🔗 Related
📝 Reviewer Notes
Design Decisions
Why skillDetails array?
skillsarray for basic discoveryWhy reuse .claude-plugin/plugin.json?
Why separate generate script?
Future Improvements
This PR provides production-ready OpenCode integration with complete documentation, testing, and CI support.