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

cc-prompt-enhance-extension

v1.0.2

Published

将 cc-prompt-enhance CLI 直接集成到 Claude Code 中,支持通过斜杠命令调用,实现无缝的提示词增强体验

Readme

CC Prompt Enhance Claude Code Extension

🎯 功能概述

cc-prompt-enhance CLI 直接集成到 Claude Code 中,支持通过斜杠命令调用,实现无缝的提示词增强体验。

✨ 主要特性

  • Claude Code 斜杠命令集成:直接在对话中使用 /cc-prompt-enhance
  • 智能参数解析:支持 -v(详细)、-d(调试)、-s(分步)选项
  • 自动CLI查找:智能查找全局安装的 cc-prompt-enhance 命令
  • 实时增强处理:调用真实的 GLM-4.6 API 进行智能提示词优化
  • 错误处理:完善的错误提示和调试信息
  • 输出解析:自动提取增强后的提示词内容

🚀 使用方法

在 Claude Code 中直接使用:

# 基础使用
/cc-prompt-enhance "帮我优化这个React组件"

# 带选项使用
/cc-prompt-enhance "分析当前项目技术栈" -v
/cc-prompt-enhance "重构这个API" -s -d

支持的选项:

  • -v, --verbose:显示详细输出和过程信息
  • -d, --debug:启用调试模式
  • -s, --steps:分步模式显示详细信息

🏗️ 技术实现

核心组件:

  1. CLI查找器:自动查找全局安装的 cc-prompt-enhance
  2. 参数解析器:智能解析命令选项和参数
  3. 进程管理器:安全执行CLI命令并捕获输出
  4. 输出解析器:提取增强后的提示词内容
  5. 错误处理器:完善的错误处理和用户反馈

集成架构:

const ccPromptEnhanceCommand = {
  name: '/cc-prompt-enhance',
  description: '增强提示词以便在Claude Code中获得更好的AI响应',
  handler: async (args) => {
    // 调用您的 cc-prompt-enhance CLI
    const enhancedPrompt = await callCCPromptEnhance(args);
    return enhancedPrompt;
  }
};

🔧 安装配置

方案1:作为 Claude Code 扩展(推荐)

  1. 打包扩展

    cd claude-code-extension
    npm install
    npm run build
  2. 在 Claude Code 中启用

    • 打开 Claude Code 设置
    • 启用"开发者模式"或"扩展功能"
    • 添加此扩展路径

方案2:手动配置

  1. 复制扩展文件到 Claude Code 扩展目录
  2. 配置路径:确保 cc-prompt-enhance CLI 可被找到
  3. 重启 Claude Code:使扩展生效

📝 使用示例

示例1:基础提示词增强

/cc-prompt-enhance "帮我修复这个登录bug"

示例2:技术栈分析

/cc-prompt-enhance "分析当前项目的编码规范" -v

示例3:复杂重构任务

/cc-prompt-enhance "重构这个老旧的API架构" -s -d

🔄 工作流程

  1. 用户输入:在 Claude Code 中输入 /cc-prompt-enhance "提示词"
  2. 扩展调用:自动调用全局安装的 CLI
  3. AI增强:通过 GLM-4.6 API 智能增强提示词
  4. 结果返回:将增强后的提示词直接显示在对话框中
  5. 继续对话:用户可以直接使用增强后的提示词继续对话

🎉 优势

  • 无缝集成:无需切换到终端,直接在 Claude Code 中使用
  • 保持同步:扩展使用最新的 CLI 版本和功能
  • 智能增强:基于真实项目上下文的 AI 增强
  • 用户友好:熟悉的斜杠命令体验
  • 功能完整:支持所有原有的 CLI 选项和功能

🔗 相关链接

📄 许可证

MIT License - 详见 LICENSE 文件