Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Point the plugin at the skills folder so the install cache stays small (issue #650)

Nguyen Xuan Ane4d833db48aa
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index b74cf0bf..3b3a40ba 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -5,10 +5,21 @@
"plugins": [
{
"name": "67js",
- "source": "./",
+ "source": "./skills",
+ "strict": false,
"description": "The 67js MCP server and the build-67js-scene and render-67js-media skills.",
"version": "0.16.0",
- "category": "development"
+ "category": "development",
+ "homepage": "https://67js.codepawl.com",
+ "repository": "https://github.com/codepawl/67.js",
+ "license": "MIT",
+ "skills": ["./build-67js-scene", "./render-67js-media"],
+ "mcpServers": {
+ "67js": {
+ "command": "npx",
+ "args": ["-y", "-p", "@codepawlhq/67js", "67js-mcp"]
+ }
+ }
}
]
}
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
deleted file mode 100644
index f4cc22c5..00000000
--- a/.claude-plugin/plugin.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "67js",
- "version": "0.16.0",
- "description": "Build, light, film and render 3D scenes through the 67js MCP server, with the skills that teach an agent to drive it.",
- "author": { "name": "CodePawl", "url": "https://67js.codepawl.com" },
- "homepage": "https://67js.codepawl.com",
- "repository": "https://github.com/codepawl/67.js",
- "license": "MIT",
- "keywords": ["3d", "mcp", "three.js", "render", "scene"],
- "skills": ["./skills/build-67js-scene", "./skills/render-67js-media"],
- "mcpServers": {
- "67js": {
- "command": "npx",
- "args": ["-y", "-p", "@codepawlhq/67js", "67js-mcp"]
- }
- }
-}
diff --git a/scripts/sync-plugin-version.mjs b/scripts/sync-plugin-version.mjs
index fe9d3086..60a30443 100644
--- a/scripts/sync-plugin-version.mjs
+++ b/scripts/sync-plugin-version.mjs
@@ -1,22 +1,13 @@
-// Copies the version in package.json into the Claude Code plugin manifest and the marketplace entry.
+// Copies the version in package.json into the Claude Code marketplace entry.
// Run it with `npm run plugin:sync` after bumping the version for a release.
import { readFile, writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';
const root = resolve(import.meta.dirname, '..');
const packageMetadata = JSON.parse(await readFile(resolve(root, 'package.json'), 'utf8'));
+const marketplacePath = resolve(root, '.claude-plugin/marketplace.json');
+const marketplace = JSON.parse(await readFile(marketplacePath, 'utf8'));
-async function updateJson(relativePath, update) {
- const filePath = resolve(root, relativePath);
- const document = JSON.parse(await readFile(filePath, 'utf8'));
- update(document);
- await writeFile(filePath, `${JSON.stringify(document, null, 2)}\n`);
-}
-
-await updateJson('.claude-plugin/plugin.json', (manifest) => {
- manifest.version = packageMetadata.version;
-});
-await updateJson('.claude-plugin/marketplace.json', (marketplace) => {
- for (const plugin of marketplace.plugins) plugin.version = packageMetadata.version;
-});
+for (const plugin of marketplace.plugins) plugin.version = packageMetadata.version;
+await writeFile(marketplacePath, `${JSON.stringify(marketplace, null, 2)}\n`);
console.log(`Claude Code plugin set to ${packageMetadata.version}.`);
diff --git a/tests/claude-plugin.test.js b/tests/claude-plugin.test.js
index 0dd5d0ce..151db6dc 100644
--- a/tests/claude-plugin.test.js
+++ b/tests/claude-plugin.test.js
@@ -3,35 +3,30 @@ import assert from 'node:assert/strict';
import { existsSync, readFileSync } from 'node:fs';
import packageMetadata from '../package.json' with { type: 'json' };
-function readJson(relativePath) {
- return JSON.parse(readFileSync(new URL(`../${relativePath}`, import.meta.url), 'utf8'));
-}
-
-const manifest = readJson('.claude-plugin/plugin.json');
-const marketplace = readJson('.claude-plugin/marketplace.json');
+const marketplace = JSON.parse(readFileSync(new URL('../.claude-plugin/marketplace.json', import.meta.url), 'utf8'));
+const [plugin] = marketplace.plugins;
const syncHint = 'Run `npm run plugin:sync` to copy the version from package.json.';
-test('the plugin manifest version matches package.json', () => {
- assert.equal(manifest.version, packageMetadata.version, syncHint);
+test('the marketplace lists one plugin whose version matches package.json', () => {
+ assert.equal(marketplace.plugins.length, 1);
+ assert.equal(plugin.name, '67js');
+ assert.equal(plugin.version, packageMetadata.version, syncHint);
});
-test('every marketplace entry matches the plugin name and version', () => {
- assert.ok(marketplace.plugins.length > 0);
- for (const plugin of marketplace.plugins) {
- assert.equal(plugin.name, manifest.name);
- assert.equal(plugin.version, packageMetadata.version, syncHint);
- }
+test('the plugin source is the skills folder, so the install cache stays small', () => {
+ assert.equal(plugin.source, './skills');
+ assert.equal(plugin.strict, false);
});
test('the plugin ships both skills that exist in the repository', () => {
- assert.deepEqual(manifest.skills, ['./skills/build-67js-scene', './skills/render-67js-media']);
- for (const skillPath of manifest.skills) {
- assert.ok(existsSync(new URL(`../${skillPath}/SKILL.md`, import.meta.url)), `${skillPath} has no SKILL.md`);
+ assert.deepEqual(plugin.skills, ['./build-67js-scene', './render-67js-media']);
+ for (const skillPath of plugin.skills) {
+ assert.ok(existsSync(new URL(`../skills/${skillPath}/SKILL.md`, import.meta.url)), `${skillPath} has no SKILL.md`);
}
});
test('the plugin starts the published MCP bin and the npm package ships its files', () => {
- const server = manifest.mcpServers['67js'];
+ const server = plugin.mcpServers['67js'];
assert.equal(server.command, 'npx');
const [binName] = Object.keys(packageMetadata.bin);
assert.deepEqual(server.args, ['-y', '-p', packageMetadata.name, binName]);