From 8edff22c0be2023bd98be01f14ef7c5871849530 Mon Sep 17 00:00:00 2001 From: dotta Date: Thu, 19 Mar 2026 08:27:39 -0500 Subject: [PATCH] Add skills section to company export README Lists all skills in a markdown table with name, description, and source. GitHub and URL-sourced skills render as clickable links to their repository. Co-Authored-By: Paperclip Co-Authored-By: Claude Opus 4.6 --- server/src/services/company-export-readme.ts | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/server/src/services/company-export-readme.ts b/server/src/services/company-export-readme.ts index 72ebe8b1..83c18fdb 100644 --- a/server/src/services/company-export-readme.ts +++ b/server/src/services/company-export-readme.ts @@ -55,6 +55,19 @@ function mermaidEscape(s: string): string { return s.replace(/"/g, """).replace(//g, ">"); } +/** Build a display label for a skill's source, linking to GitHub when available. */ +function skillSourceLabel(skill: CompanyPortabilityManifest["skills"][number]): string { + if (skill.sourceLocator) { + // For GitHub or URL sources, render as a markdown link + if (skill.sourceType === "github" || skill.sourceType === "url") { + return `[${skill.sourceType}](${skill.sourceLocator})`; + } + return skill.sourceLocator; + } + if (skill.sourceType === "local") return "local"; + return skill.sourceType ?? "\u2014"; +} + /** * Generate the README.md content for a company export. */ @@ -127,6 +140,20 @@ export function generateReadme( lines.push(""); } + // Skills list + if (manifest.skills.length > 0) { + lines.push("### Skills"); + lines.push(""); + lines.push("| Skill | Description | Source |"); + lines.push("|-------|-------------|--------|"); + for (const skill of manifest.skills) { + const desc = skill.description ?? "\u2014"; + const source = skillSourceLabel(skill); + lines.push(`| ${skill.name} | ${desc} | ${source} |`); + } + lines.push(""); + } + // Getting Started lines.push("## Getting Started"); lines.push("");