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

tmux-git-worktree

v0.2.0

Published

Claude Code Skill: Tmux + Git Worktree context switcher

Readme

Tmux Git Worktree - Claude Code Skill

基于 Tmux + Git Worktree 的上下文交换工作流。

快速开始

# 使用 npx 运行安装器(无需预先安装)
npx -y tmux-git-worktree

安装器会引导你完成:

  1. 选择 AI 工具 - Claude Code 或 Codex
  2. 选择安装位置 - Project (./.claude/skills/) 或 User (~/.claude/skills)

支持的 AI 工具

| AI 工具 | Skills 目录 | 上下文文件 | |---------|-------------|------------| | Claude Code | ~/.claude/skills/ | CLAUDE.md | | Codex | ~/.codex/skills/ | AGENTS.md |

使用

创建任务环境

# 默认使用 Claude Code
tm-task fix-bug "修复登录接口的 CSRF 漏洞"

# 使用 Codex
tm-task feature "Add OAuth2" codex

# 不启动 AI,只创建 worktree
tm-task my-task "description" none

恢复工具

# 列出孤立资源
tm-recover list

# 清理孤立 worktree
tm-recover clean

工作原理

┌─────────────────────────────────────────┐
│  当前 Tmux Pane (工作代码)               │
│  ┌──────────────┐                       │
│  │ 你的代码      │                       │
│  │ (feat-A)     │                       │
│  └──────────────┘                       │
└─────────────────────────────────────────┘
           ↓ tm-task fix-bug "description"
           ↓
┌─────────────────────────────────────────┐
│  Tmux Pane Swap                         │
│  ┌──────────────┐  ┌──────────────┐    │
│  │ 原代码       │→ │ 新任务环境   │    │
│  │ (保存后台)   │  │ fix-bug      │    │
│  └──────────────┘  └──────────────┘    │
└─────────────────────────────────────────┘
           ↓
    AI 自动加载任务上下文
    - 任务描述
    - 项目结构
    - 分支信息

目录结构

tmux-git-worktree/
├── package.json             # npm 配置
├── src/install.ts           # TypeScript 安装器
├── dist/                    # 编译输出
└── skill/tmux-git-worktree/
    ├── SKILL.md             # Skill 定义
    ├── reference.md         # 详细文档
    ├── examples.md          # 使用示例
    └── scripts/
        ├── tm-task          # 主 CLI
        ├── tm-recover       # 恢复工具
        └── lib/
            ├── ai-launch.sh # AI 启动配置
            ├── skills.sh    # Skills 生成
            ├── git-worktree.sh
            ├── tmux.sh
            ├── cleanup.sh
            └── config/
                └── tm-task.conf

高级配置

自定义 AI 启动命令

# 使用环境变量自定义 AI 启动方式
export TM_TASK_AI_CMD_CLAUDE="claude --model opus"
export TM_TASK_AI_CMD_CODEX="codex --model gpt-4"

# 然后正常使用
tm-task my-task "description"

自定义工作目录

export TM_TASK_WORKTREE_BASE=~/dev/worktrees
tm-task my-task "description"

技术栈

  • TypeScript - 安装器代码
  • Inquirer - 交互式命令行
  • Bash - 核心脚本
  • Tmux - 窗口管理
  • Git Worktree - 隔离环境

开发

# 安装依赖
npm install --ignore-scripts

# 编译
npm run build

# 本地测试
node dist/install.js

License

MIT