skillui 1.1.8 → 1.2.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/dist/cli.js +130 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -100917,14 +100917,141 @@ async function generateSkill(profile, designMdContent, outputDir, screenshotPath
|
|
|
100917
100917
|
profile = { ...profile, fontSources: result.updatedSources };
|
|
100918
100918
|
bundledFontCount = result.bundledCount;
|
|
100919
100919
|
}
|
|
100920
|
-
const skillMd = generateSkillMd(profile, screenshotPath, ultraResult);
|
|
100921
|
-
fs13.writeFileSync(path14.join(skillDir, "SKILL.md"), skillMd, "utf-8");
|
|
100922
100920
|
const finalDesignMd = bundledFontCount > 0 ? generateDesignMd(profile, screenshotPath) : designMdContent;
|
|
100923
100921
|
fs13.writeFileSync(path14.join(refsDir, "DESIGN.md"), finalDesignMd, "utf-8");
|
|
100922
|
+
let skillMd = generateSkillMd(profile, screenshotPath, ultraResult);
|
|
100923
|
+
skillMd += embedReferenceFiles(refsDir, skillDir);
|
|
100924
|
+
fs13.writeFileSync(path14.join(skillDir, "SKILL.md"), skillMd, "utf-8");
|
|
100924
100925
|
const skillFile = path14.join(outputDir, `${skillDirName}.skill`);
|
|
100925
100926
|
await createZip(skillDir, skillFile);
|
|
100926
100927
|
return { skillDir, skillFile };
|
|
100927
100928
|
}
|
|
100929
|
+
function embedReferenceFiles(refsDir, skillDir) {
|
|
100930
|
+
let md = `
|
|
100931
|
+
---
|
|
100932
|
+
|
|
100933
|
+
# Full Reference Files
|
|
100934
|
+
|
|
100935
|
+
`;
|
|
100936
|
+
md += `> Every output file is embedded below. Claude has full design system context from /skills alone.
|
|
100937
|
+
|
|
100938
|
+
`;
|
|
100939
|
+
const refFiles = [
|
|
100940
|
+
{ file: "DESIGN.md", title: "Design System Tokens (DESIGN.md)" },
|
|
100941
|
+
{ file: "VISUAL_GUIDE.md", title: "Visual Guide \u2014 Screenshots (VISUAL_GUIDE.md)" },
|
|
100942
|
+
{ file: "ANIMATIONS.md", title: "Animations & Motion (ANIMATIONS.md)" },
|
|
100943
|
+
{ file: "LAYOUT.md", title: "Layout & Grid (LAYOUT.md)" },
|
|
100944
|
+
{ file: "COMPONENTS.md", title: "Component Patterns (COMPONENTS.md)" },
|
|
100945
|
+
{ file: "INTERACTIONS.md", title: "Interactions & States (INTERACTIONS.md)" }
|
|
100946
|
+
];
|
|
100947
|
+
for (const { file, title } of refFiles) {
|
|
100948
|
+
const filePath = path14.join(refsDir, file);
|
|
100949
|
+
if (!fs13.existsSync(filePath)) continue;
|
|
100950
|
+
let content = fs13.readFileSync(filePath, "utf-8").trim();
|
|
100951
|
+
if (content.startsWith("---")) {
|
|
100952
|
+
const end = content.indexOf("---", 3);
|
|
100953
|
+
if (end !== -1) content = content.slice(end + 3).trim();
|
|
100954
|
+
}
|
|
100955
|
+
md += `## ${title}
|
|
100956
|
+
|
|
100957
|
+
${content}
|
|
100958
|
+
|
|
100959
|
+
`;
|
|
100960
|
+
}
|
|
100961
|
+
const tokensDir = path14.join(skillDir, "tokens");
|
|
100962
|
+
const tokenFiles = ["colors.json", "spacing.json", "typography.json"];
|
|
100963
|
+
const tokenSections = [];
|
|
100964
|
+
for (const tf of tokenFiles) {
|
|
100965
|
+
const p = path14.join(tokensDir, tf);
|
|
100966
|
+
if (!fs13.existsSync(p)) continue;
|
|
100967
|
+
tokenSections.push(`### tokens/${tf}
|
|
100968
|
+
\`\`\`json
|
|
100969
|
+
${fs13.readFileSync(p, "utf-8").trim()}
|
|
100970
|
+
\`\`\``);
|
|
100971
|
+
}
|
|
100972
|
+
if (tokenSections.length > 0) {
|
|
100973
|
+
md += `## Design Tokens \u2014 JSON Files
|
|
100974
|
+
|
|
100975
|
+
${tokenSections.join("\n\n")}
|
|
100976
|
+
|
|
100977
|
+
`;
|
|
100978
|
+
}
|
|
100979
|
+
const fontsDir = path14.join(skillDir, "fonts");
|
|
100980
|
+
if (fs13.existsSync(fontsDir)) {
|
|
100981
|
+
const fontFiles = fs13.readdirSync(fontsDir).filter((f) => /\.(woff2?|ttf|otf)$/i.test(f));
|
|
100982
|
+
if (fontFiles.length > 0) {
|
|
100983
|
+
md += `## Bundled Fonts (fonts/)
|
|
100984
|
+
|
|
100985
|
+
`;
|
|
100986
|
+
md += `The following font files are bundled in the \`fonts/\` directory:
|
|
100987
|
+
|
|
100988
|
+
`;
|
|
100989
|
+
for (const f of fontFiles) {
|
|
100990
|
+
md += `- \`fonts/${f}\`
|
|
100991
|
+
`;
|
|
100992
|
+
}
|
|
100993
|
+
md += `
|
|
100994
|
+
Use these local font files in \`@font-face\` declarations instead of fetching from Google Fonts.
|
|
100995
|
+
|
|
100996
|
+
`;
|
|
100997
|
+
}
|
|
100998
|
+
}
|
|
100999
|
+
const screensDir = path14.join(skillDir, "screens");
|
|
101000
|
+
if (fs13.existsSync(screensDir)) {
|
|
101001
|
+
md += `## Screenshots Inventory (screens/)
|
|
101002
|
+
|
|
101003
|
+
`;
|
|
101004
|
+
md += `> Study all screenshots carefully before implementing any UI. Match every visual detail exactly.
|
|
101005
|
+
|
|
101006
|
+
`;
|
|
101007
|
+
const screenSubDirs = [
|
|
101008
|
+
{ dir: "scroll", label: "Scroll Journey", desc: "Cinematic scroll states \u2014 page visual at each scroll depth" },
|
|
101009
|
+
{ dir: "pages", label: "Full Page Screenshots", desc: "Full-page screenshots of each crawled URL" },
|
|
101010
|
+
{ dir: "sections", label: "Section Clips", desc: "Clipped individual sections and components" },
|
|
101011
|
+
{ dir: "states", label: "Interaction States", desc: "Hover, focus, and active state captures" }
|
|
101012
|
+
];
|
|
101013
|
+
for (const { dir: dir2, label, desc } of screenSubDirs) {
|
|
101014
|
+
const subDir = path14.join(screensDir, dir2);
|
|
101015
|
+
if (!fs13.existsSync(subDir)) continue;
|
|
101016
|
+
const imgs = fs13.readdirSync(subDir).filter((f) => /\.(png|jpg|jpeg|webp)$/i.test(f)).sort();
|
|
101017
|
+
if (imgs.length === 0) continue;
|
|
101018
|
+
md += `### ${label} (screens/${dir2}/)
|
|
101019
|
+
|
|
101020
|
+
*${desc}*
|
|
101021
|
+
|
|
101022
|
+
`;
|
|
101023
|
+
for (const img of imgs) {
|
|
101024
|
+
md += `
|
|
101025
|
+
|
|
101026
|
+
`;
|
|
101027
|
+
}
|
|
101028
|
+
}
|
|
101029
|
+
const indexPath = path14.join(screensDir, "INDEX.md");
|
|
101030
|
+
if (fs13.existsSync(indexPath)) {
|
|
101031
|
+
const indexContent = fs13.readFileSync(indexPath, "utf-8").trim();
|
|
101032
|
+
md += `### Screenshot Index (screens/INDEX.md)
|
|
101033
|
+
|
|
101034
|
+
${indexContent}
|
|
101035
|
+
|
|
101036
|
+
`;
|
|
101037
|
+
}
|
|
101038
|
+
}
|
|
101039
|
+
const ssDir = path14.join(skillDir, "screenshots");
|
|
101040
|
+
if (fs13.existsSync(ssDir)) {
|
|
101041
|
+
const ssFiles = fs13.readdirSync(ssDir).filter((f) => /\.(png|jpg|jpeg|webp)$/i.test(f));
|
|
101042
|
+
if (ssFiles.length > 0) {
|
|
101043
|
+
md += `## Homepage Screenshots (screenshots/)
|
|
101044
|
+
|
|
101045
|
+
`;
|
|
101046
|
+
for (const f of ssFiles) {
|
|
101047
|
+
md += `
|
|
101048
|
+
|
|
101049
|
+
`;
|
|
101050
|
+
}
|
|
101051
|
+
}
|
|
101052
|
+
}
|
|
101053
|
+
return md;
|
|
101054
|
+
}
|
|
100928
101055
|
function generateSkillMd(profile, screenshotPath, ultraResult) {
|
|
100929
101056
|
const bg = profile.colors.find((c) => c.role === "background");
|
|
100930
101057
|
const surface = profile.colors.find((c) => c.role === "surface");
|
|
@@ -104559,7 +104686,7 @@ gradient.pastel = pastel;
|
|
|
104559
104686
|
// src/ui.ts
|
|
104560
104687
|
var import_cli_progress = __toESM(require_cli_progress());
|
|
104561
104688
|
var path15 = __toESM(require("path"));
|
|
104562
|
-
var VERSION = "1.
|
|
104689
|
+
var VERSION = "1.2.0";
|
|
104563
104690
|
function padAnsi(str, width) {
|
|
104564
104691
|
const raw = stripAnsi(str);
|
|
104565
104692
|
return str + " ".repeat(Math.max(0, width - raw.length));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Reverse-engineer design systems from any website, repo, or project. Extracts colors, fonts, spacing, animations, and components — packaged as a .skill file for Claude. Pure static analysis, zero AI, zero API keys.",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|