OpenCode CLI skills for opinionated spec-driven development using the foundry-mcp.
Install globally with a single command:
curl -sSL https://raw.githubusercontent.com/foundry-works/opencode-foundry/main/install/install.sh | bashThis installs:
- 9 Foundry skills to
~/.config/opencode/skills/ - MCP server config merged into
~/.config/opencode/opencode.json - foundry-mcp Python package (via uvx/pipx/pip)
After installation, start OpenCode and run the setup skill:
opencode
# Then type: /foundry-setupSee install/README.md for options (--dry-run, --uninstall, etc.)
skills/is the canonical source for all skills..opencode/skills/is a mirror used by OpenCode discovery.
Run this after any changes to skills/:
./scripts/sync-skills.sh --cleanThis repo requires the foundry-mcp MCP server.
- Python 3.10 or higher
- uv (recommended) or pip
A default OpenCode config is provided in opencode.json. To use it:
- Copy or merge
opencode.jsoninto your OpenCode configuration, or - Add the following to your existing OpenCode config file:
{
"$schema": "https://opencode.ai/config.json",
"experimental": {
"mcp_timeout": 600000
},
"mcp": {
"foundry-mcp": {
"type": "local",
"command": ["python", "-m", "foundry-mcp"],
"enabled": true
}
},
"permission": {
"skill": {
"*": "allow"
},
"mcp__plugin_foundry_foundry-mcp__*": "allow",
"bash": {
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git rev-parse*": "allow",
"git branch*": "allow",
"git show*": "allow",
"pytest*": "allow",
"python -m pytest*": "allow",
"foundry-mcp*": "allow",
"foundry-cli*": "allow",
"codex*": "allow",
"claude*": "allow",
"gemini*": "allow",
"cursor-agent*": "allow",
"opencode*": "allow"
},
"edit": {
"**/specs/pending/**": "allow",
"**/specs/active/**": "allow",
"**/specs/completed/**": "allow",
"**/specs/archived/**": "allow"
},
"read": {
"**/specs/**/*.json": "deny",
"*": "allow"
},
"lsp": "allow"
}
}See the foundry-mcp documentation for all available options.