* feat: 为promptx_tool增加forceReinstall选项支持 解决工具沙箱缓存机制问题,允许强制重新安装工具依赖。 ## 修改内容 ### 1. 工具定义更新 (toolDefinitions.js) - 增加 context.options.forceReinstall 参数支持 - 增加 context.options.timeout 参数支持 - 完善参数描述,说明context用途 - 移除暂时不需要的role_id和session_id参数 ### 2. 执行逻辑优化 (ToolCommand.js) - 支持从context.options提取执行选项 - 将选项传递给ToolSandbox构造函数 - 增加调试日志输出沙箱选项 - 完善JSDoc注释 ## 解决的问题 - Issue #107: PromptX工具沙箱缓存机制不支持工具集更新 - 鲁班等AI角色在调试工具时遇到的缓存问题 - 工具依赖更新后无法自动重新安装的问题 ## 使用方式 ```javascript // 强制重新安装依赖 { tool_resource: "@tool://tool-name", parameters: { /* 工具参数 */ }, context: { options: { forceReinstall: true } } } ``` 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: 简化context参数,移除暂时不需要的role_id和session_id 按照奥卡姆剃刀原则,移除当前没有实际用途的参数: - 移除 context.role_id - 移除 context.session_id - 保留 context.options 用于执行配置 - 简化API接口,降低复杂度 未来如需要可重新添加这些参数。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: 简化promptx_tool参数结构,移除context层级 ## 主要改进 ### 1. 扁平化参数结构 - 移除复杂的context嵌套,直接使用顶级参数 - forceReinstall 和 timeout 作为可选的顶级参数 - 遵循MCP协议惯例,降低AI理解成本 ### 2. 参数说明优化 - forceReinstall: 明确默认值为false - 详细说明使用场景:工具开发和调试中的缓存问题 - timeout: 明确默认值为30000ms ### 3. 防止盲目调用 - 增加重要提醒:要求AI先了解工具说明再调用 - 避免大模型在不了解工具的情况下盲目执行 ## 新的调用方式 ## 优势 - 符合MCP预训练共识,降低AI学习成本 - 参数结构简洁直观 - 保持向后兼容性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: 修正鲁班工具开发提示词 - 更新为五组件架构并增加AI引导机制 - 更新DPML工具标签知识:从四组件升级到五组件架构(增加identity标签) - 在工具开发工作流中增加.tool.md说明书创建步骤 - 添加AI使用提醒机制,强化工具使用前必读原则 - 完善工具标签编写模板,包含完整的五标签结构 - 更新质量检查标准,适配新的标签体系 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: 添加智能require错误过滤机制到ToolSandbox 解决工具开发中的常见问题:analyze阶段require依赖导致的错误 核心改进: - 添加_filterRequireError()私有方法,智能识别MODULE_NOT_FOUND错误 - 通过静态分析提取getDependencies()声明的依赖列表 - 对比缺失模块与声明依赖,区分合法缺失和代码错误 - 支持版本号格式的依赖声明(如axios@^1.6.0) 开发者体验提升: - 可以自然地在文件顶部写require()语句 - 忘记声明依赖时仍会得到明确错误提示 - 降低工具开发的认知负担和学习成本 - 遵循奥卡姆剃刀原则:用技术解决技术问题 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
PromptX · AI-native Professional Capability Enhancement System
Provides specialized roles, memory management, and knowledge systems for AI applications through MCP protocol. One command to transform any AI client into a professional powerhouse.
✨ Understanding PromptX at a Glance
What can PromptX do? Simply put, it gives your AI assistant a "brain" and "memory," and transforms you from user to creator.
- 🎭 Professional Role-Playing: Provides expert roles across different domains, making AI responses more professional and in-depth.
- 🧠 Long-term Memory & Knowledge Base: AI can remember key information and your preferences, providing coherent and personalized support in ongoing conversations and work.
- ✨ AI Role Creation Workshop: Create professional AI assistants in 2 minutes - Transform your ideas into reality, evolving from user to creator.
- 🔌 Easy Integration: With just one command, seamlessly enable these powerful features for dozens of mainstream AI applications (like Claude, Cursor).
📸 Usage Effects After Configuration
1. Discover and Activate Professional Roles
Use promptx_welcome to discover available roles, then promptx_action to activate them, instantly transforming your AI into a domain expert.

2. Intelligent Memory
Use promptx_remember to save key information, and AI will proactively apply this knowledge in subsequent interactions.

