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

pi-skill-guard

v0.3.0

Published

Pi extension that intercepts 'tool not found' errors: injects skill documentation for matching skill names and falls back to bash for unknown tools with a command argument

Readme

pi-skill-guard

一个 pi 扩展,用于拦截"工具未找到"错误:为匹配的 skill 名称注入文档,并对包含 command 参数的未知工具回退到 bash 执行。

安装

pi install npm:pi-skill-guard

功能说明

该扩展通过 message_end 事件拦截工具错误,并在 LLM 看到失败之前静默修复。包含两种保护:

1. Skill 文档注入

当模型调用与可用 skill 同名的工具时(例如 brave-search),扩展将"未找到"错误替换为 skill 的 SKILL.md 内容。

修复前: Tool brave-search not found(错误) 修复后: 完整的 SKILL.md 内容作为成功的工具结果注入

2. Bash 命令执行

当模型调用包含 command 参数的未知工具时,扩展通过 pi 内置的 bash 工具执行。支持可选的 timeout(数字或字符串)。

修复前: Tool my-script not found(错误) 修复后: 实际的 bash 执行结果(含截断和临时文件管理)


相关扩展

字段别名规范化(edit / write / read 参数修正),请参见 pi-arg-corrector


架构

所有拦截均在 message_end 事件中处理,该事件在每条消息完成后触发,并支持原地替换消息。每个工具调用通过 ID 跟踪,防止在替换链中重复处理。

  • session_start:加载 skills,缓存文件路径
  • turn_end:清除已处理的工具调用跟踪
  • message_end:检查错误结果,应用保护机制