promptgraph-mcp 2.9.5 → 2.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +8 -0
- package/.mcp.json +6 -0
- package/commands/install.js +40 -0
- package/index.js +3 -1
- package/opencode-plugin.js +14 -0
- package/package.json +8 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "promptgraph",
|
|
3
|
+
"description": "Semantic skill router for Claude Code — search and load only the skills you need, saving 20k+ tokens per session. Includes a marketplace with 40+ community skill bundles.",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "NeiP4n"
|
|
6
|
+
},
|
|
7
|
+
"homepage": "https://github.com/NeiP4n/promptgraph"
|
|
8
|
+
}
|
package/.mcp.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { success, error, info } from '../cli.js';
|
|
3
|
+
|
|
4
|
+
export default async function handler(args, bin) {
|
|
5
|
+
const query = args.slice(1).join(' ').trim();
|
|
6
|
+
if (!query) {
|
|
7
|
+
console.log(chalk.yellow('Usage: ') + chalk.white(`${bin} install <bundle-name>`));
|
|
8
|
+
console.log(chalk.gray(' Examples:'));
|
|
9
|
+
console.log(chalk.gray(` ${bin} install engineering-best-practices`));
|
|
10
|
+
console.log(chalk.gray(` ${bin} install pg-000001`));
|
|
11
|
+
console.log(chalk.gray(` ${bin} install "LLM Prompts"`));
|
|
12
|
+
console.log(chalk.gray(`\n Browse: ${bin} marketplace\n`));
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { installBundle } = await import('../marketplace.js');
|
|
17
|
+
const ora = (await import('ora')).default;
|
|
18
|
+
|
|
19
|
+
const spinner = ora({ text: chalk.gray(`Installing "${query}"...`), color: 'magenta' }).start();
|
|
20
|
+
const result = await installBundle(query);
|
|
21
|
+
spinner.stop();
|
|
22
|
+
|
|
23
|
+
if (result.error) {
|
|
24
|
+
error(result.error);
|
|
25
|
+
console.log(chalk.gray(` Try: ${bin} marketplace (browse & search)`));
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (result.type === 'repo_import') {
|
|
30
|
+
success(`Installed ${chalk.white(result.bundle)}`);
|
|
31
|
+
info(chalk.gray(`Run ${chalk.white('pg reindex')} to enable semantic search`));
|
|
32
|
+
} else {
|
|
33
|
+
const ok = result.installed?.length ?? 0;
|
|
34
|
+
const fail = result.failed?.length ?? 0;
|
|
35
|
+
success(`Installed ${chalk.white(result.bundle)} — ${ok} skill${ok !== 1 ? 's' : ''}${fail > 0 ? chalk.red(` (${fail} failed)`) : ''}`);
|
|
36
|
+
if (ok > 0) info(chalk.gray(`Run ${chalk.white('pg reindex')} to enable semantic search`));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const args = process.argv.slice(2);
|
|
|
18
18
|
const rawBin = process.argv[1]?.split(/[\\/]/).pop()?.replace(/\.js$/, '');
|
|
19
19
|
const bin = (rawBin && rawBin !== 'index') ? rawBin : 'pg';
|
|
20
20
|
|
|
21
|
-
const KNOWN_COMMANDS = new Set(['init', 'reindex', 'update', 'import', 'setup', 'validate', 'marketplace', 'doctor', 'search', 'help', '--help', '-h', 'bundle', 'status', 'train']);
|
|
21
|
+
const KNOWN_COMMANDS = new Set(['init', 'reindex', 'update', 'import', 'install', 'setup', 'validate', 'marketplace', 'doctor', 'search', 'help', '--help', '-h', 'bundle', 'status', 'train']);
|
|
22
22
|
|
|
23
23
|
function showHelp() {
|
|
24
24
|
console.log(
|
|
@@ -35,6 +35,7 @@ function showHelp() {
|
|
|
35
35
|
['search <query>', 'Search skills from the terminal'],
|
|
36
36
|
['import <owner/repo>', 'Import skills from GitHub'],
|
|
37
37
|
['status', 'Show installed skills, repos, and bundles'],
|
|
38
|
+
['install <name>', 'Install a bundle by name, code, or id'],
|
|
38
39
|
['marketplace', 'Interactive TUI: browse + search + install skills & bundles'],
|
|
39
40
|
['bundle update [id]', 'Update all (or one) installed GitHub bundles'],
|
|
40
41
|
['validate <file.md>', 'Validate a skill before publishing'],
|
|
@@ -81,6 +82,7 @@ const COMMAND_MAP = {
|
|
|
81
82
|
search: './commands/search.js',
|
|
82
83
|
bundle: './commands/bundle.js',
|
|
83
84
|
import: './commands/import.js',
|
|
85
|
+
install: './commands/install.js',
|
|
84
86
|
setup: './commands/setup.js',
|
|
85
87
|
init: './commands/init.js',
|
|
86
88
|
update: './commands/update.js',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const PromptGraph = async () => {
|
|
2
|
+
return {
|
|
3
|
+
config: async (config) => {
|
|
4
|
+
config.mcp = config.mcp || {};
|
|
5
|
+
config.mcp.promptgraph = {
|
|
6
|
+
type: 'local',
|
|
7
|
+
command: ['npx', 'promptgraph-mcp'],
|
|
8
|
+
enabled: true,
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default PromptGraph;
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "promptgraph-mcp",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"files": [
|
|
5
5
|
"*.js",
|
|
6
6
|
"commands/",
|
|
7
7
|
"src/",
|
|
8
|
-
"README.md"
|
|
8
|
+
"README.md",
|
|
9
|
+
".claude-plugin/",
|
|
10
|
+
".mcp.json"
|
|
9
11
|
],
|
|
10
12
|
"main": "index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./index.js",
|
|
15
|
+
"./plugin": "./opencode-plugin.js"
|
|
16
|
+
},
|
|
11
17
|
"type": "module",
|
|
12
18
|
"bin": {
|
|
13
19
|
"pg": "index.js",
|