mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
Sync generated provider output
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 4.1.2
|
||||
metadata:
|
||||
version: 4.1.2
|
||||
---
|
||||
|
||||
This skill gives you the tools and permission to create design that earns to be called out-of-distribution craft: Whereas before, your design work would have been safe, timid and measured, you now approach every design task as an award-winning design director with impeccable understanding for what makes exceptional design work: production-grade code, peak creativity, a clear POV, deep understanding of the needs of the client and users, and exceptional craft.
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -962,13 +962,45 @@ export function extractPlatform(product) {
|
||||
* (this file lives at `<skill>/scripts/context.mjs`). Returns null when the
|
||||
* frontmatter is missing or unreadable.
|
||||
*/
|
||||
function parseSkillFrontmatterVersion(content) {
|
||||
const match = String(content).match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---(?:[ \t]*\r?\n|[ \t]*$)/);
|
||||
if (!match) return null;
|
||||
|
||||
let metadataVersion = null;
|
||||
let topLevelVersion = null;
|
||||
let inMetadata = false;
|
||||
let metadataIndent = null;
|
||||
|
||||
for (const line of match[1].split(/\r?\n/)) {
|
||||
if (!line.trim() || line.trimStart().startsWith('#')) continue;
|
||||
const indentText = line.match(/^[ \t]*/)[0];
|
||||
const indent = indentText.replace(/\t/g, ' ').length;
|
||||
|
||||
if (indent === 0) {
|
||||
inMetadata = /^metadata:\s*(?:#.*)?$/.test(line);
|
||||
metadataIndent = null;
|
||||
const version = line.match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) topLevelVersion = version[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inMetadata) continue;
|
||||
if (metadataIndent === null) metadataIndent = indent;
|
||||
if (indent !== metadataIndent) continue;
|
||||
const version = line.trim().match(/^version:\s*(.+?)\s*$/);
|
||||
if (version) metadataVersion = version[1];
|
||||
}
|
||||
|
||||
const value = metadataVersion || topLevelVersion;
|
||||
return value ? value.trim().replace(/^(["'])(.*)\1$/, '$2') : null;
|
||||
}
|
||||
|
||||
function readLocalSkillVersion() {
|
||||
try {
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const skillMd = path.join(here, '..', 'SKILL.md');
|
||||
const content = fs.readFileSync(skillMd, 'utf-8');
|
||||
const match = content.match(/^version:\s*(.+)$/m);
|
||||
return match ? match[1].trim().replace(/^["']|["']$/g, '') : null;
|
||||
return parseSkillFrontmatterVersion(content);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user