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

cc2oc

v0.1.0

Published

Claude Code compatibility layer plugin for OpenCode

Readme

cc2oc

cc2oc is an OpenCode plugin that adds a Claude Code compatibility layer for three core surfaces:

  • Claude settings and permission rules from .claude/settings.json
  • Claude commands from ~/.claude/commands/ and .claude/commands/
  • MCP servers from .mcp.json

The implementation is written from scratch for this repository and keeps the project MIT-clean as required by private/PLAN.md.

What works today

  • Parse and merge Claude settings from global, project, and local files
  • Enforce permissions.allow / permissions.deny before tool execution
  • Bridge Claude hook events for PreToolUse, PostToolUse, Notification, and Stop
  • Load Claude markdown commands with project-over-global precedence
  • Load local stdio MCP servers and remote HTTP MCP servers with env expansion

Install

bun install

To consume the published package in another project:

npm install cc2oc

Test

bun run check

Build

bun run build

Plugin usage

import { createClaudeCompatPlugin } from "cc2oc";

export default createClaudeCompatPlugin({
  enabled: true,
  settingsPath: ".claude/settings.json",
  commandsPath: ".claude/commands",
  mcpsPath: ".mcp.json",
});

Expected workspace layout

your-project/
├── .claude/
│   ├── settings.json
│   ├── settings.local.json
│   └── commands/
│       └── review.md
└── .mcp.json

Example Claude command

---
description: Review the current changes
agent: build
argument-hint: <path>
---

Inspect the diff for $ARGUMENTS.

Example .mcp.json

{
  "mcpServers": {
    "docs": {
      "url": "https://example.com/mcp"
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem"],
      "env": {
        "TOKEN": "${MCP_TOKEN}"
      }
    }
  }
}

Notes

  • Project commands override global commands with the same name.
  • Invalid settings, command files, or MCP entries fail closed only where safety matters and otherwise degrade gracefully.
  • Settings and hook files are cached per plugin instance. If you edit them during a running session, reload the plugin or restart the host process to pick up changes.
  • The repository test suite includes end-to-end checks for settings, hooks, command loading, and MCP loading.

Release automation

This repository publishes through GitHub Actions only.

  • Push a tag like v1.2.3 to publish that exact version.
  • Or run the Release workflow manually and choose patch, minor, or major.

Required GitHub secrets:

  • none for npm publish when Trusted Publishing is configured correctly

Configure Trusted Publishing on npm instead of storing NPM_TOKEN in GitHub:

  1. open your package on npm
  2. go to SettingsTrusted Publisher
  3. add this GitHub Actions publisher
    • GitHub owner: nguyenphutrong
    • repository: cc2oc
    • workflow filename: release.yml
  4. keep the repository URL in package.json matching the real GitHub repo exactly

With Trusted Publishing enabled, npm uses GitHub OIDC at publish time and you do not need a long-lived publish token in repository secrets.

Manual workflow behavior:

  • resolves the next semantic version from the latest v* git tag
  • injects that version into the publishable dist/package.json
  • runs bun run check
  • builds dist/
  • creates a publishable dist/package.json
  • publishes to npm through Trusted Publishing
  • creates and pushes the corresponding git tag
  • creates a GitHub release if one does not already exist