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

smart-question

v0.1.0

Published

Pi agent extension: restructures informal embedded/FPGA/embedded-Linux questions into smart structured questions per How-To-Ask-Questions-The-Smart-Way (提问的智慧), with interactive collection and environment auto-detection.

Readme

smart-question — 提问整理扩展(pi agent package)

面向嵌入式 / 嵌入式Linux / FPGA 工程师:把口语化、不规范的问题,按 《提问的智慧》(How To Ask Questions The Smart Way) 整理成结构化提问,再继续回答。 在 Gowin / Xilinx / STM32 / 嵌入式 Linux 等项目中实战验证。

安装

pi install npm:smart-question
# 或试用(不写入配置)
pi -e npm:smart-question

装好后在 pi 里执行 /reload 生效。

使用方式

| 方式 | 触发条件 | 说明 | |---|---|---| | 自动(主) | 提问缺关键上下文时,LLM 调用 smart_question 工具 | 交互问卷收集缺失字段,整理后直接回答 | | /smart-ask(兜底) | /smart-ask <原始描述>,或直接 /smart-ask 后粘贴 | 显式启动整理流程 | | 保守自动检测 | 仅"会话首条提问"明显简短/模糊时 | 注入隐藏提示,不拦截、不重写 |

关键设计

  • 4 套领域模板:embedded / linux / fpga / generic,LLM 按问题内容选择(可传 focus 指定字段)。
  • 环境自动预填:自动运行 uname、探测交叉编译工具链、扫描工程文件(CMakeLists/Makefile/.xdc/.xpr/*.v 等), 预填环境字段,标记"(自动检测)",可修改。
  • 简单提示链:单行字段用 input,多行/预填用 editor,枚举用 select,每步 Esc 中止。
  • 输出:结构化 Markdown(概述/目标/环境/现象/复现步骤/已尝试/诊断材料 + 未收集清单 + 原始描述留档)。
  • 保守:自动检测只在会话首条提问时生效,追问不会被反复打断。

本地开发(改完 /reload 即生效)

pi install /absolute/path/to/smart-question   # 本地路径安装 = 实时引用,不复制

开发流程:改代码 → pi 里 /reload → 验证。稳定后 npm publish 发新版本。

文件结构

smart-question/
├── package.json           # pi 包清单(extensions 入口 + peerDependencies)
├── extensions/
│   └── smart-question/
│       ├── index.ts       # 工具 + /smart-ask 命令 + 自动检测
│       ├── templates.ts   # 4 套领域问题模板 + 领域推断
│       ├── env.ts         # 环境自动检测(uname/工具链/工程扫描)
│       └── format.ts      # 结构化 Markdown 组装
└── README.md

调试 / 调整

  • AUTO_DETECT 常量可关闭保守自动检测(index.ts 顶部)。
  • 想调整模板字段,改 templates.ts。

Roadmap

  • [ ] 环境自动采集增强:递归扫描、git 信息、目标板配置
  • [ ] 英文输出版(发 GitHub issue / 国际论坛)
  • [ ] 复盘统计:记录你经常缺失的字段,逐步改进提问习惯
  • [ ] 结构化问题卡片渲染(registerMessageRenderer)
  • [ ] 发布到 GitHub + 图库预览图(video/image 元数据)