⚠️ Project Status Notice
PromptX is currently in the early development stage, and we are actively improving features and fixing issues. Before reaching the official stable version, you may encounter some usage issues or instability.
We sincerely ask for your understanding and support! 🙏
📞 Need Help? Get Support!
If you encounter any issues during usage, please contact us through:
- 🐛 Submit Issue: GitHub Issues - Describe the problem in detail, we'll respond promptly
- 💬 Direct Contact: Add developer WeChat
deepracticexfor immediate assistance - 📧 Email Contact: Send email to
sean@deepracticex.comfor technical support - 📱 Tech Community: Scan the QR code below to join our technical discussion group
Your feedback is invaluable to us and helps us improve product quality rapidly! ✨
🚀 Quick Start - 30-Second Setup
Open your configuration file and copy the promptx configuration code below. This is the simplest zero-configuration mode, where PromptX automatically handles everything for you.
{
"mcpServers": {
"promptx": {
"command": "npx",
"args": [
"-y",
"-f",
"--registry",
"https://registry.npmjs.org",
"dpml-prompt@beta",
"mcp-server"
]
}
}
}
Configuration Parameters:
command: Specifies using npx to run promptx serviceargs: Startup parameters configuration list-y: Auto-confirm-f: Force refresh cache--registry: Specify registry sourcehttps://registry.npmjs.org: Use official registrydpml-prompt@beta: Use stable beta versionmcp-server: Start service
🎯 It's that simple! Save the file and restart your AI application, and PromptX is successfully activated.
💡 Tip: The configuration specifically uses the official registry
registry.npmjs.orgto avoid installation issues caused by unofficial mirrors. If you find the installation slow, it's recommended to use a proxy tool for acceleration rather than switching to alternative mirrors.
🌐 Advanced Configuration: HTTP Mode Support
In addition to the local mode above, PromptX also supports HTTP mode, suitable for remote deployment or special network environments:
# Start HTTP mode server
npx -f -y dpml-prompt@beta mcp-server --transport http --port 3000
Then use in client configuration:
{
"mcpServers": {
"promptx": {
"url": "http://localhost:3000/mcp"
}
}
}
📖 Complete Installation & Configuration Guide - Detailed configuration methods for various clients and troubleshooting
New to MCP? Watch MCP Tutorial on BiliBili
Currently, all AI clients that support the MCP protocol can use PromptX. This mainly includes: Claude Desktop, Cursor, Windsurf, Cline, Zed, Continue, and other mainstream AI programming tools, as well as more applications that are in the process of being integrated.
⚙️ How It Works
PromptX acts as a "professional capability middleware" between you and your AI application, communicating through the standard MCP protocol.
graph TD
subgraph "Your AI App (Claude,Cursor,etc.)"
A[👨💻 User Interaction]
end
subgraph "PromptX MCP Server"
C{PromptX Engine}
D[🎭 Role Library]
E[🧠 Memory & Knowledge]
end
A -- "Calls 'promptx_...' tools" --> B(MCP Protocol)
B --> C
C -- "Accesses" --> D
C -- "Accesses" --> E
subgraph "Enhanced Response"
F[✨ Professional Output]
end
C --> F
When you call the promptx_... series of tools, your AI application sends the request via the MCP protocol to PromptX. The PromptX engine loads the appropriate professional roles, retrieves relevant memories, and then returns a professionally enhanced result to your AI application, which is ultimately presented to you.
🎯 After configuration, your AI application will automatically gain 6 professional tools:
promptx_init: 🏗️ System Initialization - Automatically prepares the working environment.promptx_hello: 👋 Role Discovery - Browse all available expert roles.promptx_action: ⚡ Role Activation - Transform into an expert in a specific domain with one click. (Includes Nuwa🎨 Role Creation Consultant)promptx_learn: 📚 Knowledge Learning - Have AI learn specific knowledge or skills.promptx_recall: 🔍 Memory Retrieval - Look up historical information from the memory repository.promptx_remember: 💾 Experience Saving - Store important information in long-term memory.
📖 Complete MCP Integration Guide
🎨 Nuwa Creation Workshop - Let everyone become an AI role designer
💫 From Idea to Reality, in Just 2 Minutes
Have you ever thought: What if I could customize a professional AI assistant for a specific work scenario? Nuwa makes this idea a reality.
"Every idea deserves its own dedicated AI assistant. Technical barriers should not limit the flight of creativity."
🎯 Core Value Transformation
- 🚀 Zero-Barrier Creation: No need to learn complex technologies, just describe your needs in natural language.
- ⚡ Lightning-Fast Delivery: From idea to a usable role, the whole process takes 2 minutes.
- 🎭 Professional Quality: Automatically generates professional AI roles that comply with DPML standards.
- 🔄 Plug-and-Play: Can be activated and used immediately after creation.
- 💝 Sense of Control: A magnificent turn from a user to a creator.
✨ Usage Scenarios Examples
| 🎯 User Need | ⚡ Nuwa Generated | 🚀 Ready to Use |
|---|---|---|
| 👩💼 "I need an AI assistant who understands Xiaohongshu marketing" | Xiaohongshu Marketing Expert Role | Activate Xiaohongshu Marketing Expert |
| 👨💻 "I want a Python asynchronous programming expert" | Python Asynchronous Programming Tutor Role | Activate Python Asynchronous Programming Tutor |
| 🎨 "Give me a UI/UX design consultant" | UI/UX Design Expert Role | Activate UI/UX Design Expert |
| 📊 "I need a data analyst assistant" | Data Analysis Expert Role | Activate Data Analysis Expert |
🎪 Experience Nuwa's Creativity - 4 Steps to Create a Custom AI Assistant
# 1️⃣ Activate the Nuwa Role Creation Consultant
"I want Nuwa to help me create a role"
# 2️⃣ Describe your needs (natural language is fine)
"I need a professional assistant in [domain], mainly for [specific scenario]"
# 3️⃣ Wait 2 minutes for Nuwa to generate a professional role for you
# Nuwa will create the role file, register it with the system, and complete quality checks
# 4️⃣ Immediately activate and use your custom AI assistant
"Activate the role just created"
🌟 Nuwa's Design Philosophy
- 🎯 Boundless Creation: Allows anyone with an idea to create an AI assistant, breaking down technical barriers.
- ⚡ Instant Gratification: Meets the demand for immediacy in the digital age.
- 🧠 Guided Growth: It's not just about using a tool, but also guiding users to understand the boundaries of AI capabilities.
- 🌱 Ecosystem Co-creation: The roles created by each user can become a source of inspiration for others.
📋 Practice Cases: Legacy Lands Library
📖 Project Overview
Project Name: Legacy Lands Library
Project URL: https://github.com/LegacyLands/legacy-lands-library
Project Description: legacy-lands-library is a development toolkit library for modern Minecraft server plugin development. It aims to provide developers with a cross-platform, production-ready infrastructure.
🏢 Organization Information
Organization Name: Legacy Lands
Official Website: https://www.legacylands.cn/
Organization Description: Legacy Lands is an innovative team focused on building large-scale Minecraft civilization simulation experiences. They participate in the open-source community, providing elegant, efficient, and reliable solutions for areas such as Minecraft server plugins.
💡 Core Developer's Experience
"The development experience with PromptX is truly different. Our team, using Claude Code combined with PromptX, had one developer complete over 11,000 lines of high-quality Java code in just three days.
The value of this workflow is fully demonstrated in actual development. PromptX solves many pain points of using AI, ensuring consistent code style and quality standards at all times, which greatly reduces the learning curve for new members. Best practices that used to require repeated communication and reliance on documentation are now naturally integrated into every code generation."
"'Nuwa' makes it more convenient and faster for me to use AI roles. I found that I don't need to know how to code or understand complex AI principles. I just need to tell 'Nuwa' what I want in plain language, and it can handle the complex design work behind the scenes and guide me through the rest. 'Nuwa' itself doesn't write Little Red Book notes, but it can create an expert 'proficient in Little Red Book marketing'. Once this expert is created, I can hand over all my future Little Red Book related work to this new role, which greatly improves efficiency and professionalism."
📚 Related Resources
- AI Integration Standards & Practice Guide: https://github.com/LegacyLands/legacy-lands-library/blob/main/AI_CODE_STANDARDS_ZHCN.md
📚 Community Tutorials & Cases
Community member coso developed an MCP tool based on the PromptX architecture and shared the complete development experience:
🔧 Developing the crawl-mcp tool with the PromptX architecture
- Article: From Idea to Product: How I Developed an Intelligent Content Processing MCP Tool with Cursor Agent
- Outcome: crawl-mcp-server - NPM package | GitHub
- Highlight: Using PromptX as an architectural reference, achieved zero-code development, from idea to release in just a few hours.
🛠️ Templated Practice for MCP Development
- Article: From Zero Code to Open Source: How I Revolutionized MCP Development with a Template
- Outcome: mcp-template - A universal MCP development template
- Value: Reduced MCP development time from 40 hours to 30 minutes.
💡 We welcome community members to share their practical experience with PromptX. Submit a PR to add it here.
⭐ Star Growth Trend
🤝 Contribution & Communication
We welcome any form of contribution and feedback!
- 🌿 Branching Strategy - Branching and release process
- 🚀 Release Process - Version management and release documentation
Scan the QR code to join our tech community group:
📄 License
MIT License - Making professional AI capabilities accessible.
🚀 Get Started Now: Launch PromptX MCP Server and enhance your AI application with professional capabilities!





