CowboyLogic/ai-dev / skills/client-config-opencode
client-config-opencode
UnverifiedManage OpenCode configuration files (V2 native format by default, V1 supported) including MCP servers, providers, models, agents, commands, permissions, policies, skills, plugins, CLI/TUI settings, keybinds, and themes. Use this skill whenever the user wants to view, edit, add, migrate, or understand any opencode setting in opencode.json(c), cli.json, or tui.json. Trigger on: "configure opencode", "add provider", "set model", "add MCP server", "create agent", "configure permissions", "change theme", "add keybind", "show opencode config", "add custom command", "migrate opencode config to V2", or "opencode cli.json".
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 18.6 KB |
| README.md | markdown | 3.9 KB |
| SKILL.md | skill md | 8.8 KB |
| evals/evals.json | config | 6.7 KB |
| references/agents.md | markdown | 5.4 KB |
| references/config-schema.md | markdown | 14.1 KB |
| references/mcp.md | markdown | 5.1 KB |
| references/permissions.md | markdown | 5.2 KB |
| references/providers.md | markdown | 10.8 KB |
| references/tui.md | markdown | 12.7 KB |
| references/v2/agents.md | markdown | 5.1 KB |
| references/v2/cli.md | markdown | 11.1 KB |
| references/v2/config-schema.md | markdown | 31.8 KB |
| references/v2/mcp.md | markdown | 10.3 KB |
| references/v2/migration.md | markdown | 8.9 KB |
| references/v2/permissions.md | markdown | 16.1 KB |
| references/v2/plugins.md | markdown | 8.6 KB |
| references/v2/providers.md | markdown | 21.4 KB |
| scripts/show-config.py | script | 14.2 KB |
| scripts/update-references.py | script | 3.9 KB |
| sources.json | config | 7.1 KB |
scripts/update-references.py
View on GitHub#!/usr/bin/env python3
"""Fetch latest upstream docs for client-config-opencode skill self-update.
Usage:
python scripts/update-references.py
Fetches all URLs listed in sources.json and saves raw content to _fetched/
staging directory. Claude then reviews diffs and rewrites reference files.
"""
import json
import sys
import urllib.request
import urllib.error
from datetime import datetime, timezone
from pathlib import Path
SKILL_DIR = Path(__file__).parent.parent
SOURCES_FILE = SKILL_DIR / "sources.json"
FETCHED_DIR = SKILL_DIR / "_fetched"
def fetch_url(url: str) -> str:
"""Fetch a URL and return content as string."""
req = urllib.request.Request(
url,
headers={"User-Agent": "opencode-skill-updater/1.0"},
)
with urllib.request.urlopen(req, timeout=30) as resp:
raw = resp.read()
encoding = resp.headers.get_content_charset() or "utf-8"
return raw.decode(encoding, errors="replace")
def sanitize_filename(url: str) -> str:
"""Convert URL to safe filename."""
name = url.replace("https://", "").replace("http://", "")
for ch in "/:.?=&":
name = name.replace(ch, "_")
return name.strip("_") + ".txt"
def main():
if not SOURCES_FILE.exists():
print(f"ERROR: sources.json not found at {SOURCES_FILE}")
return 1
with open(SOURCES_FILE, encoding="utf-8") as f:
sources = json.load(f)
FETCHED_DIR.mkdir(exist_ok=True)
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
manifest = {"fetched_at": timestamp, "files": {}}
# Collect all unique URLs
urls_to_fetch: dict[str, list[str]] = {} # url -> list of reference files that use it
# Index URL
index_url = sources.get("index")
if index_url:
urls_to_fetch.setdefault(index_url, []).append("index")
# Schema URLs
for key, url in sources.get("schema_urls", {}).items():
urls_to_fetch.setdefault(url, []).append(f"schema:{key}")
# Reference file URLs
for ref_file, ref_info in sources.get("references", {}).items():
for url in ref_info.get("urls", []):
urls_to_fetch.setdefault(url, []).append(ref_file)
print(f"Fetching {len(urls_to_fetch)} URL(s) to {FETCHED_DIR}/")
print()
errors = []
for url, used_by in sorted(urls_to_fetch.items()):
fname = sanitize_filename(url)
out_path = FETCHED_DIR / fname
print(f" Fetching: {url}")
print(f" Used by: {', '.join(used_by)}")
try:
content = fetch_url(url)
out_path.write_text(content, encoding="utf-8")
size = len(content)
print(f" Saved {size:,} chars -> {out_path.name}")
manifest["files"][fname] = {
"url": url,
"used_by": used_by,
"size": size,
}
except urllib.error.HTTPError as e:
msg = f"HTTP {e.code}: {url}"
print(f" ERROR: {msg}")
if out_path.exists():
out_path.unlink()
errors.append(msg)
except Exception as e:
msg = f"{e}: {url}"
print(f" ERROR: {msg}")
if out_path.exists():
out_path.unlink()
errors.append(msg)
print()
# Write manifest
manifest_path = FETCHED_DIR / "manifest.json"
manifest_path.write_text(json.dumps(manifest, indent=2), encoding="utf-8")
print(f"Manifest written: {manifest_path}")
if errors:
print(f"\n{len(errors)} error(s):")
for e in errors:
print(f" - {e}")
return 1
else:
print(f"\nAll {len(urls_to_fetch)} URLs fetched successfully.")
print("\nNext step: Review diffs between _fetched/ content and references/,")
print("then rewrite any reference files that contain stale information.")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |