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

opencode-remote-brain

v0.1.0

Published

OpenCode plugin that syncs rules and skills from a public GitHub repository into OpenCode's native configuration.

Readme

opencode-remote-brain

OpenCode plugin that syncs rules and skills from a public GitHub repository into OpenCode's native configuration.

How it works

On startup, the plugin clones (or pulls) the configured GitHub repo, parses index.yaml, then injects the listed rules as instructions and skills as skill paths into your OpenCode config. Everything is cached locally so subsequent startups are fast.

The remote-sync tool lets you manually trigger a re-sync mid-session. Changes take effect on the next startup.

If a sync fails for any reason, the plugin falls back to the last successful sync so you're never left without your rules and skills.

Install

npm install opencode-remote-brain

Requires git to be installed and available on your PATH.

Configuration

Create ~/.config/opencode/remote-brain.jsonc (or $XDG_CONFIG_HOME/opencode/remote-brain.jsonc):

{
  // Required: GitHub repo in "owner/repo" format
  "repo": "your-org/your-brain",
  // Optional: branch, tag, or commit (default: "main")
  "ref": "main",
  // Optional: index file path within the repo (default: "index.yaml")
  "indexFile": "index.yaml",
  // Optional: local cache directory (default: "~/.cache/opencode/remote-brain")
  "cacheDir": "~/.cache/opencode/remote-brain"
}

You can also point $schema at the bundled schema for editor validation:

{
  "$schema": "./node_modules/opencode-remote-brain/assets/remote-brain.schema.json",
  "repo": "your-org/your-brain"
}

Repository index format

Your remote repo needs an index.yaml at the root (or at the path set by indexFile):

version: 1
rules:
  - rules/my-rule.md       # relative path to a markdown rule file
skills:
  - skills/my-skill        # relative path to a skill directory (must contain SKILL.md)

All paths are relative to the repo root. Absolute paths and .. segments are rejected.

Register the plugin in OpenCode

Add the plugin to your ~/.config/opencode/config.json:

{
  "plugins": ["opencode-remote-brain"]
}

Using the remote-sync tool

Inside OpenCode, run the remote-sync tool to pull the latest changes from your remote repo. The sync updates the local cache. Restart OpenCode (or start a new session) for the changes to take effect.

Troubleshooting

Sync fails silently Check that git is installed and accessible, and that the configured repo is public.

Rules or skills not loading Verify that the paths in index.yaml are relative, exist in the repo, and that rule files end in .md. Skill directories must contain a SKILL.md file.

Path traversal rejected Paths containing .. segments or absolute paths are blocked for security. Keep all paths relative to the repo root.

Security

Every path read from index.yaml is validated before use. Paths with .. segments or absolute paths are rejected outright. A realpath check then confirms the resolved file stays within the cloned repo directory, preventing any traversal outside the cache.

Development

# Install dependencies
bun install

# Run tests
bun test

# Type-check
bun run typecheck

# Build
bun run build