@axinom/mosaic-agent-skills 0.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.
Files changed (72) hide show
  1. package/README.md +121 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +58 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/logger.d.ts +6 -0
  7. package/dist/logger.d.ts.map +1 -0
  8. package/dist/logger.js +15 -0
  9. package/dist/logger.js.map +1 -0
  10. package/dist/tools/graphql/index.d.ts +3 -0
  11. package/dist/tools/graphql/index.d.ts.map +1 -0
  12. package/dist/tools/graphql/index.js +84 -0
  13. package/dist/tools/graphql/index.js.map +1 -0
  14. package/dist/tools/graphql/tools.d.ts +71 -0
  15. package/dist/tools/graphql/tools.d.ts.map +1 -0
  16. package/dist/tools/graphql/tools.js +187 -0
  17. package/dist/tools/graphql/tools.js.map +1 -0
  18. package/dist/tools/graphql/utils.d.ts +20 -0
  19. package/dist/tools/graphql/utils.d.ts.map +1 -0
  20. package/dist/tools/graphql/utils.js +140 -0
  21. package/dist/tools/graphql/utils.js.map +1 -0
  22. package/dist/tools/skills/index.d.ts +3 -0
  23. package/dist/tools/skills/index.d.ts.map +1 -0
  24. package/dist/tools/skills/index.js +62 -0
  25. package/dist/tools/skills/index.js.map +1 -0
  26. package/dist/tools/skills/tools.d.ts +5 -0
  27. package/dist/tools/skills/tools.d.ts.map +1 -0
  28. package/dist/tools/skills/tools.js +67 -0
  29. package/dist/tools/skills/tools.js.map +1 -0
  30. package/dist/tools/skills/types.d.ts +12 -0
  31. package/dist/tools/skills/types.d.ts.map +1 -0
  32. package/dist/tools/skills/types.js +3 -0
  33. package/dist/tools/skills/types.js.map +1 -0
  34. package/dist/tools/skills/utils.d.ts +11 -0
  35. package/dist/tools/skills/utils.d.ts.map +1 -0
  36. package/dist/tools/skills/utils.js +127 -0
  37. package/dist/tools/skills/utils.js.map +1 -0
  38. package/package.json +40 -0
  39. package/skills/_shared/actions/execution-summary.md +53 -0
  40. package/skills/_shared/actions/typescript-codegen.md +32 -0
  41. package/skills/_shared/actions/typescript-validation.md +32 -0
  42. package/skills/_shared/conventions/field-component-mapping.md +155 -0
  43. package/skills/_shared/conventions/field-validation-schema.md +77 -0
  44. package/skills/_shared/discovery/discover-paths.md +52 -0
  45. package/skills/_shared/discovery/extract-entity-features.md +565 -0
  46. package/skills/generate-create-station/SKILL.md +93 -0
  47. package/skills/generate-create-station/refs/finalization/station-registration.md +163 -0
  48. package/skills/generate-create-station/refs/templates/create-form-station.md +206 -0
  49. package/skills/generate-create-station/refs/templates/graphql-operations.md +56 -0
  50. package/skills/generate-details-station/SKILL.md +125 -0
  51. package/skills/generate-details-station/refs/finalization/explorer-integration.md +242 -0
  52. package/skills/generate-details-station/refs/finalization/station-registration.md +139 -0
  53. package/skills/generate-details-station/refs/templates/actions.md +127 -0
  54. package/skills/generate-details-station/refs/templates/breadcrumb.md +67 -0
  55. package/skills/generate-details-station/refs/templates/details-form-station.md +589 -0
  56. package/skills/generate-details-station/refs/templates/details-wrapper.md +54 -0
  57. package/skills/generate-details-station/refs/templates/form-data-types.md +62 -0
  58. package/skills/generate-details-station/refs/templates/graphql-operations.md +256 -0
  59. package/skills/generate-details-station/refs/templates/managed-integrations/image-management-station.md +322 -0
  60. package/skills/generate-details-station/refs/templates/managed-integrations/video-management-station.md +283 -0
  61. package/skills/generate-explorer-station/SKILL.md +121 -0
  62. package/skills/generate-explorer-station/refs/finalization/station-registration.md +145 -0
  63. package/skills/generate-explorer-station/refs/select-columns-filters.md +63 -0
  64. package/skills/generate-explorer-station/refs/templates/bulk-edit.md +369 -0
  65. package/skills/generate-explorer-station/refs/templates/common/bulk-actions.md +64 -0
  66. package/skills/generate-explorer-station/refs/templates/common/columns.md +131 -0
  67. package/skills/generate-explorer-station/refs/templates/common/data-provider.md +83 -0
  68. package/skills/generate-explorer-station/refs/templates/common/filters.md +220 -0
  69. package/skills/generate-explorer-station/refs/templates/common/inline-actions.md +45 -0
  70. package/skills/generate-explorer-station/refs/templates/common/types.md +28 -0
  71. package/skills/generate-explorer-station/refs/templates/graphql-operations.md +235 -0
  72. package/skills/generate-explorer-station/refs/templates/navigation-explorer-station.md +144 -0
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.getSubscriptionFields = exports.getMutationFields = exports.getQueryFields = exports.getTypes = exports.searchSchema = exports.loadSchema = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ const graphql_1 = require("graphql");
29
+ function loadSchema(schemaPath) {
30
+ if (!fs.existsSync(schemaPath)) {
31
+ throw new Error(`Schema file not found: ${schemaPath}`);
32
+ }
33
+ const schemaContent = fs.readFileSync(schemaPath, 'utf-8');
34
+ try {
35
+ return (0, graphql_1.buildSchema)(schemaContent);
36
+ }
37
+ catch (error) {
38
+ const message = error instanceof Error ? error.message : String(error);
39
+ throw new Error(`Failed to parse schema: ${message}`);
40
+ }
41
+ }
42
+ exports.loadSchema = loadSchema;
43
+ function searchSchema(schema, pattern) {
44
+ const searchRegex = new RegExp(pattern, 'i');
45
+ const matchingTypes = Object.keys(schema.getTypeMap()).filter((type) => !type.startsWith('__') && searchRegex.test(type));
46
+ const matchingFields = Object.entries(schema.getTypeMap())
47
+ .filter(([typeName]) => !typeName.startsWith('__'))
48
+ .flatMap(([typeName, type]) => {
49
+ if ('getFields' in type) {
50
+ const objectType = type;
51
+ return Object.keys(objectType.getFields())
52
+ .filter((fieldName) => searchRegex.test(fieldName))
53
+ .map((fieldName) => `${typeName}.${fieldName}`);
54
+ }
55
+ return [];
56
+ });
57
+ return { matchingTypes, matchingFields };
58
+ }
59
+ exports.searchSchema = searchSchema;
60
+ function getTypes(schema, typeNames) {
61
+ return typeNames.map((typeName) => {
62
+ var _a;
63
+ const type = schema.getTypeMap()[typeName];
64
+ if (!type) {
65
+ return {
66
+ name: typeName,
67
+ definition: `Type "${typeName}" not found`,
68
+ };
69
+ }
70
+ if (!type.astNode) {
71
+ return {
72
+ name: typeName,
73
+ definition: `Type: ${typeName}\nDescription: ${(_a = type.description) !== null && _a !== void 0 ? _a : 'No description'}\nKind: ${type.constructor.name}`,
74
+ };
75
+ }
76
+ return {
77
+ name: typeName,
78
+ definition: (0, graphql_1.print)(type.astNode),
79
+ };
80
+ });
81
+ }
82
+ exports.getTypes = getTypes;
83
+ function getQueryFields(schema, fieldNames) {
84
+ const queryType = schema.getQueryType();
85
+ if (!queryType) {
86
+ return fieldNames.map((name) => ({
87
+ name,
88
+ definition: 'No Query type defined in schema',
89
+ }));
90
+ }
91
+ const fields = queryType.getFields();
92
+ return getFieldDefinitions(fields, fieldNames);
93
+ }
94
+ exports.getQueryFields = getQueryFields;
95
+ function getMutationFields(schema, fieldNames) {
96
+ const mutationType = schema.getMutationType();
97
+ if (!mutationType) {
98
+ return fieldNames.map((name) => ({
99
+ name,
100
+ definition: 'No Mutation type defined in schema',
101
+ }));
102
+ }
103
+ const fields = mutationType.getFields();
104
+ return getFieldDefinitions(fields, fieldNames);
105
+ }
106
+ exports.getMutationFields = getMutationFields;
107
+ function getSubscriptionFields(schema, fieldNames) {
108
+ const subscriptionType = schema.getSubscriptionType();
109
+ if (!subscriptionType) {
110
+ return fieldNames.map((name) => ({
111
+ name,
112
+ definition: 'No Subscription type defined in schema',
113
+ }));
114
+ }
115
+ const fields = subscriptionType.getFields();
116
+ return getFieldDefinitions(fields, fieldNames);
117
+ }
118
+ exports.getSubscriptionFields = getSubscriptionFields;
119
+ function getFieldDefinitions(fields, fieldNames) {
120
+ return fieldNames.map((fieldName) => {
121
+ const field = fields[fieldName];
122
+ if (!field) {
123
+ return {
124
+ name: fieldName,
125
+ definition: `Field "${fieldName}" not found`,
126
+ };
127
+ }
128
+ if (!field.astNode) {
129
+ return {
130
+ name: fieldName,
131
+ definition: `Field "${fieldName}" has no definition`,
132
+ };
133
+ }
134
+ return {
135
+ name: fieldName,
136
+ definition: (0, graphql_1.print)(field.astNode),
137
+ };
138
+ });
139
+ }
140
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/tools/graphql/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,uCAAyB;AACzB,qCAMiB;AAoBjB,SAAgB,UAAU,CAAC,UAAkB;IAC3C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,0BAA0B,UAAU,EAAE,CAAC,CAAC;KACzD;IAED,MAAM,aAAa,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE3D,IAAI;QACF,OAAO,IAAA,qBAAW,EAAC,aAAa,CAAC,CAAC;KACnC;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,C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
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerSkillsTools(server: McpServer, skillsPath: string): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/skills/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUpE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,GACjB,IAAI,CAqFN"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerSkillsTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("./tools");
6
+ function registerSkillsTools(server, skillsPath) {
7
+ server.registerTool('list_skills', {
8
+ title: 'List Mosaic Skills',
9
+ description: 'List all available Axinom Mosaic development skills. Skills provide step-by-step workflows for building UI stations, GraphQL operations, and infrastructure components.',
10
+ inputSchema: zod_1.z.object({}),
11
+ }, async () => {
12
+ const result = (0, tools_1.handleListSkills)(skillsPath);
13
+ return {
14
+ content: [{ type: 'text', text: result }],
15
+ };
16
+ });
17
+ server.registerTool('get_skill', {
18
+ title: 'Get Skill Workflow',
19
+ description: 'Read a skill workflow to understand its steps, goals, and requirements BEFORE execution. Returns the complete workflow content including all step references that must be retrieved. REQUIRED: You MUST call this tool first to understand the workflow before calling get_skill_references or execute_skill.',
20
+ inputSchema: zod_1.z.object({
21
+ skill_name: zod_1.z
22
+ .string()
23
+ .describe('The name of the skill to read (e.g., "generate-details-station", "generate-explorer-station")'),
24
+ }),
25
+ }, async ({ skill_name }) => {
26
+ const result = (0, tools_1.handleGetSkill)(skillsPath, skill_name);
27
+ return {
28
+ content: [{ type: 'text', text: result }],
29
+ };
30
+ });
31
+ server.registerTool('get_skill_references', {
32
+ title: 'Get Skill Reference Files',
33
+ description: 'Read reference files (markdown, TypeScript, etc.) mentioned in skill workflows using relative paths. CRITICAL: You MUST retrieve ALL reference files mentioned in the skill steps BEFORE executing those steps. References contain templates, conventions, and patterns that are REQUIRED for correct code generation. Supports batch requests - use this to fetch multiple references at once for efficiency.',
34
+ inputSchema: zod_1.z.object({
35
+ skill_name: zod_1.z
36
+ .string()
37
+ .describe('The name of the skill that references these files'),
38
+ reference_paths: zod_1.z
39
+ .array(zod_1.z.string())
40
+ .describe('Array of relative paths from SKILL.md location (e.g., ["../_shared/discovery/discover-paths.md", "./refs/templates/graphql-operations.md"]). Extract ALL reference paths mentioned in the skill steps.'),
41
+ }),
42
+ }, async ({ skill_name, reference_paths }) => {
43
+ const result = (0, tools_1.handleGetSkillReferences)(skillsPath, skill_name, reference_paths);
44
+ return {
45
+ content: [{ type: 'text', text: result }],
46
+ };
47
+ });
48
+ server.registerTool('execute_skill', {
49
+ title: 'Execute Skill Workflow',
50
+ description: 'Commit to executing a skill workflow with strict adherence to every step. PREREQUISITES: You MUST have already: (1) Called get_skill to read the complete workflow, (2) Called get_skill_references to retrieve ALL reference files mentioned in the steps. Only call this tool after you have READ and UNDERSTOOD the complete workflow and all its references. Execution means following every step in exact order without skipping.',
51
+ inputSchema: zod_1.z.object({
52
+ skill_name: zod_1.z.string().describe('The name of the skill to execute'),
53
+ }),
54
+ }, async ({ skill_name }) => {
55
+ const result = (0, tools_1.handleExecuteSkill)(skillsPath, skill_name);
56
+ return {
57
+ content: [{ type: 'text', text: result }],
58
+ };
59
+ });
60
+ }
61
+ exports.registerSkillsTools = registerSkillsTools;
62
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/skills/index.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AAExB,mCAKiB;AAEjB,SAAgB,mBAAmB,CACjC,MAAiB,EACjB,UAAkB;IAElB,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,oBAAoB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EACV,UAAU,EACV,eAAe,CAChB,CAAC;QACF,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SAC1C,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,waAAwa;QAC1a,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;SACpE,CAAC;KACH,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,IAAA,0BAAkB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC1D,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SAC1C,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAxFD,kDAwFC"}
@@ -0,0 +1,5 @@
1
+ export declare function handleListSkills(skillsPath: string): string;
2
+ export declare function handleGetSkill(skillsPath: string, skillName: string): string;
3
+ export declare function handleGetSkillReferences(skillsPath: string, skillName: string, referencePaths: string[]): string;
4
+ export declare function handleExecuteSkill(skillsPath: string, skillName: string): string;
5
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/skills/tools.ts"],"names":[],"mappings":"AA8BA,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAU3D;AAKD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS5E;AAKD,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EAAE,GACvB,MAAM,CAoCR;AAKD,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,MAAM,CASR"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleExecuteSkill = exports.handleGetSkillReferences = exports.handleGetSkill = exports.handleListSkills = void 0;
4
+ const utils_1 = require("./utils");
5
+ function formatSkillsList(skills) {
6
+ return skills
7
+ .map((skill) => `**${skill.name}**\n${skill.description}\n`)
8
+ .join('\n');
9
+ }
10
+ function formatSkillNotFoundError(skillName, skills) {
11
+ const availableSkills = skills.map((s) => `- ${s.name}`).join('\n');
12
+ return `Error: Skill "${skillName}" not found.\n\nAvailable skills:\n${availableSkills}`;
13
+ }
14
+ function handleListSkills(skillsPath) {
15
+ const skills = (0, utils_1.scanSkills)(skillsPath);
16
+ if (skills.length === 0) {
17
+ return 'No skills found. Make sure SKILLS_PATH points to a valid skills directory.';
18
+ }
19
+ return `# Available Axinom Mosaic Skills\n\n${formatSkillsList(skills)}\n---\n\nTotal: ${skills.length} skills`;
20
+ }
21
+ exports.handleListSkills = handleListSkills;
22
+ function handleGetSkill(skillsPath, skillName) {
23
+ const skills = (0, utils_1.scanSkills)(skillsPath);
24
+ const skill = (0, utils_1.getSkillByName)(skills, skillName);
25
+ if (!skill) {
26
+ return formatSkillNotFoundError(skillName, skills);
27
+ }
28
+ return `# ${skill.name}\n\n${skill.description}\n\n---\n\n## IMPORTANT: Reference Files Required\n\nThis skill references external files (marked with \`→ path/to/file.md\`) that contain critical templates, conventions, and patterns. You MUST use \`get_skill_references\` to retrieve ALL referenced files BEFORE executing this skill.\n\n**Next Step:** Scan the workflow below and collect all reference paths (e.g., \`../_shared/discovery/discover-paths.md\`, \`./refs/templates/graphql-operations.md\`), then call \`get_skill_references\` with all paths in a single batch request.\n\n---\n\n${skill.content}`;
29
+ }
30
+ exports.handleGetSkill = handleGetSkill;
31
+ function handleGetSkillReferences(skillsPath, skillName, referencePaths) {
32
+ const skills = (0, utils_1.scanSkills)(skillsPath);
33
+ const skill = (0, utils_1.getSkillByName)(skills, skillName);
34
+ if (!skill) {
35
+ return formatSkillNotFoundError(skillName, skills);
36
+ }
37
+ const fileRefs = (0, utils_1.readFileReference)(skillsPath, skill.path, referencePaths);
38
+ const results = [];
39
+ const errors = [];
40
+ fileRefs.forEach((fileRef, index) => {
41
+ const refPath = referencePaths[index];
42
+ if (fileRef) {
43
+ results.push(`# ${refPath}\n\n**Skill**: ${skillName}\n**Path**: ${fileRef.absolutePath}\n\n---\n\n${fileRef.content}`);
44
+ }
45
+ else {
46
+ errors.push(`Error: Reference "${refPath}" not found or blocked for security reasons.`);
47
+ }
48
+ });
49
+ if (results.length === 0) {
50
+ return `${errors.join('\n\n')}\n\nProvide relative paths from SKILL.md location (e.g., "../_shared/discovery/discover-paths.md").`;
51
+ }
52
+ const output = results.join('\n\n---\n\n');
53
+ return errors.length > 0
54
+ ? `${output}\n\n---\n\n# Errors\n\n${errors.join('\n')}`
55
+ : output;
56
+ }
57
+ exports.handleGetSkillReferences = handleGetSkillReferences;
58
+ function handleExecuteSkill(skillsPath, skillName) {
59
+ const skills = (0, utils_1.scanSkills)(skillsPath);
60
+ const skill = (0, utils_1.getSkillByName)(skills, skillName);
61
+ if (!skill) {
62
+ return formatSkillNotFoundError(skillName, skills);
63
+ }
64
+ return `# Executing: ${skill.name}\n\n${skill.description}\n\n## Prerequisites Verification\n\n⚠️ CRITICAL: Before proceeding, verify you have completed:\n\n- [ ] Called \`get_skill\` and read the complete workflow for "${skill.name}"\n- [ ] Identified ALL reference files mentioned in the skill steps (look for paths like \`→ refs/...\` or \`→ ../_shared/...\`)\n- [ ] Called \`get_skill_references\` to retrieve ALL identified reference files\n- [ ] Read and understood the templates, conventions, and patterns in the references\n\n## Execution Contract\n\nBy executing this skill, you commit to:\n\n1. **Follow EVERY step in exact order** - Do not skip or reorder steps\n2. **Use reference files as authoritative source** - Templates and conventions in references are the PRIMARY guide\n3. **Read references BEFORE generating code** - Each step that references a file (e.g., \`→ refs/templates/create-form-station.md\`) requires that reference to be loaded FIRST\n4. **Run ALL validation commands** - Execute \`yarn codegen\` and \`yarn tsc --noEmit\` when specified and fix ALL errors before continuing\n5. **Track progress explicitly** - Mark steps as completed, provide status updates\n6. **Ask for clarification at decision points** - When entity features require choices (columns, filters, icons), present options to the user\n\n## Workflow Steps\n\n${skill.content}\n\n---\n\nProceed with Step 1 only after verifying prerequisites above.`;
65
+ }
66
+ exports.handleExecuteSkill = handleExecuteSkill;
67
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/tools/skills/tools.ts"],"names":[],"mappings":";;;AAKA,mCAAwE;AAKxE,SAAS,gBAAgB,CAAC,MAAuB;IAC/C,OAAO,MAAM;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,WAAW,IAAI,CAAC;SAC3D,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAKD,SAAS,wBAAwB,CAC/B,SAAiB,EACjB,MAAuB;IAEvB,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,OAAO,iBAAiB,SAAS,sCAAsC,eAAe,EAAE,CAAC;AAC3F,CAAC;AAKD,SAAgB,gBAAgB,CAAC,UAAkB;IACjD,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;IAEtC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,4EAA4E,CAAC;KACrF;IAED,OAAO,uCAAuC,gBAAgB,CAC5D,MAAM,CACP,mBAAmB,MAAM,CAAC,MAAM,SAAS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AC;SACH;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,GAAG,MAAM,CAAC,IAAI,CACnB,MAAM,CACP,qGAAqG,CAAC;KACxG;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC;QACtB,CAAC,CAAC,GAAG,MAAM,0BAA0B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACxD,CAAC,CAAC,MAAM,CAAC;AACb,CAAC;AAxCD,4DAwCC;AAKD,SAAgB,kBAAkB,CAChC,UAAkB,EAClB,SAAiB;IAEjB,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,IAAA,sBAAc,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEhD,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KACpD;IAED,OAAO,gBAAgB,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,WAAW,sKAAsK,KAAK,CAAC,IAAI,wmCAAwmC,KAAK,CAAC,OAAO,0EAA0E,CAAC;AAC36C,CAAC;AAZD,gDAYC"}
@@ -0,0 +1,12 @@
1
+ export interface SkillMetadata {
2
+ name: string;
3
+ description: string;
4
+ path: string;
5
+ content: string;
6
+ }
7
+ export interface SkillExecutionResult {
8
+ skillName: string;
9
+ content: string;
10
+ message: string;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/skills/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/skills/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { SkillMetadata } from './types';
2
+ export declare function findFiles(dir: string, filename: string): string[];
3
+ export declare function parseSkillFile(filePath: string): SkillMetadata | null;
4
+ export declare function scanSkills(skillsPath: string): SkillMetadata[];
5
+ export declare function getSkillByName(skills: SkillMetadata[], skillName: string): SkillMetadata | undefined;
6
+ export declare function readFileReference(skillsBasePath: string, skillPath: string, relativePaths: string[]): ({
7
+ content: string;
8
+ absolutePath: string;
9
+ relativePath: string;
10
+ } | null)[];
11
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/skills/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAKxC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBjE;AAKD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAyBrE;AAKD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,EAAE,CAiB9D;AAKD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CAE3B;AASD,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EAAE,GACtB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,EAAE,CAyCV"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.readFileReference = exports.getSkillByName = exports.scanSkills = exports.parseSkillFile = exports.findFiles = void 0;
30
+ const fs = __importStar(require("fs"));
31
+ const path = __importStar(require("path"));
32
+ const gray_matter_1 = __importDefault(require("gray-matter"));
33
+ const logger_1 = require("../../logger");
34
+ function findFiles(dir, filename) {
35
+ const results = [];
36
+ try {
37
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
38
+ for (const entry of entries) {
39
+ const fullPath = path.join(dir, entry.name);
40
+ if (entry.isDirectory()) {
41
+ results.push(...findFiles(fullPath, filename));
42
+ }
43
+ else if (entry.isFile() && entry.name === filename) {
44
+ results.push(fullPath);
45
+ }
46
+ }
47
+ }
48
+ catch (error) {
49
+ return results;
50
+ }
51
+ return results;
52
+ }
53
+ exports.findFiles = findFiles;
54
+ function parseSkillFile(filePath) {
55
+ try {
56
+ const content = fs.readFileSync(filePath, 'utf-8');
57
+ const parsed = (0, gray_matter_1.default)(content);
58
+ const name = parsed.data.name;
59
+ const description = parsed.data.description;
60
+ if (!name || !description) {
61
+ logger_1.logger.warn(`SKILL.md at ${filePath} is missing name or description in frontmatter`);
62
+ return null;
63
+ }
64
+ return {
65
+ name,
66
+ description,
67
+ path: filePath,
68
+ content: parsed.content,
69
+ };
70
+ }
71
+ catch (error) {
72
+ logger_1.logger.error(`Error parsing skill file ${filePath}:`, error);
73
+ return null;
74
+ }
75
+ }
76
+ exports.parseSkillFile = parseSkillFile;
77
+ function scanSkills(skillsPath) {
78
+ if (!fs.existsSync(skillsPath)) {
79
+ logger_1.logger.error('Skills directory not found at', skillsPath);
80
+ return [];
81
+ }
82
+ const skillFiles = findFiles(skillsPath, 'SKILL.md');
83
+ const skills = [];
84
+ for (const skillFile of skillFiles) {
85
+ const skill = parseSkillFile(skillFile);
86
+ if (skill) {
87
+ skills.push(skill);
88
+ }
89
+ }
90
+ return skills;
91
+ }
92
+ exports.scanSkills = scanSkills;
93
+ function getSkillByName(skills, skillName) {
94
+ return skills.find((skill) => skill.name === skillName);
95
+ }
96
+ exports.getSkillByName = getSkillByName;
97
+ function readFileReference(skillsBasePath, skillPath, relativePaths) {
98
+ const skillDir = path.dirname(skillPath);
99
+ const normalizedBasePath = path.resolve(skillsBasePath);
100
+ const results = [];
101
+ for (const relativePath of relativePaths) {
102
+ try {
103
+ const absolutePath = path.resolve(skillDir, relativePath);
104
+ const normalizedPath = path.resolve(absolutePath);
105
+ if (!normalizedPath.startsWith(normalizedBasePath + path.sep) &&
106
+ normalizedPath !== normalizedBasePath) {
107
+ logger_1.logger.warn(`Security: Reference path "${relativePath}" resolves outside skills directory. Blocked access to: ${normalizedPath}`);
108
+ results.push(null);
109
+ continue;
110
+ }
111
+ if (!fs.existsSync(absolutePath)) {
112
+ logger_1.logger.warn(`Reference file not found: ${absolutePath}`);
113
+ results.push(null);
114
+ continue;
115
+ }
116
+ const content = fs.readFileSync(absolutePath, 'utf-8');
117
+ results.push({ content, absolutePath, relativePath });
118
+ }
119
+ catch (error) {
120
+ logger_1.logger.error(`Error reading file reference ${relativePath}:`, error);
121
+ results.push(null);
122
+ }
123
+ }
124
+ return results;
125
+ }
126
+ exports.readFileReference = readFileReference;
127
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/tools/skills/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8DAAiC;AAEjC,yCAAsC;AAMtC,SAAgB,SAAS,CAAC,GAAW,EAAE,QAAgB;IACrD,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,IAAI;QACF,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;YAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAE5C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;gBACvB,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;aAChD;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACpD,OAAO,CAAC,IAAI,CAA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,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;SACvD;QAAC,OAAO,KAAK,EAAE;YACd,eAAM,CAAC,KAAK,CAAC,gCAAgC,YAAY,GAAG,EAAE,KAAK,CAAC,CAAC;YACrE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpB;KACF;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAjDD,8CAiDC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@axinom/mosaic-agent-skills",
3
+ "version": "0.0.1",
4
+ "description": "MCP server bundled with Mosaic development skills and tools for AI agents",
5
+ "bin": "./dist/index.js",
6
+ "files": [
7
+ "dist",
8
+ "skills"
9
+ ],
10
+ "author": "Axinom",
11
+ "license": "PROPRIETARY",
12
+ "main": "dist/index.js",
13
+ "types": "dist/index.d.ts",
14
+ "scripts": {
15
+ "dev": "tsc --watch",
16
+ "clean": "rimraf dist",
17
+ "build": "yarn clean && tsc",
18
+ "build:ci": "yarn workspaces focus && yarn build",
19
+ "ts:validate": "tsc",
20
+ "start": "node dist/index.js",
21
+ "lint": "eslint . --ext .ts,.tsx,.js --color --cache"
22
+ },
23
+ "dependencies": {
24
+ "@modelcontextprotocol/sdk": "1.22.0",
25
+ "graphql": "^15.4.0",
26
+ "gray-matter": "^4.0.3",
27
+ "zod": "^3.25.76"
28
+ },
29
+ "devDependencies": {
30
+ "@cfworker/json-schema": "^4.1.1",
31
+ "@types/node": "^18.11.18",
32
+ "eslint": "^8.35.0",
33
+ "rimraf": "^3.0.2",
34
+ "typescript": "^5.0.4"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "gitHead": "712f0269fe00206f83d9a8d7a6bfb978b693fd2e"
40
+ }
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: execution-summary
3
+ input:
4
+ - All actions performed
5
+ - All generated files
6
+ - EntityFeatures
7
+ - TODOs collected during generation
8
+ output:
9
+ - Execution summary printed to user
10
+ ---
11
+
12
+ # Print Execution Summary
13
+
14
+ Display a comprehensive summary of the skill execution showing what was
15
+ generated, configured, registered, and what remains to be done.
16
+
17
+ ## Summary Structure
18
+
19
+ ### 1. Success Header
20
+
21
+ ```
22
+ ✅ {Station Type} Generated: {EntityName}
23
+ ```
24
+
25
+ ### 2. Generated Files (Tree Structure)
26
+
27
+ Display hierarchical tree of all created/modified files using proper indentation
28
+ and visual indicators (├──, └──). Group by logical sections.
29
+
30
+ ### 3. TODOs in Generated Code
31
+
32
+ List all TODO comments found in generated files with file:line references.
33
+ Format: `- {file}:{line} - {TODO message}`
34
+
35
+ ## Emoji Indicators
36
+
37
+ Use these consistently across all summaries:
38
+
39
+ - ✅ Success/completion
40
+ - 📁 Files/directories
41
+ - 📊 Configuration/data
42
+ - 📋 TODOs/tasks
43
+ - 📝 Notes/recommendations
44
+ - ⚠️ Warnings/attention needed
45
+
46
+ ## Formatting Guidelines
47
+
48
+ - Use clear hierarchy with headers
49
+ - Align related information visually
50
+ - Keep paths relative to workflowsPath for brevity
51
+ - Group similar items together
52
+ - Use consistent spacing and indentation
53
+ - Make the summary scannable at a glance
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: typescript-codegen
3
+ input:
4
+ - Generated GraphQL file(s)
5
+ output:
6
+ - TypeScript types in generated/graphql.tsx
7
+ ---
8
+
9
+ # Run GraphQL Codegen
10
+
11
+ Generate TypeScript types from GraphQL operations.
12
+
13
+ ## Command
14
+
15
+ ```bash
16
+ cd {workflowsPath}
17
+ yarn codegen
18
+ ```
19
+
20
+ ## Success Criteria
21
+
22
+ Codegen must succeed with zero errors before proceeding.
23
+
24
+ ## Error Handling
25
+
26
+ If codegen fails:
27
+
28
+ 1. Check GraphQL syntax in .graphql files
29
+ 2. Ensure all referenced types exist in schema
30
+ 3. The `codegen.yml` refers to the running service GQL endpoint, so if the
31
+ endpoint is not up, inform the user to start it to resume the work
32
+ 4. Fix errors and re-run codegen
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: typescript-validation
3
+ input:
4
+ - All generated TypeScript files
5
+ output:
6
+ - TypeScript compilation verification
7
+ ---
8
+
9
+ # Validate TypeScript Compilation
10
+
11
+ Run TypeScript compiler to verify all generated files compile successfully.
12
+
13
+ ## Command
14
+
15
+ ```bash
16
+ cd {workflowsPath}
17
+ yarn tsc --noEmit
18
+ ```
19
+
20
+ ## Success Criteria
21
+
22
+ Compilation must succeed with zero errors before proceeding.
23
+
24
+ ## Error Handling
25
+
26
+ If compilation fails:
27
+
28
+ 1. Review error messages carefully
29
+ 2. Check import paths are correct
30
+ 3. Verify all generated types match GraphQL schema
31
+ 4. Ensure all required dependencies are imported
32
+ 5. Fix issues and re-run validation