@agentlee5/agent-skills 1.0.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/.leeway/config.json +133 -0
- package/LICENSE +21 -0
- package/LeeWay-Standards/LICENSE +21 -0
- package/LeeWay-Standards/README.md +324 -0
- package/LeeWay-Standards/examples/NexusButton.tsx +90 -0
- package/LeeWay-Standards/examples/example-agent.js +89 -0
- package/LeeWay-Standards/package.json +61 -0
- package/LeeWay-Standards/schemas/leeway-config.schema.json +81 -0
- package/LeeWay-Standards/schemas/leeway-header.schema.json +63 -0
- package/LeeWay-Standards/src/agents/discovery/architecture-map-agent.js +134 -0
- package/LeeWay-Standards/src/agents/discovery/docs-agent.js +126 -0
- package/LeeWay-Standards/src/agents/discovery/explain-agent.js +95 -0
- package/LeeWay-Standards/src/agents/discovery/intent-registry-agent.js +119 -0
- package/LeeWay-Standards/src/agents/discovery/schema-agent.js +116 -0
- package/LeeWay-Standards/src/agents/discovery/sitemap-agent.js +88 -0
- package/LeeWay-Standards/src/agents/governance/align-agent.js +155 -0
- package/LeeWay-Standards/src/agents/governance/assess-agent.js +161 -0
- package/LeeWay-Standards/src/agents/governance/audit-agent.js +185 -0
- package/LeeWay-Standards/src/agents/integrity/circular-dependency-agent.js +88 -0
- package/LeeWay-Standards/src/agents/integrity/dependency-graph-agent.js +107 -0
- package/LeeWay-Standards/src/agents/integrity/duplicate-logic-agent.js +108 -0
- package/LeeWay-Standards/src/agents/integrity/import-agent.js +83 -0
- package/LeeWay-Standards/src/agents/integrity/module-policy-agent.js +94 -0
- package/LeeWay-Standards/src/agents/integrity/refactor-scan-agent.js +113 -0
- package/LeeWay-Standards/src/agents/integrity/syntax-agent.js +84 -0
- package/LeeWay-Standards/src/agents/mcp/endpoint-agent.js +106 -0
- package/LeeWay-Standards/src/agents/mcp/env-agent.js +111 -0
- package/LeeWay-Standards/src/agents/mcp/health-agent-lite.js +119 -0
- package/LeeWay-Standards/src/agents/mcp/manifest-agent.js +87 -0
- package/LeeWay-Standards/src/agents/mcp/port-agent.js +125 -0
- package/LeeWay-Standards/src/agents/mcp/process-agent.js +124 -0
- package/LeeWay-Standards/src/agents/mcp/runtime-agent.js +108 -0
- package/LeeWay-Standards/src/agents/mcp/transport-agent.js +78 -0
- package/LeeWay-Standards/src/agents/orchestration/doctor-agent.js +149 -0
- package/LeeWay-Standards/src/agents/orchestration/memory-agent-lite.js +125 -0
- package/LeeWay-Standards/src/agents/orchestration/router-agent.js +110 -0
- package/LeeWay-Standards/src/agents/security/permission-agent.js +98 -0
- package/LeeWay-Standards/src/agents/security/policy-agent.js +100 -0
- package/LeeWay-Standards/src/agents/security/privacy-agent.js +83 -0
- package/LeeWay-Standards/src/agents/security/prompt-security-agent.js +103 -0
- package/LeeWay-Standards/src/agents/security/secret-scan-agent.js +108 -0
- package/LeeWay-Standards/src/agents/security/tool-access-agent.js +105 -0
- package/LeeWay-Standards/src/agents/standards/authority-agent.js +114 -0
- package/LeeWay-Standards/src/agents/standards/discovery-pipeline-agent.js +91 -0
- package/LeeWay-Standards/src/agents/standards/header-agent.js +120 -0
- package/LeeWay-Standards/src/agents/standards/placement-agent.js +96 -0
- package/LeeWay-Standards/src/agents/standards/region-agent.js +99 -0
- package/LeeWay-Standards/src/agents/standards/registry-agent.js +153 -0
- package/LeeWay-Standards/src/agents/standards/tag-agent.js +111 -0
- package/LeeWay-Standards/src/cli/leeway.js +225 -0
- package/LeeWay-Standards/src/core/compliance-scorer.js +168 -0
- package/LeeWay-Standards/src/core/compliance-scorer.test.js +121 -0
- package/LeeWay-Standards/src/core/header-parser.js +207 -0
- package/LeeWay-Standards/src/core/header-parser.test.js +198 -0
- package/LeeWay-Standards/src/core/region-classifier.js +137 -0
- package/LeeWay-Standards/src/core/region-classifier.test.js +100 -0
- package/LeeWay-Standards/src/core/tag-validator.js +139 -0
- package/LeeWay-Standards/src/core/tag-validator.test.js +109 -0
- package/LeeWay-Standards/src/index.js +83 -0
- package/README.md +217 -0
- package/agent-config.yaml +456 -0
- package/agentbage.png.png +0 -0
- package/bin/leeway-skills-badge.js +52 -0
- package/bin/leeway-skills-mcp.js +48 -0
- package/bin/leeway-skills.js +160 -0
- package/bin/leeway-standards.js +49 -0
- package/config/.skillsignore +63 -0
- package/config/skills-config.json +70 -0
- package/documents/AGENT_LEARNING_REFERENCE.md +329 -0
- package/documents/AGENT_LEE_INTEGRATION.md +534 -0
- package/documents/COMPLETE_SYSTEM_OVERVIEW.md +502 -0
- package/documents/COMPREHENSIVE_SKILL_INTEGRATION_PLAN.md +644 -0
- package/documents/DIRECTORY_MAP.md +323 -0
- package/documents/EXTENDING.md +514 -0
- package/documents/FILE_DIRECTORY_GUIDE.md +427 -0
- package/documents/LEEWAY_BADGE_INTEGRATION.md +76 -0
- package/documents/LEEWAY_IMPLEMENTATION_SUMMARY.md +384 -0
- package/documents/LEEWAY_INTEGRATION_GUIDE.md +414 -0
- package/documents/LEEWAY_NPM_SDK.md +66 -0
- package/documents/LEEWAY_QUICK_START.md +288 -0
- package/documents/LEEWAY_SKILLS_BRANDING.md +375 -0
- package/documents/LEEWAY_SKILLS_MCP_SUMMARY.md +593 -0
- package/documents/LEEWAY_STANDARDS_COMPLIANCE.md +361 -0
- package/documents/LEEWAY_UNIFIED_ARCHITECTURE.md +473 -0
- package/documents/LEEWAY_WORKFLOWS_QUICK_REFERENCE.md +307 -0
- package/documents/LEEWAY_WORKFLOWS_STRATEGIC_PLAN.md +515 -0
- package/documents/LIFELONG_LEARNING_LAYER.md +478 -0
- package/documents/MCP_ARCHITECTURE.md +683 -0
- package/documents/QUICK_REFERENCE.md +301 -0
- package/documents/SETUP.md +325 -0
- package/documents/SETUP_SUMMARY.md +413 -0
- package/documents/SKILL_ACQUISITION_EXECUTIVE_SUMMARY.md +373 -0
- package/documents/SKILL_ACQUISITION_IMPLEMENTATION.md +692 -0
- package/documents/SKILL_ACQUISITION_MANIFEST.md +404 -0
- package/documents/SKILL_ACQUISITION_QUICK_REFERENCE.md +349 -0
- package/documents/SKILL_WORKFLOW_COMPOSITION_MATRIX.md +537 -0
- package/documents/STRUCTURE.md +382 -0
- package/documents/SYSTEM_TRANSFORMATION_SUMMARY.md +560 -0
- package/documents/USAGE.md +390 -0
- package/documents/WORKFLOW_ACQUISITION_MANIFEST.md +576 -0
- package/documents/aiskills.txt +460 -0
- package/mcp-server/README.md +697 -0
- package/mcp-server/dist/badge-proof.d.ts +66 -0
- package/mcp-server/dist/badge-proof.d.ts.map +1 -0
- package/mcp-server/dist/badge-proof.js +324 -0
- package/mcp-server/dist/badge-proof.js.map +1 -0
- package/mcp-server/dist/index.d.ts +64 -0
- package/mcp-server/dist/index.d.ts.map +1 -0
- package/mcp-server/dist/index.js +263 -0
- package/mcp-server/dist/index.js.map +1 -0
- package/mcp-server/dist/install-badge-proof.d.ts +3 -0
- package/mcp-server/dist/install-badge-proof.d.ts.map +1 -0
- package/mcp-server/dist/install-badge-proof.js +109 -0
- package/mcp-server/dist/install-badge-proof.js.map +1 -0
- package/mcp-server/package.json +43 -0
- package/mcp-server/src/badge-proof.ts +469 -0
- package/mcp-server/src/index.ts +355 -0
- package/mcp-server/src/install-badge-proof.ts +132 -0
- package/mcp-server/tsconfig.json +22 -0
- package/package.json +84 -0
- package/scripts/init-leeway.js +217 -0
- package/scripts/leeway-agents/compliance-monitor.js +374 -0
- package/scripts/leeway-agents/header-injector.js +321 -0
- package/scripts/skill-integration-toolkit.py +319 -0
- package/scripts/skills-registry.json +1117 -0
- package/scripts/sync-skills.ps1 +275 -0
- package/scripts/verify-leeway-setup.js +249 -0
- package/scripts/workflow-integration-toolkit.py +522 -0
- package/sdk/application-installer.js +92 -0
- package/sdk/index.js +43 -0
- package/sdk/paths.js +167 -0
- package/skills/agent-autonomy/autonomous-conductor/SKILL.md +206 -0
- package/skills/agent-autonomy/full-stack-delivery/SKILL.md +206 -0
- package/skills/agent-orchestration/multi-agent-orchestration/SKILL.md +68 -0
- package/skills/agent-patterns/agent-design-patterns/SKILL.md +70 -0
- package/skills/ai-ml/llm-prompting/SKILL.md +71 -0
- package/skills/ai-ml/ml-model-development/SKILL.md +67 -0
- package/skills/ai-ml/multimodal-systems/SKILL.md +71 -0
- package/skills/ai-ml/retrieval-generation-fine-tuning/SKILL.md +71 -0
- package/skills/architecture/system-design/SKILL.md +67 -0
- package/skills/code-analysis/refactoring/SKILL.md +64 -0
- package/skills/code-analysis/security-vulnerability-scanning/SKILL.md +71 -0
- package/skills/code-analysis/static-analysis/SKILL.md +64 -0
- package/skills/code-generation/full-stack-application/SKILL.md +70 -0
- package/skills/code-generation/microservices-architecture/SKILL.md +71 -0
- package/skills/code-generation/python-codegen/SKILL.md +64 -0
- package/skills/code-generation/typescript-codegen/SKILL.md +64 -0
- package/skills/data-analysis/advanced-analytics/SKILL.md +71 -0
- package/skills/data-analysis/pandas-analysis/SKILL.md +66 -0
- package/skills/database-design/database-design-optimization/SKILL.md +70 -0
- package/skills/debugging/javascript-debugging/SKILL.md +67 -0
- package/skills/debugging/python-debugging/SKILL.md +67 -0
- package/skills/devops/dockerfile-creation/SKILL.md +64 -0
- package/skills/devops/kubernetes-deployment/SKILL.md +65 -0
- package/skills/documentation/api-documentation/SKILL.md +67 -0
- package/skills/error-handling/resilience-patterns/SKILL.md +70 -0
- package/skills/git-workflow/git-collaboration/SKILL.md +67 -0
- package/skills/infrastructure/cicd-pipelines/SKILL.md +70 -0
- package/skills/infrastructure/infrastructure-as-code/SKILL.md +70 -0
- package/skills/observability/monitoring-and-observability/SKILL.md +70 -0
- package/skills/performance-optimization/performance-engineering/SKILL.md +70 -0
- package/skills/prompt-optimization/prompt-engineering-advanced/SKILL.md +70 -0
- package/skills/quality-assurance/deployment-validator/SKILL.md +382 -0
- package/skills/quality-assurance/web-security-sweep/SKILL.md +320 -0
- package/skills/rag-knowledge/rag-systems/SKILL.md +70 -0
- package/skills/research/knowledge-synthesis/SKILL.md +71 -0
- package/skills/security/authentication-authorization/SKILL.md +71 -0
- package/skills/security/code-security/SKILL.md +66 -0
- package/skills/security/secure-architecture/SKILL.md +71 -0
- package/skills/self-optimization/dev-loop-optimizer/SKILL.md +344 -0
- package/skills/self-optimization/memory-learning/SKILL.md +335 -0
- package/skills/self-optimization/runtime-self-profiling/SKILL.md +250 -0
- package/skills/testing/advanced-testing-strategies/SKILL.md +71 -0
- package/skills/testing/integration-testing/SKILL.md +66 -0
- package/skills/testing/load-testing-capacity/SKILL.md +71 -0
- package/skills/testing/unit-testing/SKILL.md +66 -0
- package/skills/tool-integration/custom-tool-creation/SKILL.md +70 -0
- package/skills/web-development/advanced-frontend-patterns/SKILL.md +71 -0
- package/skills/web-development/api-design/SKILL.md +71 -0
- package/skills/web-development/css-styling/SKILL.md +67 -0
- package/skills/web-development/react-development/SKILL.md +79 -0
- package/skills/workflow-composition/workflow-orchestration/SKILL.md +70 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
LEEWAY HEADER — DO NOT REMOVE
|
|
5
|
+
|
|
6
|
+
REGION: LEEWAY.SKILLS.MCP
|
|
7
|
+
TAG: LEEWAY.SKILLS.MCP.SERVER
|
|
8
|
+
|
|
9
|
+
COLOR_ONION_HEX:
|
|
10
|
+
NEON=#39FF14
|
|
11
|
+
FLUO=#0DFF94
|
|
12
|
+
PASTEL=#C7FFD8
|
|
13
|
+
|
|
14
|
+
ICON_ASCII:
|
|
15
|
+
family=lucide
|
|
16
|
+
glyph=server
|
|
17
|
+
|
|
18
|
+
5WH:
|
|
19
|
+
WHAT = Leeway Skills MCP Server - Exposes all Leeway Skills as callable MCP tools
|
|
20
|
+
WHY = Enables Agent Lee and other LLMs to use skills as first-class tools via MCP protocol
|
|
21
|
+
WHO = Leeway Industries (By Leonard Jerome Lee)
|
|
22
|
+
WHERE = mcp-server/src/index.ts
|
|
23
|
+
WHEN = 2026
|
|
24
|
+
HOW = Node.js MCP server that reads skill definitions and exposes them as callable tools
|
|
25
|
+
|
|
26
|
+
AGENTS:
|
|
27
|
+
SERVE
|
|
28
|
+
EXECUTE
|
|
29
|
+
INTROSPECT
|
|
30
|
+
|
|
31
|
+
LICENSE:
|
|
32
|
+
MIT
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
36
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
37
|
+
import {
|
|
38
|
+
CallToolRequestSchema,
|
|
39
|
+
ListToolsRequestSchema,
|
|
40
|
+
Tool
|
|
41
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
42
|
+
import fs from "fs/promises";
|
|
43
|
+
import path from "path";
|
|
44
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
45
|
+
|
|
46
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
47
|
+
const __dirname = path.dirname(__filename);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* SkillsTool - Maps a Leeway Skill to an MCP Tool
|
|
51
|
+
*/
|
|
52
|
+
export interface SkillsTool {
|
|
53
|
+
name: string;
|
|
54
|
+
category: string;
|
|
55
|
+
description: string;
|
|
56
|
+
capabilities: string[];
|
|
57
|
+
tags: string[];
|
|
58
|
+
skillPath: string;
|
|
59
|
+
version: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface SkillRegistryEntry {
|
|
63
|
+
name: string;
|
|
64
|
+
category: string;
|
|
65
|
+
path: string;
|
|
66
|
+
version?: string;
|
|
67
|
+
tags?: string[];
|
|
68
|
+
description: string;
|
|
69
|
+
capabilities?: string[];
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface SkillRegistry {
|
|
74
|
+
skills?: SkillRegistryEntry[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ToolCallArguments {
|
|
78
|
+
instruction: string;
|
|
79
|
+
context?: Record<string, unknown>;
|
|
80
|
+
options?: Record<string, unknown>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* LeewaySkillsMCPServer - Main MCP server implementation
|
|
85
|
+
*
|
|
86
|
+
* Provides:
|
|
87
|
+
* - Tool listing (all available skills)
|
|
88
|
+
* - Tool invocation (execute skill logic)
|
|
89
|
+
* - Tool introspection (get skill metadata)
|
|
90
|
+
*/
|
|
91
|
+
export class LeewaySkillsMCPServer {
|
|
92
|
+
private server: Server;
|
|
93
|
+
private skills: Map<string, SkillsTool> = new Map();
|
|
94
|
+
private registryPath: string;
|
|
95
|
+
|
|
96
|
+
constructor() {
|
|
97
|
+
this.registryPath = path.resolve(
|
|
98
|
+
__dirname,
|
|
99
|
+
"../../scripts/skills-registry.json",
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
this.server = new Server(
|
|
103
|
+
{
|
|
104
|
+
name: "leeway-skills-mcp",
|
|
105
|
+
version: "1.0.0",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
capabilities: {
|
|
109
|
+
tools: {},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
this.setupHandlers();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Load all skills from the registry
|
|
119
|
+
*/
|
|
120
|
+
async loadSkills(): Promise<void> {
|
|
121
|
+
try {
|
|
122
|
+
const registryContent = await fs.readFile(this.registryPath, "utf-8");
|
|
123
|
+
const registry = JSON.parse(registryContent) as SkillRegistry;
|
|
124
|
+
|
|
125
|
+
if (registry.skills && Array.isArray(registry.skills)) {
|
|
126
|
+
registry.skills.forEach((skill) => {
|
|
127
|
+
if (skill.enabled) {
|
|
128
|
+
const skillId = skill.name.toLowerCase().replace(/\s+/g, "-");
|
|
129
|
+
|
|
130
|
+
this.skills.set(skillId, {
|
|
131
|
+
name: skill.name,
|
|
132
|
+
category: skill.category,
|
|
133
|
+
description: skill.description,
|
|
134
|
+
capabilities: skill.capabilities || [],
|
|
135
|
+
tags: skill.tags || [],
|
|
136
|
+
skillPath: skill.path,
|
|
137
|
+
version: skill.version || "1.0.0",
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
console.error(
|
|
144
|
+
`[Leeway Skills MCP] Loaded ${this.skills.size} skills from registry`,
|
|
145
|
+
);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error(
|
|
148
|
+
`[Leeway Skills MCP] Error loading skills registry:`,
|
|
149
|
+
error,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Setup MCP handlers
|
|
156
|
+
*/
|
|
157
|
+
private setupHandlers(): void {
|
|
158
|
+
/**
|
|
159
|
+
* Handle tool listing
|
|
160
|
+
*/
|
|
161
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
162
|
+
const tools: Tool[] = [];
|
|
163
|
+
|
|
164
|
+
for (const [skillId, skill] of this.skills) {
|
|
165
|
+
tools.push({
|
|
166
|
+
name: skillId,
|
|
167
|
+
description: `${skill.description}\n\nCategory: ${skill.category}\nCapabilities: ${skill.capabilities.join(", ")}`,
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
instruction: {
|
|
172
|
+
type: "string",
|
|
173
|
+
description: `Detailed instruction for applying the ${skill.name} skill`,
|
|
174
|
+
},
|
|
175
|
+
context: {
|
|
176
|
+
type: "object",
|
|
177
|
+
description: "Additional context or code to analyze/generate",
|
|
178
|
+
properties: {
|
|
179
|
+
code: { type: "string" },
|
|
180
|
+
files: { type: "array", items: { type: "string" } },
|
|
181
|
+
requirements: { type: "string" },
|
|
182
|
+
framework: { type: "string" },
|
|
183
|
+
language: { type: "string" },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
options: {
|
|
187
|
+
type: "object",
|
|
188
|
+
description: "Skill-specific options and parameters",
|
|
189
|
+
additionalProperties: true,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
required: ["instruction"],
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return { tools };
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Handle tool execution
|
|
202
|
+
*/
|
|
203
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
204
|
+
const toolName = request.params.name;
|
|
205
|
+
const skill = this.skills.get(toolName);
|
|
206
|
+
|
|
207
|
+
if (!skill) {
|
|
208
|
+
return {
|
|
209
|
+
content: [
|
|
210
|
+
{
|
|
211
|
+
type: "text" as const,
|
|
212
|
+
text: `Error: Skill "${toolName}" not found. Available skills: ${Array.from(this.skills.keys()).join(", ")}`,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
isError: true,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
try {
|
|
220
|
+
const result = await this.executeSkill(
|
|
221
|
+
skill,
|
|
222
|
+
this.normalizeToolArgs(request.params.arguments),
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
content: [
|
|
227
|
+
{
|
|
228
|
+
type: "text" as const,
|
|
229
|
+
text: result,
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
};
|
|
233
|
+
} catch (error) {
|
|
234
|
+
return {
|
|
235
|
+
content: [
|
|
236
|
+
{
|
|
237
|
+
type: "text" as const,
|
|
238
|
+
text: `Error executing skill "${toolName}": ${error instanceof Error ? error.message : String(error)}`,
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
isError: true,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Execute a skill with given parameters
|
|
249
|
+
*/
|
|
250
|
+
private async executeSkill(
|
|
251
|
+
skill: SkillsTool,
|
|
252
|
+
args: ToolCallArguments,
|
|
253
|
+
): Promise<string> {
|
|
254
|
+
const { instruction, context = {}, options = {} } = args;
|
|
255
|
+
|
|
256
|
+
// Try to load the skill SKILL.md file for detailed instructions
|
|
257
|
+
let skillInstructions = "";
|
|
258
|
+
try {
|
|
259
|
+
const skillPath = path.resolve(
|
|
260
|
+
__dirname,
|
|
261
|
+
`../../${skill.skillPath}/SKILL.md`,
|
|
262
|
+
);
|
|
263
|
+
skillInstructions = await fs.readFile(skillPath, "utf-8");
|
|
264
|
+
} catch {
|
|
265
|
+
skillInstructions = `# ${skill.name}\n\n${skill.description}\n\nCapabilities: ${skill.capabilities.join(", ")}`;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Build the skill execution prompt
|
|
269
|
+
const executionPrompt = `
|
|
270
|
+
Executing the "${skill.name}" skill from Leeway Skills.
|
|
271
|
+
|
|
272
|
+
SKILL DOCUMENTATION:
|
|
273
|
+
${skillInstructions}
|
|
274
|
+
|
|
275
|
+
USER INSTRUCTION:
|
|
276
|
+
${instruction}
|
|
277
|
+
|
|
278
|
+
CONTEXT PROVIDED:
|
|
279
|
+
${JSON.stringify(context, null, 2)}
|
|
280
|
+
|
|
281
|
+
OPTIONS:
|
|
282
|
+
${JSON.stringify(options, null, 2)}
|
|
283
|
+
|
|
284
|
+
Please execute this skill instruction using the skill's expertise and capabilities.
|
|
285
|
+
Provide structured, actionable output that can be directly used.
|
|
286
|
+
Reference specific techniques from the skill documentation when applicable.
|
|
287
|
+
`;
|
|
288
|
+
|
|
289
|
+
return executionPrompt;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
private normalizeToolArgs(args: Record<string, unknown> | undefined): ToolCallArguments {
|
|
293
|
+
const instruction =
|
|
294
|
+
typeof args?.instruction === "string" ? args.instruction : "";
|
|
295
|
+
const context =
|
|
296
|
+
args?.context && typeof args.context === "object"
|
|
297
|
+
? (args.context as Record<string, unknown>)
|
|
298
|
+
: {};
|
|
299
|
+
const options =
|
|
300
|
+
args?.options && typeof args.options === "object"
|
|
301
|
+
? (args.options as Record<string, unknown>)
|
|
302
|
+
: {};
|
|
303
|
+
|
|
304
|
+
return { instruction, context, options };
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Start the MCP server
|
|
309
|
+
*/
|
|
310
|
+
async start(): Promise<void> {
|
|
311
|
+
await this.loadSkills();
|
|
312
|
+
|
|
313
|
+
// Connect transport
|
|
314
|
+
const transport = new StdioServerTransport();
|
|
315
|
+
await this.server.connect(transport);
|
|
316
|
+
|
|
317
|
+
console.error("[Leeway Skills MCP] Server started successfully");
|
|
318
|
+
console.error(`[Leeway Skills MCP] Serving ${this.skills.size} skills`);
|
|
319
|
+
console.error("[Leeway Skills MCP] Ready to accept tool calls from LLMs");
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export async function startLeewaySkillsMCPServer(): Promise<LeewaySkillsMCPServer> {
|
|
324
|
+
const server = new LeewaySkillsMCPServer();
|
|
325
|
+
await server.start();
|
|
326
|
+
return server;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function isDirectExecution(): boolean {
|
|
330
|
+
if (!process.argv[1]) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Main entry point
|
|
339
|
+
*/
|
|
340
|
+
async function main(): Promise<void> {
|
|
341
|
+
await startLeewaySkillsMCPServer();
|
|
342
|
+
|
|
343
|
+
// Handle graceful shutdown
|
|
344
|
+
process.on("SIGINT", () => {
|
|
345
|
+
console.error("[Leeway Skills MCP] Shutting down gracefully...");
|
|
346
|
+
process.exit(0);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if (isDirectExecution()) {
|
|
351
|
+
main().catch((error) => {
|
|
352
|
+
console.error("[Leeway Skills MCP] Fatal error:", error);
|
|
353
|
+
process.exit(1);
|
|
354
|
+
});
|
|
355
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
LEEWAY HEADER — DO NOT REMOVE
|
|
5
|
+
|
|
6
|
+
REGION: LEEWAY.SKILLS.BADGE
|
|
7
|
+
TAG: LEEWAY.SKILLS.BADGE.INSTALLER
|
|
8
|
+
|
|
9
|
+
COLOR_ONION_HEX:
|
|
10
|
+
NEON=#39FF14
|
|
11
|
+
FLUO=#0DFF94
|
|
12
|
+
PASTEL=#C7FFD8
|
|
13
|
+
|
|
14
|
+
ICON_ASCII:
|
|
15
|
+
family=lucide
|
|
16
|
+
glyph=package-plus
|
|
17
|
+
|
|
18
|
+
5WH:
|
|
19
|
+
WHAT = CLI installer for the Leeway Skills badge proof bundle
|
|
20
|
+
WHY = Makes it easy to drop a verified Leeway Skills badge into another application
|
|
21
|
+
WHO = Leeway Industries (By Leonard Jerome Lee)
|
|
22
|
+
WHERE = mcp-server/src/install-badge-proof.ts
|
|
23
|
+
WHEN = 2026
|
|
24
|
+
HOW = Parses CLI arguments, installs the badge bundle, and prints the integration output paths
|
|
25
|
+
|
|
26
|
+
AGENTS:
|
|
27
|
+
EXECUTE
|
|
28
|
+
|
|
29
|
+
LICENSE:
|
|
30
|
+
MIT
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
import path from "path";
|
|
34
|
+
import {
|
|
35
|
+
installLeewaySkillsBadgeBundle,
|
|
36
|
+
type InstallBadgeBundleOptions,
|
|
37
|
+
} from "./badge-proof.js";
|
|
38
|
+
|
|
39
|
+
function getArg(flag: string): string | undefined {
|
|
40
|
+
const index = process.argv.indexOf(flag);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return process.argv[index + 1];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function hasFlag(flag: string): boolean {
|
|
49
|
+
return process.argv.includes(flag);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getPositionalArgs(): string[] {
|
|
53
|
+
const rawArgs = process.argv.slice(2);
|
|
54
|
+
const positional: string[] = [];
|
|
55
|
+
|
|
56
|
+
for (let index = 0; index < rawArgs.length; index += 1) {
|
|
57
|
+
const arg = rawArgs[index];
|
|
58
|
+
if (arg.startsWith("--")) {
|
|
59
|
+
if (arg !== "--help") {
|
|
60
|
+
index += 1;
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
positional.push(arg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return positional;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function printHelp(): void {
|
|
72
|
+
console.log(`Leeway Skills Badge Proof Installer
|
|
73
|
+
|
|
74
|
+
Usage:
|
|
75
|
+
node dist/install-badge-proof.js --target <dir> [options]
|
|
76
|
+
|
|
77
|
+
Options:
|
|
78
|
+
--target <dir> Directory to receive the badge bundle
|
|
79
|
+
--app-name <name> Application name shown in the badge proof
|
|
80
|
+
--app-version <version> Application version stored in the proof manifest
|
|
81
|
+
--app-url <url> Application URL stored in the proof manifest
|
|
82
|
+
--integration-method <id> Integration method label, default: mcp-server
|
|
83
|
+
--asset-dir <name> Asset subdirectory name, default: assets
|
|
84
|
+
--badge-file <name> Output badge filename, default: leeway-skills-agent-badge.png
|
|
85
|
+
--help Show this help output
|
|
86
|
+
`);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function main(): Promise<void> {
|
|
90
|
+
if (hasFlag("--help")) {
|
|
91
|
+
printHelp();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const positionalArgs = getPositionalArgs();
|
|
96
|
+
const targetArg = getArg("--target") ?? positionalArgs[0];
|
|
97
|
+
if (!targetArg) {
|
|
98
|
+
throw new Error("Missing required --target argument");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const options: InstallBadgeBundleOptions = {
|
|
102
|
+
targetDir: targetArg,
|
|
103
|
+
appName: getArg("--app-name") ?? positionalArgs[1],
|
|
104
|
+
appVersion: getArg("--app-version"),
|
|
105
|
+
appUrl: getArg("--app-url"),
|
|
106
|
+
integrationMethod:
|
|
107
|
+
getArg("--integration-method") ?? positionalArgs[2],
|
|
108
|
+
assetDirName: getArg("--asset-dir"),
|
|
109
|
+
badgeFileName: getArg("--badge-file"),
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const result = await installLeewaySkillsBadgeBundle(options);
|
|
113
|
+
|
|
114
|
+
console.log("[Leeway Skills Badge] Bundle installed");
|
|
115
|
+
console.log(` Target: ${result.targetDir}`);
|
|
116
|
+
console.log(` Proof: ${result.files.proof}`);
|
|
117
|
+
console.log(` Script: ${result.files.script}`);
|
|
118
|
+
console.log(` Style: ${result.files.style}`);
|
|
119
|
+
console.log(` Snippet: ${result.files.snippet}`);
|
|
120
|
+
console.log(` Badge: ${result.files.badge}`);
|
|
121
|
+
console.log(
|
|
122
|
+
` Active Skills: ${result.proof.leewaySkills.activeSkills} | Installed Skills: ${result.proof.leewaySkills.installedSkills}`,
|
|
123
|
+
);
|
|
124
|
+
console.log(
|
|
125
|
+
` Snippet Preview: ${path.join(result.targetDir, "leeway-skills-badge.html")}`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
main().catch((error) => {
|
|
130
|
+
console.error("[Leeway Skills Badge] Fatal error:", error);
|
|
131
|
+
process.exit(1);
|
|
132
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2020"],
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"types": ["node"],
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationMap": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true
|
|
19
|
+
},
|
|
20
|
+
"include": ["src/**/*"],
|
|
21
|
+
"exclude": ["node_modules", "dist"]
|
|
22
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentlee5/agent-skills",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Full Leeway Agent Skills application bundle for npm, including the MCP server, standards toolkit, skill library, workflows, badge assets, and governance automation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./sdk/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./sdk/index.js",
|
|
9
|
+
"./paths": "./sdk/paths.js",
|
|
10
|
+
"./installer": "./sdk/application-installer.js",
|
|
11
|
+
"./badge-proof": "./mcp-server/dist/badge-proof.js",
|
|
12
|
+
"./mcp": "./mcp-server/dist/index.js",
|
|
13
|
+
"./standards": "./LeeWay-Standards/src/index.js",
|
|
14
|
+
"./registry.json": "./scripts/skills-registry.json",
|
|
15
|
+
"./skills-config.json": "./config/skills-config.json",
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"leeway-agent-skills": "./bin/leeway-skills.js",
|
|
20
|
+
"leeway-agent-skills-mcp": "./bin/leeway-skills-mcp.js",
|
|
21
|
+
"leeway-agent-skills-badge": "./bin/leeway-skills-badge.js",
|
|
22
|
+
"leeway-agent-standards": "./bin/leeway-standards.js",
|
|
23
|
+
"leeway-skills": "./bin/leeway-skills.js",
|
|
24
|
+
"leeway-skills-mcp": "./bin/leeway-skills-mcp.js",
|
|
25
|
+
"leeway-skills-badge": "./bin/leeway-skills-badge.js",
|
|
26
|
+
"leeway-standards": "./bin/leeway-standards.js"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "npm --prefix mcp-server run build",
|
|
30
|
+
"prepack": "npm run build",
|
|
31
|
+
"pack:dry-run": "npm pack --dry-run",
|
|
32
|
+
"verify:package": "node ./bin/leeway-skills.js info"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"leeway",
|
|
36
|
+
"skills",
|
|
37
|
+
"sdk",
|
|
38
|
+
"mcp",
|
|
39
|
+
"agent",
|
|
40
|
+
"ai",
|
|
41
|
+
"governance",
|
|
42
|
+
"workflows",
|
|
43
|
+
"badge"
|
|
44
|
+
],
|
|
45
|
+
"author": "Leeway Industries (By Leonard Jerome Lee)",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@modelcontextprotocol/sdk": "^0.5.0"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
".leeway/config.json",
|
|
55
|
+
"LeeWay-Standards/LICENSE",
|
|
56
|
+
"LeeWay-Standards/README.md",
|
|
57
|
+
"LeeWay-Standards/examples/",
|
|
58
|
+
"LeeWay-Standards/package.json",
|
|
59
|
+
"LeeWay-Standards/schemas/",
|
|
60
|
+
"LeeWay-Standards/src/",
|
|
61
|
+
"LICENSE",
|
|
62
|
+
"README.md",
|
|
63
|
+
"agent-config.yaml",
|
|
64
|
+
"agentbage.png.png",
|
|
65
|
+
"bin/",
|
|
66
|
+
"config/",
|
|
67
|
+
"documents/",
|
|
68
|
+
"mcp-server/README.md",
|
|
69
|
+
"mcp-server/dist/",
|
|
70
|
+
"mcp-server/package.json",
|
|
71
|
+
"mcp-server/src/",
|
|
72
|
+
"mcp-server/tsconfig.json",
|
|
73
|
+
"scripts/",
|
|
74
|
+
"sdk/",
|
|
75
|
+
"skills/"
|
|
76
|
+
],
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "local"
|
|
80
|
+
},
|
|
81
|
+
"publishConfig": {
|
|
82
|
+
"access": "public"
|
|
83
|
+
}
|
|
84
|
+
}
|