你的 prompts、tools、agent 配置散落在各处——文件里、Notion 里、脑子里。ResourceX 提供:
- 统一格式打包任何 AI 资源
- 版本控制,像 npm 包一样管理
- MCP 集成,让 Claude 直接使用你的资源
简单说,AI 资源的 npm。
Claude Desktop (~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"resourcex": {
"command": "npx",
"args": ["@resourcexjs/mcp-server"]
}
}
}VS Code (Claude 扩展设置):
{
"claude.mcpServers": {
"resourcex": {
"command": "npx",
"args": ["@resourcexjs/mcp-server"]
}
}
}You: 搜索 code review 相关的资源
Claude: [调用 search("code review")] 找到以下资源...
You: 用 code-review:1.0.0 审查这段代码
Claude: [调用 use("code-review:1.0.0")] 好的,让我用这个 prompt 来审查...
就这样,Claude 现在可以访问和使用 ResourceX 资源了。
创建自己的资源
# 创建资源目录
mkdir my-prompt && cd my-prompt
# 创建元信息
cat > resource.json << 'EOF'
{
"name": "my-prompt",
"type": "text",
"version": "1.0.0"
}
EOF
# 创建内容
echo "You are a helpful assistant specialized in..." > content
# 添加到本地
npx @resourcexjs/cli add .使用 CLI 管理资源
# 安装
npm install -g @resourcexjs/cli
# 常用命令
rx add ./my-prompt # 添加本地资源
rx list # 列出所有资源
rx use name:1.0.0 # 使用资源
rx search keyword # 搜索资源
rx push name:1.0.0 # 发布到 registry
rx pull name:1.0.0 # 从 registry 拉取详见 CLI 文档
在代码中使用 SDK
npm install resourcexjsimport { createResourceX } from "resourcexjs";
const rx = createResourceX();
// 添加资源
await rx.add("./my-prompt");
// 解析并执行
const result = await rx.resolve("my-prompt:1.0.0");
console.log(result.content);
// 搜索资源
const results = await rx.search("code review");详见 SDK 文档
自托管 Registry
import { createRegistryServer } from "@resourcexjs/server";
const app = createRegistryServer({
storagePath: "./data",
});
export default app; // 部署到任何支持 Hono 的平台详见 Server 文档
教程 - 入门指南
指南 - 特定任务
- MCP 集成 - 配置 AI Agent
- 开发工作流 - link 实时开发
- 版本管理 - 管理资源版本
- 自托管 Registry - 部署自己的 Registry
参考 - 技术文档
概念 - 原理解释
| 包 | 描述 |
|---|---|
@resourcexjs/cli |
rx 命令行工具 |
@resourcexjs/mcp-server |
MCP Server,用于 AI Agent 集成 |
resourcexjs |
SDK |
@resourcexjs/server |
自托管 Registry Server |
内部包(开发者)
| 包 | 描述 |
|---|---|
@resourcexjs/core |
核心原语 (RXI, RXL, RXM, RXA, RXR) |
@resourcexjs/storage |
存储后端 |
@resourcexjs/registry |
Registry 实现 |
@resourcexjs/loader |
资源加载 |
@resourcexjs/type |
类型系统 |
@resourcexjs/arp |
底层 I/O 协议 |
Deepractice AI 基础设施的一部分:
由 Deepractice 用 ❤️ 构建