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

@danielbolivar/opencode-handoff

v0.1.5

Published

OpenCode plugin for session handoff - transfer context to focused new sessions without compaction loss

Readme

@danielbolivar/opencode-handoff

Transfer context to focused new sessions without compaction loss.

Handoff creates a new session with intelligently extracted context from your current session. Unlike compaction (which is lossy), handoff lets you specify what the new session should focus on, and the LLM distills only the relevant context.

Why Handoff?

The best workflow for complex tasks:

Research Session → Planning Session → Implementation Session
     (messy)          (focused)           (pristine)

Each handoff creates a clean context window with only conclusions, not the journey.

  • Research → Planning: Distills findings into actionable insights
  • Planning → Implementation: Extracts just the finalized plan
  • No mid-impl compaction: Fresh context means better accuracy

Installation

From npm

npm install @danielbolivar/opencode-handoff

Add to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@danielbolivar/opencode-handoff"],
  "command": {
    "handoff": {
      "description": "Create focused new session from current context",
      "template": "$ARGUMENTS"
    }
  }
}

From source

  1. Clone this repo and build: bun install && bun run build
  2. Copy dist/index.js to .opencode/plugin/handoff.js
  3. Add the command config to opencode.json (see above)

Usage

/handoff <goal for new session>

The LLM analyzes your session and generates a focused handoff prompt tailored to your goal. It automatically determines what kind of context you need.

Examples

After research, ready to plan:

/handoff create a detailed implementation plan for the auth system

After planning, ready to implement:

/handoff execute phase 1 of the plan

Continue with next phase:

/handoff now implement this for teams as well

Hit a wall, need to research more:

/handoff investigate why the token refresh is failing

How It Works

  1. You type /handoff <goal>
  2. The LLM analyzes the current session and your goal
  3. It generates a handoff prompt with:
    • Relevant @filepath references (loaded into context first)
    • Appropriate context based on what your goal requires
    • Clear goal statement
  4. A new child session is created (linked to parent)
  5. Session list opens - select the new session
  6. Handoff prompt auto-fills, ready for you to review and send

What the LLM Extracts

The LLM adapts the handoff based on your goal:

For implementation goals (execute, build, implement):

  • The plan/phase being executed
  • Numbered tasks and specific steps
  • Exact file paths, function names, signatures

For planning goals (design, architect, plan):

  • Key findings from research
  • Constraints to respect
  • Decisions that need to be made

For research goals (investigate, explore, understand):

  • Current understanding
  • Dead ends to avoid
  • Specific questions to answer

For general goals:

  • Brief current state
  • What needs to happen next

Principles

Every handoff follows these principles:

  • Files first - @filepath references load context before prose
  • No journey - Only conclusions matter, not how you got there
  • Actionable immediately - Start working from the first line
  • Dense information - Like notes from a colleague, not a report

Programmatic Usage

import { executeHandoff } from "@danielbolivar/opencode-handoff"

const result = await executeHandoff(client, sessionId, {
  goal: "implement the auth system",
})

console.log(result.newSessionId) // ID of the new session
console.log(result.prompt)       // The generated handoff prompt
console.log(result.files)        // File references extracted

Development

bun install
bun run build
bun run typecheck

License

MIT