agkit 0.7.0

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/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "agkit",
3
+ "version": "0.7.0",
4
+ "description": "Scaffold and manage plugin marketplaces for Claude Code and GitHub Copilot, distributed via any Git host (GitHub, GitLab, Bitbucket, Gitea, self-hosted). Init, add plugins from built-in or remote templates, sync, validate, bump.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "agkit": "./dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "templates",
13
+ "README.md"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18.0.0"
17
+ },
18
+ "scripts": {
19
+ "build": "tsup",
20
+ "dev": "tsup --watch",
21
+ "typecheck": "tsc --noEmit",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "claude",
26
+ "claude-code",
27
+ "github-copilot",
28
+ "copilot",
29
+ "plugin",
30
+ "marketplace",
31
+ "scaffold",
32
+ "cli",
33
+ "generator",
34
+ "agentic"
35
+ ],
36
+ "dependencies": {
37
+ "@clack/prompts": "^0.11.0",
38
+ "commander": "^14.0.0",
39
+ "picocolors": "^1.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^22.0.0",
43
+ "tsup": "^8.0.0",
44
+ "typescript": "^5.6.0"
45
+ }
46
+ }
@@ -0,0 +1,32 @@
1
+ # {{marketplaceName}}
2
+
3
+ {{description}}
4
+
5
+ A [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces): a Git repository whose `.claude-plugin/marketplace.json` catalog is consumed by AI coding agents. Works from any Git host.
6
+
7
+ ## Install
8
+
9
+ {{installSections}}
10
+
11
+ ## Team setup (automatic installation)
12
+
13
+ {{teamSections}}
14
+
15
+ ## Available plugins
16
+
17
+ <!-- agkit:plugins:start -->
18
+ _No plugins yet. Add one with `agkit add <template> <name>`._
19
+ <!-- agkit:plugins:end -->
20
+
21
+ ## Development
22
+
23
+ This marketplace is managed with [agkit](https://www.npmjs.com/package/agkit):
24
+
25
+ ```bash
26
+ agkit add skill my-skill # scaffold a new plugin from a template
27
+ agkit sync # reconcile marketplace.json with plugins/
28
+ agkit validate # check the catalog before pushing
29
+ agkit bump my-skill --tag # version a plugin from conventional commits
30
+ ```
31
+
32
+ The catalog lives in `.claude-plugin/marketplace.json`; each plugin lives in `plugins/<name>/` with its own `.claude-plugin/plugin.json` manifest. Target agents are recorded in `metadata.targets`.
@@ -0,0 +1,19 @@
1
+ name: Validate marketplace
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ validate:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: 22
16
+ - name: Validate catalog
17
+ run: npx --yes agkit validate
18
+ - name: Check tier-2 artifacts are fresh
19
+ run: npx --yes agkit build --check
@@ -0,0 +1,8 @@
1
+ validate-marketplace:
2
+ image: node:22
3
+ rules:
4
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
5
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
6
+ script:
7
+ - npx --yes agkit validate
8
+ - npx --yes agkit build --check
@@ -0,0 +1,7 @@
1
+ {
2
+ "extraKnownMarketplaces": {
3
+ "{{marketplaceName}}": {
4
+ "source": {{teamSource}}
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{pluginName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}}",
5
+ "author": {
6
+ "name": "{{authorName}}"
7
+ }
8
+ }
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: {{pluginName}}
3
+ description: {{description}} Use this agent when... (Claude reads this to decide when to delegate to it.)
4
+ ---
5
+
6
+ You are {{pluginTitle}}, a specialist subagent.
7
+
8
+ ## Role
9
+
10
+ Describe the agent's expertise and scope. Be specific: a narrow, well-defined
11
+ role outperforms a generalist description.
12
+
13
+ ## Process
14
+
15
+ 1. How the agent should approach a task.
16
+ 2. What it must verify before answering.
17
+
18
+ ## Output
19
+
20
+ Describe the structure and tone of the agent's responses.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{pluginName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}}",
5
+ "author": {
6
+ "name": "{{authorName}}"
7
+ }
8
+ }
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: {{description}}
3
+ argument-hint: [target]
4
+ ---
5
+
6
+ # {{pluginTitle}}
7
+
8
+ You are executing the /{{pluginName}} command. The user invoked it with:
9
+ $ARGUMENTS
10
+
11
+ ## Instructions
12
+
13
+ 1. Describe precisely what Claude must do when this command runs.
14
+ 2. Reference $ARGUMENTS wherever the user input matters.
15
+ 3. State the expected output format.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{pluginName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}}",
5
+ "author": {
6
+ "name": "{{authorName}}"
7
+ }
8
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PostToolUse": [
4
+ {
5
+ "matcher": "Write|Edit",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/{{pluginName}}.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+ # {{pluginTitle}} — PostToolUse hook (fires after Write|Edit succeeds).
3
+ # Claude Code pipes the event JSON on stdin. Exit 0 = OK; exit 2 = block
4
+ # with feedback (stderr is shown to Claude). Other events: PreToolUse,
5
+ # UserPromptSubmit, SessionStart, Stop... (see hooks reference).
6
+ set -euo pipefail
7
+
8
+ input=$(cat)
9
+ file_path=$(printf '%s' "$input" | grep -o '"file_path"[^,}]*' | head -1 | cut -d'"' -f4 || true)
10
+
11
+ # TODO: implement your check. Example: fail if a TODO marker slips in.
12
+ # if [ -n "$file_path" ] && grep -q "DO-NOT-COMMIT" "$file_path"; then
13
+ # echo "Blocked: $file_path contains DO-NOT-COMMIT" >&2
14
+ # exit 2
15
+ # fi
16
+
17
+ exit 0
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{pluginName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}}",
5
+ "author": {
6
+ "name": "{{authorName}}"
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "{{pluginName}}": {
4
+ "command": "node",
5
+ "args": ["${CLAUDE_PLUGIN_ROOT}/servers/{{pluginName}}.mjs"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * {{pluginTitle}} — minimal MCP stdio server, zero dependencies.
4
+ * Implements just enough JSON-RPC for Claude Code: initialize,
5
+ * tools/list, tools/call. Replace the example tool with your own,
6
+ * or migrate to @modelcontextprotocol/sdk when it grows.
7
+ */
8
+ import { createInterface } from "node:readline";
9
+
10
+ const TOOLS = [
11
+ {
12
+ name: "{{pluginName}}_echo",
13
+ description: "Example tool: echoes the provided text back. Replace me.",
14
+ inputSchema: {
15
+ type: "object",
16
+ properties: { text: { type: "string", description: "Text to echo" } },
17
+ required: ["text"],
18
+ },
19
+ },
20
+ ];
21
+
22
+ async function callTool(name, args) {
23
+ switch (name) {
24
+ case "{{pluginName}}_echo":
25
+ return { content: [{ type: "text", text: `Echo: ${args.text}` }] };
26
+ default:
27
+ throw new Error(`Unknown tool: ${name}`);
28
+ }
29
+ }
30
+
31
+ const send = (msg) => process.stdout.write(JSON.stringify(msg) + "\n");
32
+
33
+ createInterface({ input: process.stdin }).on("line", async (line) => {
34
+ if (!line.trim()) return;
35
+ let req;
36
+ try { req = JSON.parse(line); } catch { return; }
37
+ const { id, method, params } = req;
38
+ try {
39
+ if (method === "initialize") {
40
+ send({ jsonrpc: "2.0", id, result: {
41
+ protocolVersion: params?.protocolVersion ?? "2025-06-18",
42
+ capabilities: { tools: {} },
43
+ serverInfo: { name: "{{pluginName}}", version: "0.1.0" },
44
+ }});
45
+ } else if (method === "notifications/initialized") {
46
+ // notification: no response
47
+ } else if (method === "tools/list") {
48
+ send({ jsonrpc: "2.0", id, result: { tools: TOOLS } });
49
+ } else if (method === "tools/call") {
50
+ const result = await callTool(params.name, params.arguments ?? {});
51
+ send({ jsonrpc: "2.0", id, result });
52
+ } else if (id !== undefined) {
53
+ send({ jsonrpc: "2.0", id, error: { code: -32601, message: `Method not found: ${method}` } });
54
+ }
55
+ } catch (err) {
56
+ if (id !== undefined) {
57
+ send({ jsonrpc: "2.0", id, error: { code: -32000, message: String(err?.message ?? err) } });
58
+ }
59
+ }
60
+ });
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "{{pluginName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}}",
5
+ "author": {
6
+ "name": "{{authorName}}"
7
+ }
8
+ }
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: {{pluginName}}
3
+ description: "{{description}} Describe here WHEN Claude should load this skill: trigger words, file types, or situations. This description is what Claude reads to decide whether the skill is relevant."
4
+ ---
5
+
6
+ # {{pluginTitle}}
7
+
8
+ Explain the knowledge or procedure this skill provides. Claude loads this
9
+ file on demand, so write it as instructions to a competent colleague.
10
+
11
+ ## When to use
12
+
13
+ - Situation 1
14
+ - Situation 2
15
+
16
+ ## Instructions
17
+
18
+ 1. Step one
19
+ 2. Step two
20
+
21
+ ## Examples
22
+
23
+ Provide at least one concrete example of correct application.