god-prompt-mcp 1.0.44 → 1.0.45

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/README.md CHANGED
@@ -64,13 +64,17 @@ For the lowest-friction ChatGPT path, install [GodPrompt from the first-party Pl
64
64
 
65
65
  ### ChatGPT (hosted remote MCP)
66
66
 
67
- On ChatGPT web, supported Business and Enterprise/Edu workspaces can connect the hosted endpoint as a custom MCP app in Developer Mode:
67
+ On ChatGPT web, supported Business and Enterprise/Edu workspaces can connect GodPrompt's hosted endpoint as a custom MCP plugin. Workspace permissions apply: Business admins/owners can create connections; Enterprise/Edu admins/owners and specifically authorized developers can create connections, while only admins/owners publish them for a workspace.
68
68
 
69
- 1. Enable Developer Mode, then open **Settings > Apps > Create** (workspace controls may require an admin or authorized developer).
70
- 2. Use `https://god-prompt-mcp.tomi-seregi99.workers.dev/mcp` as the MCP endpoint and select no authentication.
71
- 3. Choose **Scan Tools**, confirm the seven read-only GodPrompt tools, then create and enable the app for the intended workspace users.
69
+ 1. Open **Plugins**, select **+**, then **Add custom MCP server**. The current Plugins flow does **not** require Developer Mode.
70
+ 2. Enter a name and `https://god-prompt-mcp.tomi-seregi99.workers.dev/mcp` as the public HTTPS MCP endpoint. Choose **no authentication**; GodPrompt requires no API key.
71
+ 3. Review the risk warning and select **I understand and want to continue**, then **Create as a plugin**.
72
+ 4. Review the discovered seven read-only GodPrompt tools and metadata, then install the plugin if your workspace permits it.
73
+ 5. Start a new ChatGPT chat, type `@`, select the installed GodPrompt plugin, and try a read-only tool. Workspace approval may be required.
72
74
 
73
- ChatGPT connects to remote MCP servers rather than local stdio servers. See OpenAI's [Developer mode and MCP apps in ChatGPT](https://help.openai.com/en/articles/12584461-developer-mode-and-mcp-apps-in-chatgpt) documentation for current availability and workspace controls.
75
+ **Legacy custom-app setup:** If your workspace still uses the older interface, open **Settings > Apps > Create** (or the workspace's app settings, if you are an admin/owner), use the same endpoint with no authentication, choose **Scan Tools**, then **Create**. This remains an alternative, not a prerequisite for the current Plugins flow.
76
+
77
+ ChatGPT connects to remote MCP servers rather than directly to local stdio servers. See OpenAI's [Connecting custom MCP servers in ChatGPT](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt) for current permissions and setup steps.
74
78
 
75
79
  ### npm / npx (recommended)
76
80
 
@@ -91,6 +95,19 @@ The public npm package runs the local stdio server directly. It requires Node.js
91
95
 
92
96
  This is a client-launcher workaround, not a GodPrompt MCP server change. Keep existing working cross-platform `npx` configurations unchanged.
93
97
 
98
+ ### Docker / GHCR (local stdio; no host Node.js)
99
+
100
+ For MCP clients that can launch a local process, the [public GHCR image](https://github.com/AKzar1el/god-prompt-mcp/pkgs/container/god-prompt-mcp) runs the same seven read-only tools without requiring Node.js on the host. Docker with Linux-container support is required; no API key is needed.
101
+
102
+ ```json
103
+ {
104
+ "command": "docker",
105
+ "args": ["run", "--rm", "-i", "ghcr.io/akzar1el/god-prompt-mcp:1.0.44"]
106
+ }
107
+ ```
108
+
109
+ Keep `-i` so the MCP client can exchange JSON-RPC over standard input/output; do not add `-t` (a TTY changes the stdio stream). The version tag selects the verified v1.0.44 image; update it deliberately for future releases rather than silently following the moving `latest` tag. The image is Linux/amd64 and runs as non-root user `10001:10001`. If Docker is unavailable, use the [hosted remote endpoint](#hosted-remote-no-nodejs-required) instead.
110
+
94
111
  ### Glama
95
112
 
96
113
  GodPrompt MCP is published on [Glama](https://glama.ai/mcp/servers/AKzar1el/god-prompt-mcp). Use the server page to inspect the tools and connect it to a supported MCP client.
@@ -256,7 +273,7 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent droi
256
273
  Droid discovers compatible project skills under `.agents/skills/`. To add the callable GodPrompt tools as a local stdio MCP server, use Droid's native MCP command with the published version pinned:
257
274
 
258
275
  ```bash
259
- droid mcp add god-prompt "npx -y god-prompt-mcp@1.0.44"
276
+ droid mcp add god-prompt "npx -y god-prompt-mcp@1.0.45"
260
277
  ```
261
278
 
262
279
  Open `/mcp` in Droid to verify the server and available tools. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's seven progressive-disclosure tools. Node.js 22+ is required for the MCP server.
@@ -282,7 +299,7 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent goos
282
299
  Goose discovers the copied skill under `.goose/skills/god-prompt/`. To expose GodPrompt's callable tools for a session, start Goose with the published MCP package as an external stdio extension:
283
300
 
284
301
  ```bash
285
- goose session --with-extension "npx -y god-prompt-mcp@1.0.44"
302
+ goose session --with-extension "npx -y god-prompt-mcp@1.0.45"
286
303
  ```
287
304
 
288
305
  Goose currently treats Agent Skills and MCP extensions as separate native surfaces, so this path does not depend on Agent Plugins support. The skill supplies the reusable workflow while MCP exposes GodPrompt's seven progressive-disclosure tools. Node.js 22+ is required for the MCP server.
@@ -347,7 +364,7 @@ The Trae target installs the skill under `.trae/skills/god-prompt/`, where TraeC
347
364
  "mcpServers": {
348
365
  "god-prompt": {
349
366
  "command": "npx",
350
- "args": ["-y", "god-prompt-mcp@1.0.44"]
367
+ "args": ["-y", "god-prompt-mcp@1.0.45"]
351
368
  }
352
369
  }
353
370
  }
@@ -366,7 +383,7 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent open
366
383
  The copied skill lands under `.agents/skills/god-prompt/`, one of OpenClaw's documented project skill roots. To expose GodPrompt's callable tools to OpenClaw-managed agent runtimes as well, register the published stdio server:
367
384
 
368
385
  ```bash
369
- openclaw mcp add god-prompt --command npx --arg -y --arg god-prompt-mcp@1.0.44
386
+ openclaw mcp add god-prompt --command npx --arg -y --arg god-prompt-mcp@1.0.45
370
387
  openclaw mcp probe god-prompt
371
388
  ```
372
389
 
@@ -387,7 +404,7 @@ The Qoder target installs the skill under `.qoder/skills/god-prompt/`, where Qod
387
404
  "mcpServers": {
388
405
  "god-prompt": {
389
406
  "command": "npx",
390
- "args": ["-y", "god-prompt-mcp@1.0.44"]
407
+ "args": ["-y", "god-prompt-mcp@1.0.45"]
391
408
  }
392
409
  }
393
410
  }
@@ -427,7 +444,7 @@ Kimi Code CLI can install GodPrompt as one native custom plugin containing the e
427
444
  /reload
428
445
  ```
429
446
 
430
- The Kimi manifest points at `skills/`, so the `god-prompt` skill remains available through Kimi's normal relevance-based skill loading instead of being forced into every session. The same manifest exposes `god-prompt-mcp@1.0.44` as a local stdio MCP server, preserving the seven progressive-disclosure tools. The explicit `tree/main` URL matters because Kimi's bare GitHub-repository install form prefers the latest GitHub release; using `main` makes the current plugin manifest available without forcing a documentation-only npm/MCP Registry release. Node.js 22+ is required for the MCP server.
447
+ The Kimi manifest points at `skills/`, so the `god-prompt` skill remains available through Kimi's normal relevance-based skill loading instead of being forced into every session. The same manifest exposes `god-prompt-mcp@1.0.45` as a local stdio MCP server, preserving the seven progressive-disclosure tools. The explicit `tree/main` URL matters because Kimi's bare GitHub-repository install form prefers the latest GitHub release; using `main` makes the current plugin manifest available without forcing a documentation-only npm/MCP Registry release. Node.js 22+ is required for the MCP server.
431
448
 
432
449
  ### JetBrains AI Assistant
433
450
 
package/dist/content.js CHANGED
@@ -107,6 +107,7 @@ Auto-detect the task type. Read the request carefully, then route:
107
107
  - **Tool-plane transition readiness:** After adding, removing, reconnecting, reconfiguring, or reloading a tool/MCP provider, do not treat configuration success or a connected status as proof that the next execution sees the intended capability set. Before consequential work continues, verify the live model-visible/executable inventory has converged to the intended post-transition state (including material tool-contract/schema changes when relevant); if the inventory is stale, incomplete, or cannot be reconciled, fail closed until readiness is re-established.
108
108
  - **Provider-transition message-lineage integrity:** When a resumed session changes model provider, API endpoint/base URL, compatible gateway, or protocol, treat opaque message/request/continuation identifiers (including \`previous_message_id\`) as bound to the issuing provider and protocol. Before continuing, verify the receiving provider accepts that lineage; never replay a foreign identifier merely because the transcript looks compatible. If the anchor is incompatible or cannot be verified, reconstruct continuity from authoritative transcript/state without that identifier, or STOP for reconciliation; do not loop on an invalid anchor or claim that prompt guidance repairs host-owned session metadata.
109
109
  - **Project configuration effective-load readiness:** At a new, resumed, pre-warmed, relocated, or delegated session start, a valid project config file, accepted instruction path/glob, UI setting, or previous session does not prove the project-specific instructions, hooks, and permission controls are effectively loaded in the current receiving session. Before consequential work relies on those controls, verify the effective instruction content/source and live governing policy with a harmless read-only observation when practical. If a safety-relevant control is absent or cannot be verified, STOP for reload/reconciliation; never interpret a missing configured guard as additional permission or claim this prompt fixes host initialization.
110
+ - **Effective sandbox startup boundary:** When consequential commands rely on host sandbox or network isolation, verify at the actual execution point that sandbox initialization and required bridge/proxy controls are healthy; a configured \`failIfUnavailable\`, sandbox environment marker, or running shell does not prove containment. If startup or bridge initialization failed, a required proxy rejects its configured authentication, or effective isolation cannot be established, STOP the dependent action and report the host failure. Never silently reroute unsandboxed, disable isolation, or claim this prompt repairs host-owned runtime enforcement.
110
111
  - **Nominal read-only probe integrity:** A CLI \`status\` or \`auth status\` command may initialize configuration, lock, or backup files despite its read-only name. Before probing live credentials, configuration, or repository state, verify the exact installed command's side effects or test its write behavior in an independent, non-aliased disposable target. Treat actual initialization as a write requiring scope-bound authority; if a non-mutating check is not established, use a genuinely read-only alternative or report readiness unverified. A probe's name alone is not evidence that it is harmless.
111
112
  - **Delegated child capability readiness:** Before assigning consequential tool- or MCP-dependent work to a child, require evidence from that actual child/session that the required capabilities are live, visible, and callable, using a harmless read-only probe when practical. The parent's working tools, inherited configuration, or successful child spawn are not proof of the child's usable tools. If a required capability is missing or cannot be verified, stop that delegated action and transparently replan within existing authority; never fabricate a tool result, silently borrow a parent's or peer's privileges, or widen permissions. Recheck after child session/model/tool-context changes.
112
113
  - **Delegated worktree isolation continuity:** For a child originally assigned an isolated Git worktree, treat every resume, message handoff, or post-completion reactivation as a new execution-target check. Before any write-capable action or resuming a child for consequential work, verify the actual live child working directory, still-existing linked worktree, branch, and \`HEAD\` against the task-bound isolated root; an old isolation flag, transcript, or previous worktree path is not proof isolation persists. If the worktree has been removed or the child now resolves to the shared/main checkout, STOP write-capable resume, reconcile any effects without replay, and use a fresh isolated child only when authorized and current ownership is clear. Never silently write into shared main or clean up someone else's worktree.
@@ -1293,6 +1294,7 @@ Auto-detect the task type. Read the request carefully, then route:
1293
1294
  - **Tool-plane transition readiness:** After adding, removing, reconnecting, reconfiguring, or reloading a tool/MCP provider, do not treat configuration success or a connected status as proof that the next execution sees the intended capability set. Before consequential work continues, verify the live model-visible/executable inventory has converged to the intended post-transition state (including material tool-contract/schema changes when relevant); if the inventory is stale, incomplete, or cannot be reconciled, fail closed until readiness is re-established.
1294
1295
  - **Provider-transition message-lineage integrity:** When a resumed session changes model provider, API endpoint/base URL, compatible gateway, or protocol, treat opaque message/request/continuation identifiers (including \`previous_message_id\`) as bound to the issuing provider and protocol. Before continuing, verify the receiving provider accepts that lineage; never replay a foreign identifier merely because the transcript looks compatible. If the anchor is incompatible or cannot be verified, reconstruct continuity from authoritative transcript/state without that identifier, or STOP for reconciliation; do not loop on an invalid anchor or claim that prompt guidance repairs host-owned session metadata.
1295
1296
  - **Project configuration effective-load readiness:** At a new, resumed, pre-warmed, relocated, or delegated session start, a valid project config file, accepted instruction path/glob, UI setting, or previous session does not prove the project-specific instructions, hooks, and permission controls are effectively loaded in the current receiving session. Before consequential work relies on those controls, verify the effective instruction content/source and live governing policy with a harmless read-only observation when practical. If a safety-relevant control is absent or cannot be verified, STOP for reload/reconciliation; never interpret a missing configured guard as additional permission or claim this prompt fixes host initialization.
1297
+ - **Effective sandbox startup boundary:** When consequential commands rely on host sandbox or network isolation, verify at the actual execution point that sandbox initialization and required bridge/proxy controls are healthy; a configured \`failIfUnavailable\`, sandbox environment marker, or running shell does not prove containment. If startup or bridge initialization failed, a required proxy rejects its configured authentication, or effective isolation cannot be established, STOP the dependent action and report the host failure. Never silently reroute unsandboxed, disable isolation, or claim this prompt repairs host-owned runtime enforcement.
1296
1298
  - **Nominal read-only probe integrity:** A CLI \`status\` or \`auth status\` command may initialize configuration, lock, or backup files despite its read-only name. Before probing live credentials, configuration, or repository state, verify the exact installed command's side effects or test its write behavior in an independent, non-aliased disposable target. Treat actual initialization as a write requiring scope-bound authority; if a non-mutating check is not established, use a genuinely read-only alternative or report readiness unverified. A probe's name alone is not evidence that it is harmless.
1297
1299
  - **Delegated child capability readiness:** Before assigning consequential tool- or MCP-dependent work to a child, require evidence from that actual child/session that the required capabilities are live, visible, and callable, using a harmless read-only probe when practical. The parent's working tools, inherited configuration, or successful child spawn are not proof of the child's usable tools. If a required capability is missing or cannot be verified, stop that delegated action and transparently replan within existing authority; never fabricate a tool result, silently borrow a parent's or peer's privileges, or widen permissions. Recheck after child session/model/tool-context changes.
1298
1300
  - **Delegated worktree isolation continuity:** For a child originally assigned an isolated Git worktree, treat every resume, message handoff, or post-completion reactivation as a new execution-target check. Before any write-capable action or resuming a child for consequential work, verify the actual live child working directory, still-existing linked worktree, branch, and \`HEAD\` against the task-bound isolated root; an old isolation flag, transcript, or previous worktree path is not proof isolation persists. If the worktree has been removed or the child now resolves to the shared/main checkout, STOP write-capable resume, reconcile any effects without replay, and use a fresh isolated child only when authorized and current ownership is clear. Never silently write into shared main or clean up someone else's worktree.
package/dist/server.js CHANGED
@@ -3,7 +3,7 @@ import { CONTENT, VERSION } from "./content.js";
3
3
  import { CORE_SKILL } from "./skill-content.js";
4
4
  export const SERVER_INFO = {
5
5
  name: "god-prompt-mcp",
6
- version: "1.0.44",
6
+ version: "1.0.45",
7
7
  };
8
8
  export const SERVER_INSTRUCTIONS = "Start with get_core_skill for the lean GodPrompt protocol. Use classify_task to route a concrete task, then load get_protocols, get_gates, or get_anti_patterns only when that focused reference is needed. Use get_god_prompt only when the full single-file payload is preferable. All GodPrompt tools are read-only.";
9
9
  const READ_ONLY_ANNOTATIONS = {
@@ -19,7 +19,7 @@ const TASK_TYPES = {
19
19
  description: "Creating new functionality",
20
20
  },
21
21
  DEBUG: {
22
- triggers: ["fix", "bug", "error", "broken", "crash", "fail", "issue", "wrong"],
22
+ triggers: ["fix", "debug", "debugging", "troubleshoot", "diagnose", "bug", "error", "broken", "crash", "fail", "issue", "wrong"],
23
23
  protocol: "Root cause → 4-layer defense",
24
24
  description: "Finding and fixing defects",
25
25
  },
@@ -29,7 +29,7 @@ const TASK_TYPES = {
29
29
  description: "Improving code without changing behavior",
30
30
  },
31
31
  CONTENT: {
32
- triggers: ["write", "article", "documentation", "blog", "docs", "copy", "text"],
32
+ triggers: ["write", "draft", "content", "article", "documentation", "blog", "docs", "copy", "text"],
33
33
  protocol: "Research → verify → SEO",
34
34
  description: "Writing or editing content",
35
35
  },
@@ -44,7 +44,7 @@ const TASK_TYPES = {
44
44
  description: "Deploying to production",
45
45
  },
46
46
  ANALYZE: {
47
- triggers: ["audit", "review", "check", "analyze", "inspect", "assess", "evaluate"],
47
+ triggers: ["audit", "review", "check", "analyze", "inspect", "assess", "evaluate", "verify", "validate", "test"],
48
48
  protocol: "Evidence-based investigation",
49
49
  description: "Auditing and reviewing existing systems",
50
50
  },
@@ -71,6 +71,7 @@ const ACTION_SIGNALS = new Set([
71
71
  "clean",
72
72
  "create",
73
73
  "deploy",
74
+ "diagnose",
74
75
  "design",
75
76
  "evaluate",
76
77
  "fix",
@@ -91,7 +92,11 @@ const ACTION_SIGNALS = new Set([
91
92
  "review",
92
93
  "ship",
93
94
  "simplify",
95
+ "test",
94
96
  "think",
97
+ "troubleshoot",
98
+ "validate",
99
+ "verify",
95
100
  "write",
96
101
  ]);
97
102
  function hasTrigger(text, trigger) {
@@ -103,6 +108,18 @@ function triggerIndex(text, trigger) {
103
108
  const match = new RegExp(`(^|[^a-z0-9])${escaped}($|[^a-z0-9])`).exec(text);
104
109
  return match ? match.index + match[1].length : -1;
105
110
  }
111
+ function hasAffirmativeActionTrigger(text, trigger) {
112
+ const escaped = trigger.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
113
+ const matches = text.matchAll(new RegExp(`(^|[^a-z0-9])(${escaped})(?=$|[^a-z0-9])`, "g"));
114
+ for (const match of matches) {
115
+ const prefix = text.slice(0, match.index + match[1].length).split(/[.!?;,]/).at(-1) ?? "";
116
+ // A forbidden downstream action is not a requested deployment action.
117
+ if (!/(?:\b(?:do not|don't|never|without|avoid|must not|should not|no)\s+(?:(?!(?:but|then|however)\b)[a-z0-9-]+\s+){0,3})$/.test(prefix)) {
118
+ return true;
119
+ }
120
+ }
121
+ return false;
122
+ }
106
123
  function signalStrength(trigger) {
107
124
  if (trigger.includes(" "))
108
125
  return 3;
@@ -143,11 +160,33 @@ function routingConfidence(best, runnerUp) {
143
160
  return Math.max(0.5, Math.min(confidence, 0.97));
144
161
  }
145
162
  function classifyTask(description) {
146
- const normalized = description.normalize("NFKC").trim().replace(/\s+/gu, " ").toLowerCase();
163
+ const normalized = description.normalize("NFKC")
164
+ .replace(/[\u2018\u2019\u02bc]/gu, "'")
165
+ .trim().replace(/\s+/gu, " ").toLowerCase();
147
166
  const candidates = [];
167
+ const debugActions = ["fix", "debug", "debugging", "troubleshoot", "diagnose"];
168
+ const explicitlyNegatedDebug = debugActions.some((trigger) => hasTrigger(normalized, trigger) && !hasAffirmativeActionTrigger(normalized, trigger));
169
+ const affirmativeDebug = debugActions.some((trigger) => hasAffirmativeActionTrigger(normalized, trigger));
170
+ const inspectionRequested = ["audit", "review", "check", "analyze", "inspect", "assess", "evaluate", "verify", "validate", "test"]
171
+ .some((trigger) => hasTrigger(normalized, trigger));
172
+ const affirmativeBuild = ["create", "implement", "add", "build", "make"]
173
+ .some((trigger) => hasAffirmativeActionTrigger(normalized, trigger));
148
174
  for (const [type, info] of Object.entries(TASK_TYPES)) {
175
+ // An inspection request is not authorization to build/debug just because it names a feature or bug.
176
+ if (inspectionRequested && ((type === "BUILD" && !affirmativeBuild) ||
177
+ (type === "DEBUG" && !affirmativeDebug)))
178
+ continue;
179
+ // CI, cron and workflow names are audit subjects, not requests to automate them.
180
+ if (type === "AUTOMATE" && inspectionRequested && !affirmativeBuild &&
181
+ !hasAffirmativeActionTrigger(normalized, "automate"))
182
+ continue;
183
+ // Mentions of bugs or errors must not override an explicit no-debug instruction.
184
+ if (type === "DEBUG" && explicitlyNegatedDebug && !affirmativeDebug)
185
+ continue;
149
186
  const matches = info.triggers
150
- .filter((trigger) => hasTrigger(normalized, trigger))
187
+ .filter((trigger) => type === "SHIP" || type === "BUILD"
188
+ ? hasAffirmativeActionTrigger(normalized, trigger)
189
+ : hasTrigger(normalized, trigger))
151
190
  .map((trigger) => ({
152
191
  signal: trigger,
153
192
  strength: signalStrength(trigger),
package/dist/skills.js CHANGED
@@ -20,34 +20,103 @@ const SKILL_FILES = [
20
20
  text: CONTENT.ANTI_PATTERNS,
21
21
  },
22
22
  ];
23
- function parseFrontmatter(skill) {
23
+ export function parseFrontmatter(skill) {
24
24
  const normalized = skill.replaceAll("\r\n", "\n");
25
25
  const match = /^---\n([\s\S]*?)\n---(?:\n|$)/.exec(normalized);
26
26
  if (!match)
27
27
  throw new Error("GodPrompt SKILL.md is missing YAML frontmatter");
28
28
  const lines = match[1].split("\n");
29
29
  const frontmatter = {};
30
+ const seenFields = new Set();
31
+ const withoutInlineComment = (value) => {
32
+ let quote = null;
33
+ let escaped = false;
34
+ for (let index = 0; index < value.length; index += 1) {
35
+ const char = value[index];
36
+ if (quote === '"') {
37
+ if (escaped)
38
+ escaped = false;
39
+ else if (char === "\\")
40
+ escaped = true;
41
+ else if (char === '"')
42
+ quote = null;
43
+ }
44
+ else if (quote === "'") {
45
+ if (char === "'") {
46
+ if (value[index + 1] === "'")
47
+ index += 1;
48
+ else
49
+ quote = null;
50
+ }
51
+ }
52
+ else if (char === "'" || char === '"') {
53
+ quote = char;
54
+ }
55
+ else if (char === "#" && (index === 0 || /\s/.test(value[index - 1]))) {
56
+ return value.slice(0, index).trimEnd();
57
+ }
58
+ }
59
+ return value.trimEnd();
60
+ };
61
+ const scalarValue = (value) => {
62
+ const trimmed = value.trim();
63
+ if (trimmed.length >= 2 && trimmed.startsWith("'") && trimmed.endsWith("'")) {
64
+ return trimmed.slice(1, -1).replaceAll("''", "'");
65
+ }
66
+ if (trimmed.length >= 2 && trimmed.startsWith('"') && trimmed.endsWith('"')) {
67
+ try {
68
+ return JSON.parse(trimmed);
69
+ }
70
+ catch {
71
+ throw new Error("Invalid quoted GodPrompt SKILL.md frontmatter scalar");
72
+ }
73
+ }
74
+ return trimmed;
75
+ };
30
76
  for (let index = 0; index < lines.length; index += 1) {
31
77
  const line = lines[index];
32
- if (!line.trim())
33
- continue;
34
- const scalar = /^(name|license):\s*(.+)$/.exec(line);
35
- if (scalar) {
36
- frontmatter[scalar[1]] = scalar[2].trim();
78
+ if (!line.trim() || line.trimStart().startsWith("#") || /^\s/.test(line))
37
79
  continue;
80
+ const field = /^([a-zA-Z][a-zA-Z0-9_-]*):(?:\s+(.*))?$/.exec(line);
81
+ if (!field)
82
+ throw new Error(`Invalid GodPrompt SKILL.md frontmatter line: ${line}`);
83
+ const [, key, sourceValue = ""] = field;
84
+ const rawValue = withoutInlineComment(sourceValue);
85
+ if (key === "name" || key === "description" || key === "license") {
86
+ if (seenFields.has(key))
87
+ throw new Error(`Duplicate GodPrompt SKILL.md frontmatter field: ${key}`);
88
+ seenFields.add(key);
38
89
  }
39
- if (line === "description: |") {
90
+ if (key === "description" && /^[|>][-+]?\s*$/.test(rawValue)) {
40
91
  const description = [];
41
- while (index + 1 < lines.length && lines[index + 1].startsWith(" ")) {
92
+ while (index + 1 < lines.length && (lines[index + 1].startsWith(" ") || lines[index + 1] === "")) {
42
93
  index += 1;
43
- description.push(lines[index].slice(2));
94
+ description.push(lines[index]);
44
95
  }
45
- frontmatter.description = `${description.join("\n")}\n`;
96
+ const indentation = Math.min(...description.filter((part) => part.trim()).map((part) => part.match(/^ */)?.[0].length ?? 0));
97
+ const linesWithoutIndent = description.map((part) => part.slice(indentation));
98
+ const content = rawValue.startsWith(">")
99
+ ? linesWithoutIndent.join("\n").replace(/([^\n])\n(?=[^\n])/g, "$1 ")
100
+ : linesWithoutIndent.join("\n");
101
+ const withoutTrailingLineBreaks = content.replace(/\n+$/, "");
102
+ // The block delimiter consumes the last newline; YAML chomping controls whether to restore it.
103
+ frontmatter.description = rawValue.endsWith("-")
104
+ ? withoutTrailingLineBreaks
105
+ : rawValue.endsWith("+")
106
+ ? `${content}\n`
107
+ : `${withoutTrailingLineBreaks}\n`;
46
108
  continue;
47
109
  }
48
- throw new Error(`Unsupported GodPrompt SKILL.md frontmatter line: ${line}`);
110
+ if (key === "name" || key === "license") {
111
+ frontmatter[key] = scalarValue(rawValue);
112
+ }
113
+ else if (key === "description") {
114
+ frontmatter.description = scalarValue(rawValue);
115
+ }
116
+ // Additional Agent Skills fields (metadata, compatibility, allowed-tools)
117
+ // are valid but not part of the MCP extension's advertised frontmatter.
49
118
  }
50
- if (!frontmatter.name || !frontmatter.description) {
119
+ if (!frontmatter.name?.trim() || !frontmatter.description?.trim()) {
51
120
  throw new Error("GodPrompt SKILL.md frontmatter must include name and description");
52
121
  }
53
122
  return frontmatter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "god-prompt-mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "mcpName": "io.github.AKzar1el/god-prompt-mcp",
5
5
  "description": "GodPrompt MCP server + portable Agent Skill for coding agents — TDD, debugging, verification gates, task routing, and progressive disclosure.",
6
6
  "private": false,
@@ -68,7 +68,7 @@
68
68
  "generate-content": "node scripts/generate-content.mjs"
69
69
  },
70
70
  "dependencies": {
71
- "@modelcontextprotocol/server": "2.3.0",
71
+ "@modelcontextprotocol/server": "2.4.0",
72
72
  "zod": "^4.6.7"
73
73
  },
74
74
  "devDependencies": {