用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/zhaixin244-wq/fnw --skill rag-setup-project命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | rag-setup-project |
| description | Set up LightRAG persistent memory for a Cursor project with MCP configuration |
| version | 1.0.0 |
| model | sonnet |
| triggers | ["/rag-setup-project","add memory to this project","setup project rag"] |
Set up a project-level LightRAG knowledge graph instance for the current Cursor project. Creates the MCP configuration so Claude Code can query and store project-specific memory.
.cursor/mcp.json in the project root with the LightRAG MCP server entryIf .cursor/mcp.json does NOT exist:
node -e "
const fs = require('fs');
const config = {
mcpServers: {
'lightrag-projects': {
command: 'npx',
args: ['-y', 'lightrag-mcp@latest'],
env: {
LIGHTRAG_URL: 'http://YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT',
LIGHTRAG_API_KEY: process.env.LIGHTRAG_API_KEY || 'YOUR_API_KEY'
}
}
}
};
fs.mkdirSync('.cursor', { recursive: true });
fs.writeFileSync('.cursor/mcp.json', JSON.stringify(config, null, 2));
console.log('Created .cursor/mcp.json');
"
If .cursor/mcp.json already exists, merge:
node -e "
const fs = require('fs');
const existing = JSON.parse(fs.readFileSync('.cursor/mcp.json', 'utf-8'));
existing.mcpServers = existing.mcpServers || {};
existing.mcpServers['lightrag-projects'] = {
command: 'npx',
args: ['-y', 'lightrag-mcp@latest'],
env: {
LIGHTRAG_URL: 'http://YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT',
LIGHTRAG_API_KEY: process.env.LIGHTRAG_API_KEY || 'YOUR_API_KEY'
}
};
fs.writeFileSync('.cursor/mcp.json', JSON.stringify(existing, null, 2));
console.log('Merged lightrag-projects into existing .cursor/mcp.json');
"
Suggest adding .cursor/ to .gitignore if not already present:
node -e "
const fs = require('fs');
const gitignore = fs.existsSync('.gitignore') ? fs.readFileSync('.gitignore', 'utf-8') : '';
if (!gitignore.includes('.cursor')) {
fs.appendFileSync('.gitignore', '\n# Cursor IDE config\n.cursor/\n');
console.log('Added .cursor/ to .gitignore');
} else {
console.log('.cursor/ already in .gitignore');
}
"
If the user wants to seed the project graph with existing docs:
node -e "
const fs = require('fs');
const BASE = 'http://YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT';
const API_KEY = process.env.LIGHTRAG_API_KEY || 'YOUR_API_KEY';
const files = ['README.md', 'package.json', 'ARCHITECTURE.md', 'CLAUDE.md']
.filter(f => fs.existsSync(f));
(async () => {
for (const file of files) {
const text = fs.readFileSync(file, 'utf-8');
await fetch(BASE + '/documents/text', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
body: JSON.stringify({
file_source: '[SEED] ' + file + ' — project bootstrap',
text: text.slice(0, 10000)
})
});
console.log('Seeded:', file);
}
console.log('Done. Seeded ' + files.length + ' files.');
})();
"
/rag-project-query to query project memory/rag-project-remember to store project-specific knowledge/rag-project-sync at end of session to persist learnings