npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

oc-convert

v0.1.3

Published

Convert **Claude Code** configs (settings, subagents, MCP, skills) into **OpenCode** config + agents + skills.

Downloads

356

Readme

oc-convert

Convert Claude Code configs (settings, subagents, MCP, skills) into OpenCode config + agents + skills.

  • Input (Claude):
    • Settings
      • ~/.claude/settings.json
      • ~/.claude/settings.local.json
      • ./.claude/settings.json
    • Agents
      • ~/.claude/agents/*.(json|md)
      • ./.claude/agents/*.(json|md)
    • Skills
      • ~/.claude/skills/<skill-name>/SKILL.md
      • ./.claude/skills/<skill-name>/SKILL.md
    • MCP
      • ~/.mcp.json
      • ./.mcp.json
    • Memory/Rules (optional)
      • CLAUDE.md
      • .claude/CLAUDE.md
      • CLAUDE.local.md
      • .claude/rules/*.md
      • .cursor/rules/*.md
      • .cursor/rules/*.mdc
  • Output (OpenCode):
    • Config: opencode.json
    • Agents: .opencode/agent/<agent-name>.md
    • Skills: .opencode/skill/<skill-name>/SKILL.md

Usage

Run without installing (recommended)

# Bun
bunx oc-convert@latest

You can choose:

  • Everything (settings + agents + MCP + skills)
  • Only settings / only agents / only MCP / only skills
  • Which files to include

Convert one file (non-interactive)

# Convert one Claude agent file → one OpenCode agent markdown
bunx oc-convert --agent .claude/agents/my-agent.md

# Convert ONE Claude settings file → opencode.json
bunx oc-convert --settings .claude/settings.json

# Convert ONE Claude skill → one OpenCode skill folder
bunx oc-convert --skills .claude/skills/my-skill

Output directory

By default, output is written to the directory where you run the CLI. To write elsewhere:

bunx oc-convert --output ./my-output-dir

What gets converted (important behavior)

  • Settings:
    • permission → OpenCode permission map (including bash command wildcards)
    • Model is intentionally not carried over (Claude/OpenCode model names differ)
  • Agents:
    • Markdown + frontmatter and JSON agents are supported
    • Model is intentionally not carried over
  • MCP:
    • stdio → OpenCode local
    • http → OpenCode remote
    • environment/headers/url/command/args env interpolation is converted (see below)
  • Skills:
    • Writes .opencode/skill/<skill-name>/SKILL.md
    • OpenCode only recognizes name, description, license, compatibility, metadata in YAML frontmatter
    • Claude’s allowed-tools is preserved under metadata.claudeAllowedTools and added as a short note in the body

Env interpolation conversion (Claude → OpenCode)

Claude-style strings like:

"${API_BASE_URL:-https://api.example.com}/mcp"

are converted to OpenCode-style tokens:

"{env:API_BASE_URL}/mcp"

Note: Claude’s default/fallback (:-...) is dropped because OpenCode doesn’t support fallback syntax.

Permission conversion notes

  • Bash command permissions:
    • Bash(npm run lint)"bash": { "npm run lint": "allow" }
    • Bash(git:*)"bash": { "git *": "allow" }
  • WebFetch:
    • Claude can specify domains (e.g. WebFetch(domain:github.com)), but OpenCode is tool-level only.
    • We convert WebFetch rules to tool-level webfetch allow/deny.

Overwrites

If a target file already exists (opencode.json or an agent markdown), the CLI will warn and ask before overwriting.

Development / build

# Install deps
bun install

# Dev (runs directly with Bun)
bun run start:dev

# Bundle for publishing (tsup)
bun run build