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-lgtm

v0.0.1

Published

A high-quality OpenCode plugin for senior engineers, focused on design and code review.

Readme

LGTM

"Review as if you have to maintain it forever."

LGTM (opencode-lgtm) is an OpenCode plugin designed for experienced engineers. It focuses on high-level architectural design, code quality, and rigorous code reviews.

Vision

Unlike generic coding assistants that focus on writing code quickly, LGTM focuses on writing code correctly. It acts as a digital Staff Engineer or Maintainer.

Key Features

  • Architectural Guardrails: Analyzes changes against project-specific design patterns.
  • Deep Code Review: Focuses on edge cases, security, and maintainability rather than just syntax.
  • Maintainer Persona: Provides rationales for suggestions, fostering a culture of mentorship.
  • Review-Only Mode: By default, it suggests and explains rather than blindly editing files.

Philosophy

  • Quality over Speed: Better to have no code than bad code.
  • Explicit over Implicit: Use clear types and patterns.
  • OSS Spirit: Open, collaborative, and opinionated.

Development

  • Run bun run check before opening a PR.
  • specs/ is a git submodule; keep it pinned to the intended lgtm-specs commit.

Agents

  • Primary entrypoint: @review (LGTM Review Lead).
  • roles/* agents (e.g. roles/planner, roles/reviewer/logic) are internal subagents used by the lead via task.
  • If you manually select a roles/* agent (e.g. @roles/planner), LGTM will warn and you should switch back to @review.

Tools

  • lgtm status: shows detected language and whether config loaded.
  • lgtm clean_cache: clears LGTM cache.
  • lgtm gen_policy: creates/updates .lgtm/policy.md for the current repo.
    • On update, writes a backup to .lgtm/policy.md.bak.
    • Add repo-specific guidance under "Local Notes (Preserved)" (kept on reruns).

Debugging

  • Inspect rendered prompts/models:
    • opencode debug agent review
    • opencode debug agent roles/explorer
  • Inspect what was sent in a run:
    • JSONL logs: ~/.local/state/opencode/lgtm/logs/*.jsonl (or XDG_STATE_HOME/opencode/lgtm/logs)
    • Export a session: opencode export <sessionID>

Default Config

  • The plugin ships a default config template at config/default.json.
  • Full config reference: config/README.md.
  • On startup, LGTM loads this bundled default first, then overlays user config from ~/.config/opencode/lgtm/config.json (or XDG_CONFIG_HOME/opencode/lgtm/config.json).
  • To customize locally, copy and edit:
    • cp config/default.json ~/.config/opencode/lgtm/config.json
  • User config is treated as the source of truth for explicitly configured capabilities. By default (skip_model_validation: false), startup fails fast when a configured capability cannot resolve to any usable model.

Interactive Model Setup

  • Run bun run setup:models to launch a terminal wizard.
  • The wizard reads available provider/model IDs from OpenCode config (~/.config/opencode/config.json or XDG_CONFIG_HOME/opencode/config.json) and writes LGTM config to ~/.config/opencode/lgtm/config.json.
  • If strict validation fails, rerun bun run setup:models or manually update models.capabilities so each configured capability has at least one usable model.

Config Parameters

  • Configure runtime policy in defaults inside ~/.config/opencode/lgtm/config.json.
  • defaults.review_bash_policy
    • Default: relaxed
    • strict: enforce single-command, read-only git/gh usage in @Review workflows.
  • defaults.allow_general_fallback
    • Default: false
    • true allows capability resolution fallback to general when direct capability candidates are unavailable.
    • Security posture: keep disabled unless you explicitly want resilience over strict capability isolation.
  • defaults.debug_logging
    • Default: false
    • true enables LGTM debug JSONL logging.

Debug Payload Guards

  • LGTM debug logs record full prompts/outputs for traceability.
  • Some upstream tool outputs may still be truncated before LGTM sees them (e.g. large command output payloads).