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

claude-commands

v1.2.0

Published

Optimized custom commands for Claude Code

Readme

繁體中文 | English

Claude Commands

一組優化過的 Claude Code 自訂指令集合。全域安裝後可在所有專案中使用。

這是一個開源項目,收集網路上實用的 Claude Code 優化技巧,整理為即用的指令,提供一鍵安裝。所有 credit 歸屬原作者。


安裝

npx (Node.js)

# 安裝全部指令
npx claude-commands --all

# 安裝特定指令(可多選)
npx claude-commands last-word
npx claude-commands last-word context-doctor

bunx (Bun)

# 安裝全部指令
bunx claude-commands --all

# 安裝特定指令(可多選)
bunx claude-commands last-word
bunx claude-commands last-word context-doctor

Homebrew

brew tap ChrisOr-Dev/claude-commands
brew install claude-commands

curl(無需依賴)

# 安裝全部指令
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --all --remote

# 安裝特定指令(可多選)
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --remote last-word
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --remote last-word context-doctor

Git Clone 手動安裝

git clone https://github.com/ChrisOr-Dev/claude-commands.git
cd claude-commands
chmod +x install.sh
./install.sh --all

可用指令

| 指令 | 說明 | Credit | |------|------|--------| | /last-word | 清空 context 前的收尾歸檔工具 | 靈感來自 @chan_yu_chen | | /context-doctor | Token 使用分析與優化建議 | 靈感來自 RyanSeanPhillips | | /ping-claude | 每日 session 暖機排程,避免 5 小時 rate limit | 靈感來自 @maigo.tom |

分開安裝指令

清空 context 前執行,保存學習成果並產生接續 prompt。

npx claude-commands last-word
# 或
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --remote last-word
# 或手動
cp last-word/last-word.md ~/.claude/commands/last-word.md

在 Claude Code 中使用:/last-word

詳細說明 →

分析 Claude Code 的 token 使用情況並取得優化建議。重分析由獨立腳本執行(零 token 消耗)。

npx claude-commands context-doctor
# 或
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --remote context-doctor
# 或手動
mkdir -p ~/.claude/commands/context-doctor
cp context-doctor/context-doctor.md ~/.claude/commands/context-doctor.md
cp context-doctor/analyze.sh context-doctor/analyze-visual.py ~/.claude/commands/context-doctor/

在 Claude Code 中使用:/context-doctor

詳細說明 →

每天自動在 09:00、14:00、19:00 對 Claude Code 發送 ping,提前啟動 session 計時器,避免在尖峰時段觸碰 5 小時 rate limit。

npx claude-commands ping-claude
# 或
curl -fsSL https://raw.githubusercontent.com/ChrisOr-Dev/claude-commands/main/install.sh | bash -s -- --remote ping-claude
# 或手動
mkdir -p ~/.claude/commands/ping-claude
cp ping-claude/ping-claude.md ~/.claude/commands/ping-claude.md
cp ping-claude/setup.sh ~/.claude/commands/ping-claude/

在 Claude Code 中使用:/ping-claude

詳細說明 →


移除

cd claude-commands
chmod +x uninstall.sh

# 移除全部
./uninstall.sh --all

# 移除特定指令
./uninstall.sh last-word

或手動移除:

rm ~/.claude/commands/<command-name>.md

運作方式

Claude Code 會從 ~/.claude/commands/ 載入自訂指令。每個 .md 檔案會變成可在任何 session 中使用的 slash command。

目錄結構:

claude-commands/
├── README.md
├── package.json
├── install.sh
├── uninstall.sh
├── bin/
│   └── cli.js
├── last-word/
│   ├── last-word.md         <- 指令檔案
│   └── README.md
└── context-doctor/
    ├── context-doctor.md    <- 指令檔案
    ├── analyze.sh           <- 獨立分析腳本
    ├── analyze-visual.py    <- 可選圖表產生器
    └── README.md

每個指令有自己的目錄。安裝腳本會複製 .md~/.claude/commands/,附屬腳本則複製到子目錄。


貢獻

想新增指令?

  1. 建立新目錄:your-command/
  2. 新增指令檔案:your-command/your-command.md
  3. 新增說明文件:your-command/README.md + your-command/README.zh-TW.md
  4. 更新 install.shuninstall.sh 中的 ALL_COMMANDS 陣列
  5. 在兩個 README 的可用指令表格中新增項目
  6. 提交 pull request

授權

MIT