@mockingbird_konwlage_cli/cli 1.0.0 → 1.0.1
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/index.js +41 -9
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -28,18 +28,28 @@ program
|
|
|
28
28
|
// First, try to see if it matches our known internal mapping
|
|
29
29
|
const repoMap = {
|
|
30
30
|
"anthropic-skills": "anthropics/skills/main/skills",
|
|
31
|
+
"anthropics": "anthropics/skills/main/skills",
|
|
31
32
|
"awesome-copilot": "github/awesome-copilot/main/skills",
|
|
33
|
+
"github": "github/awesome-copilot/main/skills",
|
|
34
|
+
"google-gemini": "google-gemini/gemini-cli/main/.gemini/skills",
|
|
32
35
|
"gemini-cli": "google-gemini/gemini-cli/main/.gemini/skills",
|
|
33
36
|
"openai-skills": "openai/skills/main/skills",
|
|
37
|
+
"openai": "openai/skills/main/skills",
|
|
34
38
|
"playwright-skills": "microsoft/playwright/main/packages/playwright/src/skill",
|
|
39
|
+
"microsoft": "microsoft/playwright/main/packages/playwright/src/skill",
|
|
35
40
|
"pytorch-skills": "pytorch/pytorch/main/.claude/skills",
|
|
41
|
+
"pytorch": "pytorch/pytorch/main/.claude/skills",
|
|
36
42
|
"antfu-skills": "antfu/skills/main/skills",
|
|
43
|
+
"antfu": "antfu/skills/main/skills",
|
|
37
44
|
"dimillian-skills": "Dimillian/Skills/main",
|
|
45
|
+
"dimillian": "Dimillian/Skills/main",
|
|
38
46
|
"prompts-chat-skills": "f/prompts.chat/main/.windsurf/skills",
|
|
39
|
-
"
|
|
47
|
+
"f": "f/prompts.chat/main/.windsurf/skills",
|
|
48
|
+
"huggingface-skills": "huggingface/skills/main/skills",
|
|
49
|
+
"huggingface": "huggingface/skills/main/skills"
|
|
40
50
|
};
|
|
41
51
|
|
|
42
|
-
let
|
|
52
|
+
let urlsToTry = [];
|
|
43
53
|
|
|
44
54
|
if (slug.includes('/')) {
|
|
45
55
|
const parts = slug.split('/');
|
|
@@ -47,24 +57,46 @@ program
|
|
|
47
57
|
const skillName = parts[1];
|
|
48
58
|
|
|
49
59
|
if (repoMap[prefix]) {
|
|
50
|
-
|
|
60
|
+
urlsToTry.push(`https://raw.githubusercontent.com/${repoMap[prefix]}/${skillName}/SKILL.md`);
|
|
61
|
+
// Also try master just in case the mapping branch is old
|
|
62
|
+
urlsToTry.push(`https://raw.githubusercontent.com/${repoMap[prefix].replace('/main/', '/master/')}/${skillName}/SKILL.md`);
|
|
51
63
|
} else {
|
|
52
64
|
// Generic fallback for org/repo/skillname
|
|
53
65
|
let filePath = parts.slice(2).join('/') || 'SKILL.md';
|
|
54
66
|
if (!filePath.endsWith('.md')) {
|
|
55
67
|
filePath += filePath ? '/SKILL.md' : 'SKILL.md';
|
|
56
68
|
}
|
|
57
|
-
|
|
69
|
+
urlsToTry.push(`https://raw.githubusercontent.com/${parts[0]}/${parts[1]}/main/${filePath}`);
|
|
70
|
+
urlsToTry.push(`https://raw.githubusercontent.com/${parts[0]}/${parts[1]}/master/${filePath}`);
|
|
58
71
|
}
|
|
59
72
|
} else {
|
|
60
|
-
|
|
73
|
+
urlsToTry.push(`https://raw.githubusercontent.com/mockingbird-ai/skills/main/${slug}/SKILL.md`);
|
|
74
|
+
urlsToTry.push(`https://raw.githubusercontent.com/mockingbird-ai/skills/master/${slug}/SKILL.md`);
|
|
61
75
|
}
|
|
62
76
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
let skillContent = null;
|
|
78
|
+
let successfulUrl = '';
|
|
79
|
+
|
|
80
|
+
for (const url of urlsToTry) {
|
|
81
|
+
try {
|
|
82
|
+
process.stdout.write(chalk.gray(`Probing: ${url} ... `));
|
|
83
|
+
const response = await axios.get(url, { timeout: 5000 });
|
|
84
|
+
skillContent = response.data;
|
|
85
|
+
successfulUrl = url;
|
|
86
|
+
console.log(chalk.green('OK'));
|
|
87
|
+
break;
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.log(chalk.red('NOT FOUND'));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
67
92
|
|
|
93
|
+
if (!skillContent) {
|
|
94
|
+
console.error(chalk.red(`\n✖ Error: Failed to find SKILL.md for '${slug}' after trying ${urlsToTry.length} locations.`));
|
|
95
|
+
console.error(chalk.gray(`Please verify the slug and ensure the repository contains a SKILL.md file.`));
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
try {
|
|
68
100
|
await installForAgent(agent, slug, skillContent);
|
|
69
101
|
console.log(chalk.green(`\n✓ Successfully installed skill '${slug}' for ${agent}!`));
|
|
70
102
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mockingbird_konwlage_cli/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Mockingbird AI Developer Client CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"mockingbird-cli": "
|
|
8
|
-
"
|
|
7
|
+
"mockingbird-cli": "index.js",
|
|
8
|
+
"cli": "index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|