Skip to content

Commit 6ce71e2

Browse files
committed
fix: expose curriculum-alignment domain skills as callable MCP tools
1 parent dd3339a commit 6ce71e2

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

mcp-server/src/skill-loader.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ const IGNORED_FILES = new Set([
1717
const IGNORED_DIRS = new Set(["schemas", "mcp-server", ".git", "node_modules"]);
1818

1919
function extractPrompt(content: string): string {
20+
// Case 1: ## Prompt followed by a fenced code block (most common)
2021
const promptMatch = content.match(/## Prompt\s*\n+```[^\n]*\n([\s\S]*?)```/);
2122
if (promptMatch) return promptMatch[1].trim();
2223

24+
// Case 2: # Prompt (h1) with ## subheadings inside — stop at next h1
25+
const h1Match = content.match(/^# Prompt[ \t]*\n([\s\S]*?)(?=^# [^#])/m);
26+
if (h1Match) return h1Match[1].trim();
27+
28+
// Case 3: ## Prompt without code block — stop at next ## or ---
2329
const sectionMatch = content.match(/## Prompt\s*\n+([\s\S]*?)(?=\n## |\n---\s*$)/);
2430
if (sectionMatch) return sectionMatch[1].trim();
2531

0 commit comments

Comments
 (0)